Skip to content

Commit

Permalink
解决插件中修改了cache内容时获取响应码异常故障:
Browse files Browse the repository at this point in the history
#0  0x00002b2b2524d5d7 in raise () from /lib64/libc.so.6
apache#1  0x00002b2b2524ecc8 in abort () from /lib64/libc.so.6
apache#2  0x00002b2b226fd5e8 in ink_die_die_die (retval=1) at ink_error.cc:43
apache#3  0x00002b2b226fd6c9 in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, message_format=0x2b2b2271aee0 "%s:%d: failed assert `%s`", ap=0x2b2b32547ee8) at ink_error.cc:65
apache#4  0x00002b2b226fd76e in ink_fatal (return_code=1, message_format=0x2b2b2271aee0 "%s:%d: failed assert `%s`") at ink_error.cc:73
apache#5  0x00002b2b226fc4c0 in _ink_assert (expression=0x74e1b8 "sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS", file=0x74df7d "InkAPI.cc", line=3872) at ink_assert.cc:38
apache#6  0x00000000005116c7 in _TSReleaseAssert (text=0x74e1b8 "sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS", file=0x74df7d "InkAPI.cc", line=3872) at InkAPI.cc:413
apache#7  0x000000000051a04d in TSHttpHdrStatusGet (bufp=0x2b2b58280450, obj=0x2b2b6c10c088) at InkAPI.cc:3872
apache#8  0x00002b2b500025ce in TSInvalidUrlCache (pstArray=0x2ecf8a0, txnp=0x2b2b5b680e40) at cachestatus.cc:342
apache#9  0x00002b2b50002824 in status_hook (contp=0x2b2b226671e0, event=TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE, edata=0x2b2b5b680e40) at cachestatus.cc:388
apache#10 0x0000000000512557 in INKContInternal::handle_event (this=0x2b2b226671e0, event=60015, edata=0x2b2b5b680e40) at InkAPI.cc:1009
apache#11 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b226671e0, event=60015, data=0x2b2b5b680e40) at ../iocore/eventsystem/I_Continuation.h:146
apache#12 0x0000000000512d71 in APIHook::invoke (this=0x2b2b226bdf40, event=60015, edata=0x2b2b5b680e40) at InkAPI.cc:1228
apache#13 0x0000000000593071 in HttpSM::state_api_callout (this=0x2b2b5b680e40, event=0, data=0x0) at HttpSM.cc:1469
apache#14 0x000000000059da01 in HttpSM::do_api_callout_internal (this=0x2b2b5b680e40) at HttpSM.cc:4833
apache#15 0x00000000005aaf2c in HttpSM::do_api_callout (this=0x2b2b5b680e40) at HttpSM.cc:576
apache#16 0x00000000005a3fa0 in HttpSM::set_next_state (this=0x2b2b5b680e40) at HttpSM.cc:6955
apache#17 0x00000000005a3f31 in HttpSM::call_transact_and_set_next_state (this=0x2b2b5b680e40, f=0x0) at HttpSM.cc:6921
apache#18 0x00000000005934af in HttpSM::handle_api_return (this=0x2b2b5b680e40) at HttpSM.cc:1611
apache#19 0x00000000005932e1 in HttpSM::state_api_callout (this=0x2b2b5b680e40, event=0, data=0x0) at HttpSM.cc:1543
apache#20 0x000000000059da01 in HttpSM::do_api_callout_internal (this=0x2b2b5b680e40) at HttpSM.cc:4833
apache#21 0x00000000005aaf2c in HttpSM::do_api_callout (this=0x2b2b5b680e40) at HttpSM.cc:576
apache#22 0x00000000005a3fa0 in HttpSM::set_next_state (this=0x2b2b5b680e40) at HttpSM.cc:6955
apache#23 0x00000000005a3f31 in HttpSM::call_transact_and_set_next_state (this=0x2b2b5b680e40, f=0x5b94b8 <HttpTransact::HandleCacheOpenRead(HttpTransact::State*)>) at HttpSM.cc:6921
apache#24 0x00000000005962f6 in HttpSM::state_cache_open_read (this=0x2b2b5b680e40, event=1102, data=0x2b2b52acf800) at HttpSM.cc:2612
apache#25 0x0000000000596838 in HttpSM::main_handler (this=0x2b2b5b680e40, event=1102, data=0x2b2b52acf800) at HttpSM.cc:2682
apache#26 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b5b680e40, event=1102, data=0x2b2b52acf800) at ../iocore/eventsystem/I_Continuation.h:146
apache#27 0x000000000057ec8f in HttpCacheSM::state_cache_open_read (this=0x2b2b5b682648, event=1102, data=0x2b2b52acf800) at HttpCacheSM.cc:121
apache#28 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b5b682648, event=1102, data=0x2b2b52acf800) at ../iocore/eventsystem/I_Continuation.h:146
apache#29 0x00000000006fcb5a in CacheVC::callcont (this=0x2b2b52acf800, event=1102) at P_CacheInternal.h:839
apache#30 0x00000000006fb300 in CacheVC::openReadStartEarliest (this=0x2b2b52acf800, event=3900, e=0x0) at CacheRead.cc:1020
apache#31 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b52acf800, event=3900, data=0x0) at ../iocore/eventsystem/I_Continuation.h:146
apache#32 0x00000000006fb245 in CacheVC::openReadStartEarliest (this=0x2b2b52acf800, event=1182, e=0x2b2b226d40c0) at CacheRead.cc:1015
apache#33 0x00000000006f7ac5 in CacheVC::openReadFromWriterHead (this=0x2b2b52acf800, event=1182, e=0x2b2b226d40c0) at CacheRead.cc:342
apache#34 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b52acf800, event=1182, data=0x2b2b226d40c0) at ../iocore/eventsystem/I_Continuation.h:146
apache#35 0x00000000006f7e3a in CacheVC::handleReadFromWriter (this=0x2b2b52acf800, event=1182, e=0x2b2b226d40c0) at CacheRead.cc:390
apache#36 0x000000000050a018 in Continuation::handleEvent (this=0x2b2b52acf800, event=1182, data=0x2b2b226d40c0) at ../iocore/eventsystem/I_Continuation.h:146
apache#37 0x0000000000745c7d in EThread::process_event (this=0x2b2b3234a010, e=0x2b2b226d40c0, calling_code=1182) at UnixEThread.cc:142
apache#38 0x0000000000745e4e in EThread::execute (this=0x2b2b3234a010) at UnixEThread.cc:193
apache#39 0x0000000000744f10 in spawn_thread_internal (a=0x2d84f30) at Thread.cc:88
apache#40 0x00002b2b22934df5 in start_thread () from /lib64/libpthread.so.0
apache#41 0x00002b2b2530e1ad in clone () from /lib64/libc.so.6
  • Loading branch information
iake123 committed Mar 8, 2017
1 parent fb1f29b commit efb7c74
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proxy/InkAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4855,7 +4855,11 @@ TSHttpTxnCachedRespGet(TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *obj)
*handle = (HdrHeapSDKHandle *)sm->t_state.arena.alloc(sizeof(HdrHeapSDKHandle));
(*handle)->m_heap = cached_hdr->m_heap;
}
if (nullptr == *handle) {
return TS_ERROR;
}

(*handle)->m_heap = cached_hdr->m_heap;
*(reinterpret_cast<HdrHeapSDKHandle **>(bufp)) = *handle;
*obj = reinterpret_cast<TSMLoc>(cached_hdr->m_http);
sdk_assert(sdk_sanity_check_mbuffer(*bufp) == TS_SUCCESS);
Expand Down

0 comments on commit efb7c74

Please sign in to comment.