[ 
https://issues.apache.org/jira/browse/TS-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659844#comment-14659844
 ] 

Jiri Podhorsky edited comment on TS-3821 at 8/6/15 11:20 AM:
-------------------------------------------------------------

Ok, I build trafficserver with --enable-debug and run gdb just like in here 
[https://cwiki.apache.org/confluence/display/TS/Filing+useful+bug+reports]. 
Here is backtrace of gdb:

{noformat}
#0  0x00000000007c7906 in ?? ()
#1  0x00000000007c7900 in ?? ()
#2  0x000000000064cd0c in HttpTunnel::producer_run (this=0x7fffb9e49838, 
p=0x7fffb9e49a38) at HttpTunnel.cc:915
#3  0x000000000064c567 in HttpTunnel::tunnel_run (this=0x7fffb9e49838, 
p_arg=0x7fffb9e49a38) at HttpTunnel.cc:733
#4  0x000000000060d269 in HttpSM::setup_internal_transfer (this=0x7fffb9e483e0, 
handler_arg=(int (HttpSM::*)(HttpSM * const, int, void *)) 0x600c4e 
<HttpSM::tunnel_handler(int, void*)>) at HttpSM.cc:5992
#5  0x00000000005fc21e in HttpSM::handle_api_return (this=0x7fffb9e483e0) at 
HttpSM.cc:1580
#6  0x0000000000611811 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7125
#7  0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0x6234a6 
<HttpTransact::HandleApiErrorJump(HttpTransact::State*)>) at HttpSM.cc:6852
#8  0x00000000005fbe8d in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=60001, data=0x0) at HttpSM.cc:1467
#9  0x00000000005fb4b0 in HttpSM::state_api_callback (this=0x7fffb9e483e0, 
event=60001, data=0x0) at HttpSM.cc:1275
#10 0x0000000000540e51 in TSHttpTxnReenable (txnp=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_ERROR) at InkAPI.cc:5614
#11 0x00007fffd96570b7 in atscppapi::Transaction::error (this=0x7fffb0081430) 
at Transaction.cc:111
#12 0x00007fffd9a86af1 in BlockIP::handleSendRequestHeaders (this=0x2cbd580, 
transaction=...) at BlockIP.cc:52
#13 0x00007fffd96561ef in (anonymous namespace)::invokePluginForEvent 
(plugin=0x2cbd580, ats_txn_handle=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_SEND_REQUEST_HDR) at utils_internal.cc:116
#14 0x00007fffd9656579 in atscppapi::utils::internal::invokePluginForEvent 
(plugin=0x2cbd580, ats_txn_handle=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_SEND_REQUEST_HDR) at utils_internal.cc:222
#15 0x00007fffd96550a1 in (anonymous namespace)::handleGlobalPluginEvents 
(cont=0x2cc20b0, event=TS_EVENT_HTTP_SEND_REQUEST_HDR, edata=0x7fffb9e483e0) at 
GlobalPlugin.cc:58
#16 0x000000000053519d in INKContInternal::handle_event (this=0x2cc20b0, 
event=60004, edata=0x7fffb9e483e0) at InkAPI.cc:1003
#17 0x0000000000520494 in Continuation::handleEvent (this=0x2cc20b0, 
event=60004, data=0x7fffb9e483e0) at ../iocore/eventsystem/I_Continuation.h:145
#18 0x0000000000535abc in APIHook::invoke (this=0x2cc30e0, event=60004, 
edata=0x7fffb9e483e0) at InkAPI.cc:1221
#19 0x00000000005fbb5b in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=60000, data=0x0) at HttpSM.cc:1381
#20 0x00000000005fb4b0 in HttpSM::state_api_callback (this=0x7fffb9e483e0, 
event=60000, data=0x0) at HttpSM.cc:1275
#21 0x0000000000540e51 in TSHttpTxnReenable (txnp=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5614
#22 0x00007fffd9656089 in (anonymous namespace)::handleTransactionEvents 
(cont=0x2cc2120, event=TS_EVENT_HTTP_SEND_REQUEST_HDR, edata=0x7fffb9e483e0) at 
utils_internal.cc:88
#23 0x000000000053519d in INKContInternal::handle_event (this=0x2cc2120, 
event=60004, edata=0x7fffb9e483e0) at InkAPI.cc:1003
#24 0x0000000000520494 in Continuation::handleEvent (this=0x2cc2120, 
event=60004, data=0x7fffb9e483e0) at ../iocore/eventsystem/I_Continuation.h:145
#25 0x0000000000535abc in APIHook::invoke (this=0x2cc3160, event=60004, 
edata=0x7fffb9e483e0) at InkAPI.cc:1221
#26 0x00000000005fbb5b in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=0, data=0x0) at HttpSM.cc:1381
#27 0x00000000006092ad in HttpSM::do_api_callout_internal (this=0x7fffb9e483e0) 
at HttpSM.cc:4886
#28 0x000000000061716f in HttpSM::do_api_callout (this=0x7fffb9e483e0) at 
HttpSM.cc:442
#29 0x000000000060bb8a in HttpSM::setup_server_send_request_api 
(this=0x7fffb9e483e0) at HttpSM.cc:5660
#30 0x0000000000609fbc in HttpSM::handle_http_server_open (this=0x7fffb9e483e0) 
at HttpSM.cc:5154
#31 0x00000000005fc7a3 in HttpSM::state_http_server_open (this=0x7fffb9e483e0, 
event=200, data=0x4c89100) at HttpSM.cc:1650
#32 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, event=200, 
data=0x4c89100) at HttpSM.cc:2552
#33 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=200, data=0x4c89100) at ../iocore/eventsystem/I_Continuation.h:145
#34 0x0000000000793757 in UnixNetVConnection::connectUp (this=0x4c89100, 
t=0x7fffeb47e010, fd=-1) at UnixNetVConnection.cc:1197
#35 0x000000000078e11b in UnixNetProcessor::connect_re_internal 
(this=0x108cb40, cont=0x7fffb9e483e0, target=0x7fffb9e48a90, 
opt=0x7fffe25edb10) at UnixNetProcessor.cc:248
#36 0x000000000054a1ca in NetProcessor::connect_re (this=0x108cb40, 
cont=0x7fffb9e483e0, addr=0x7fffb9e48a90, opts=0x7fffe25edb10) at 
../iocore/net/P_UnixNetProcessor.h:68
#37 0x0000000000608db5 in HttpSM::do_http_server_open (this=0x7fffb9e483e0, 
raw=false) at HttpSM.cc:4778
#38 0x000000000061122b in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7030
#39 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#40 0x00000000005ff563 in HttpSM::state_cache_open_write (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at HttpSM.cc:2440
#41 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at HttpSM.cc:2552
#42 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at ../iocore/eventsystem/I_Continuation.h:145
#43 0x00000000005ea62d in HttpCacheSM::state_cache_open_write 
(this=0x7fffb9e49e18, event=1108, data=0x7fffb001a510) at HttpCacheSM.cc:171
#44 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e49e18, 
event=1108, data=0x7fffb001a510) at ../iocore/eventsystem/I_Continuation.h:145
#45 0x0000000000755be7 in CacheVC::callcont (this=0x7fffb001a510, event=1108) 
at P_CacheInternal.h:662
#46 0x00000000007620c6 in Cache::open_write (this=0x7fffbc0058d0, 
cont=0x7fffb9e49e18, key=0x7fffe25ee110, info=0x0, apin_in_cache=0, 
type=CACHE_FRAG_TYPE_HTTP, hostname=0x7fffb85b300b "xxxxx.com 
HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: xxxxx.com\r\nConnection: 
close\r\nUser-Agent: 
Python-urllib/2.7\r\n\r\n\255\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276"...,
 host_len=12) at CacheWrite.cc:1788
#47 0x0000000000739752 in Cache::open_write (this=0x7fffbc0058d0, 
cont=0x7fffb9e49e18, url=0x7fffb9e48b08, request=0x7fffb9e48af0, old_info=0x0, 
pin_in_cache=0, type=CACHE_FRAG_TYPE_HTTP) at P_CacheInternal.h:1093
#48 0x0000000000737075 in CacheProcessor::open_write (this=0x108b800, 
cont=0x7fffb9e49e18, expected_size=0, url=0x7fffb9e48b08, 
cluster_cache_local=false, request=0x7fffb9e48af0, old_info=0x0, 
pin_in_cache=0, type=CACHE_FRAG_TYPE_HTTP) at Cache.cc:3622
#49 0x00000000005eac7c in HttpCacheSM::open_write (this=0x7fffb9e49e18, 
url=0x7fffb9e48b08, request=0x7fffb9e48af0, old_info=0x0, pin_in_cache=0, 
retry=true, allow_multiple=false) at HttpCacheSM.cc:302
#50 0x0000000000607961 in HttpSM::do_cache_prepare_action (this=0x7fffb9e483e0, 
c_sm=0x7fffb9e49e18, object_read_info=0x0, retry=true, allow_multiple=false) at 
HttpSM.cc:4508
#51 0x000000000061720c in HttpSM::do_cache_prepare_write (this=0x7fffb9e483e0) 
at HttpSM.cc:4434
#52 0x0000000000611778 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7107
#53 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#54 0x00000000005fbfe1 in HttpSM::handle_api_return (this=0x7fffb9e483e0) at 
HttpSM.cc:1517
#55 0x00000000005fbdcf in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=0, data=0x0) at HttpSM.cc:1455
#56 0x00000000006092ad in HttpSM::do_api_callout_internal (this=0x7fffb9e483e0) 
at HttpSM.cc:4886
#57 0x000000000061716f in HttpSM::do_api_callout (this=0x7fffb9e483e0) at 
HttpSM.cc:442
#58 0x0000000000610410 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:6885
#59 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#60 0x00000000005fe68c in HttpSM::state_hostdb_lookup (this=0x7fffb9e483e0, 
event=500, data=0x7fffda3293c0) at HttpSM.cc:2137
#61 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, event=500, 
data=0x7fffda3293c0) at HttpSM.cc:2552
#62 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=500, data=0x7fffda3293c0) at ../iocore/eventsystem/I_Continuation.h:145
#63 0x00000000006dd6b3 in reply_to_cont (cont=0x7fffb9e483e0, r=0x7fffda3293c0, 
is_srv=false) at HostDB.cc:613
#64 0x00000000006e213e in HostDBContinuation::dnsEvent (this=0x7ffff7e430f0, 
event=600, e=0x498c8d0) at HostDB.cc:1604
#65 0x0000000000520494 in Continuation::handleEvent (this=0x7ffff7e430f0, 
event=600, data=0x498c8d0) at ../iocore/eventsystem/I_Continuation.h:145
#66 0x00000000006f8dcf in DNSEntry::postEvent (this=0x7fffb9d13510) at 
DNS.cc:1267
#67 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9d13510, 
event=1, data=0x7fffbc2ff7c0) at ../iocore/eventsystem/I_Continuation.h:145
#68 0x00000000007b1a7a in EThread::process_event (this=0x7fffeb47e010, 
e=0x7fffbc2ff7c0, calling_code=1) at UnixEThread.cc:128
#69 0x00000000007b1ce1 in EThread::execute (this=0x7fffeb47e010) at 
UnixEThread.cc:179
#70 0x00000000007b0f9b in spawn_thread_internal (a=0x1151f70) at Thread.cc:85
#71 0x00007ffff6ba2b50 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#72 0x00007ffff4f2f95d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#73 0x0000000000000000 in ?? ()
{noformat}


was (Author: ksj):
Ok, I build trafficserver with --enable-debug and run gdb just like in here 
[https://cwiki.apache.org/confluence/display/TS/Filing+useful+bug+reports]. 
Here is backtrace from gdb:

{noformat}
#0  0x00000000007c7906 in ?? ()
#1  0x00000000007c7900 in ?? ()
#2  0x000000000064cd0c in HttpTunnel::producer_run (this=0x7fffb9e49838, 
p=0x7fffb9e49a38) at HttpTunnel.cc:915
#3  0x000000000064c567 in HttpTunnel::tunnel_run (this=0x7fffb9e49838, 
p_arg=0x7fffb9e49a38) at HttpTunnel.cc:733
#4  0x000000000060d269 in HttpSM::setup_internal_transfer (this=0x7fffb9e483e0, 
handler_arg=(int (HttpSM::*)(HttpSM * const, int, void *)) 0x600c4e 
<HttpSM::tunnel_handler(int, void*)>) at HttpSM.cc:5992
#5  0x00000000005fc21e in HttpSM::handle_api_return (this=0x7fffb9e483e0) at 
HttpSM.cc:1580
#6  0x0000000000611811 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7125
#7  0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0x6234a6 
<HttpTransact::HandleApiErrorJump(HttpTransact::State*)>) at HttpSM.cc:6852
#8  0x00000000005fbe8d in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=60001, data=0x0) at HttpSM.cc:1467
#9  0x00000000005fb4b0 in HttpSM::state_api_callback (this=0x7fffb9e483e0, 
event=60001, data=0x0) at HttpSM.cc:1275
#10 0x0000000000540e51 in TSHttpTxnReenable (txnp=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_ERROR) at InkAPI.cc:5614
#11 0x00007fffd96570b7 in atscppapi::Transaction::error (this=0x7fffb0081430) 
at Transaction.cc:111
#12 0x00007fffd9a86af1 in BlockIP::handleSendRequestHeaders (this=0x2cbd580, 
transaction=...) at BlockIP.cc:52
#13 0x00007fffd96561ef in (anonymous namespace)::invokePluginForEvent 
(plugin=0x2cbd580, ats_txn_handle=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_SEND_REQUEST_HDR) at utils_internal.cc:116
#14 0x00007fffd9656579 in atscppapi::utils::internal::invokePluginForEvent 
(plugin=0x2cbd580, ats_txn_handle=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_SEND_REQUEST_HDR) at utils_internal.cc:222
#15 0x00007fffd96550a1 in (anonymous namespace)::handleGlobalPluginEvents 
(cont=0x2cc20b0, event=TS_EVENT_HTTP_SEND_REQUEST_HDR, edata=0x7fffb9e483e0) at 
GlobalPlugin.cc:58
#16 0x000000000053519d in INKContInternal::handle_event (this=0x2cc20b0, 
event=60004, edata=0x7fffb9e483e0) at InkAPI.cc:1003
#17 0x0000000000520494 in Continuation::handleEvent (this=0x2cc20b0, 
event=60004, data=0x7fffb9e483e0) at ../iocore/eventsystem/I_Continuation.h:145
#18 0x0000000000535abc in APIHook::invoke (this=0x2cc30e0, event=60004, 
edata=0x7fffb9e483e0) at InkAPI.cc:1221
#19 0x00000000005fbb5b in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=60000, data=0x0) at HttpSM.cc:1381
#20 0x00000000005fb4b0 in HttpSM::state_api_callback (this=0x7fffb9e483e0, 
event=60000, data=0x0) at HttpSM.cc:1275
#21 0x0000000000540e51 in TSHttpTxnReenable (txnp=0x7fffb9e483e0, 
event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5614
#22 0x00007fffd9656089 in (anonymous namespace)::handleTransactionEvents 
(cont=0x2cc2120, event=TS_EVENT_HTTP_SEND_REQUEST_HDR, edata=0x7fffb9e483e0) at 
utils_internal.cc:88
#23 0x000000000053519d in INKContInternal::handle_event (this=0x2cc2120, 
event=60004, edata=0x7fffb9e483e0) at InkAPI.cc:1003
#24 0x0000000000520494 in Continuation::handleEvent (this=0x2cc2120, 
event=60004, data=0x7fffb9e483e0) at ../iocore/eventsystem/I_Continuation.h:145
#25 0x0000000000535abc in APIHook::invoke (this=0x2cc3160, event=60004, 
edata=0x7fffb9e483e0) at InkAPI.cc:1221
#26 0x00000000005fbb5b in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=0, data=0x0) at HttpSM.cc:1381
#27 0x00000000006092ad in HttpSM::do_api_callout_internal (this=0x7fffb9e483e0) 
at HttpSM.cc:4886
#28 0x000000000061716f in HttpSM::do_api_callout (this=0x7fffb9e483e0) at 
HttpSM.cc:442
#29 0x000000000060bb8a in HttpSM::setup_server_send_request_api 
(this=0x7fffb9e483e0) at HttpSM.cc:5660
#30 0x0000000000609fbc in HttpSM::handle_http_server_open (this=0x7fffb9e483e0) 
at HttpSM.cc:5154
#31 0x00000000005fc7a3 in HttpSM::state_http_server_open (this=0x7fffb9e483e0, 
event=200, data=0x4c89100) at HttpSM.cc:1650
#32 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, event=200, 
data=0x4c89100) at HttpSM.cc:2552
#33 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=200, data=0x4c89100) at ../iocore/eventsystem/I_Continuation.h:145
#34 0x0000000000793757 in UnixNetVConnection::connectUp (this=0x4c89100, 
t=0x7fffeb47e010, fd=-1) at UnixNetVConnection.cc:1197
#35 0x000000000078e11b in UnixNetProcessor::connect_re_internal 
(this=0x108cb40, cont=0x7fffb9e483e0, target=0x7fffb9e48a90, 
opt=0x7fffe25edb10) at UnixNetProcessor.cc:248
#36 0x000000000054a1ca in NetProcessor::connect_re (this=0x108cb40, 
cont=0x7fffb9e483e0, addr=0x7fffb9e48a90, opts=0x7fffe25edb10) at 
../iocore/net/P_UnixNetProcessor.h:68
#37 0x0000000000608db5 in HttpSM::do_http_server_open (this=0x7fffb9e483e0, 
raw=false) at HttpSM.cc:4778
#38 0x000000000061122b in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7030
#39 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#40 0x00000000005ff563 in HttpSM::state_cache_open_write (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at HttpSM.cc:2440
#41 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at HttpSM.cc:2552
#42 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=1108, data=0x7fffb001a510) at ../iocore/eventsystem/I_Continuation.h:145
#43 0x00000000005ea62d in HttpCacheSM::state_cache_open_write 
(this=0x7fffb9e49e18, event=1108, data=0x7fffb001a510) at HttpCacheSM.cc:171
#44 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e49e18, 
event=1108, data=0x7fffb001a510) at ../iocore/eventsystem/I_Continuation.h:145
#45 0x0000000000755be7 in CacheVC::callcont (this=0x7fffb001a510, event=1108) 
at P_CacheInternal.h:662
#46 0x00000000007620c6 in Cache::open_write (this=0x7fffbc0058d0, 
cont=0x7fffb9e49e18, key=0x7fffe25ee110, info=0x0, apin_in_cache=0, 
type=CACHE_FRAG_TYPE_HTTP, hostname=0x7fffb85b300b "xxxxx.com 
HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: xxxxx.com\r\nConnection: 
close\r\nUser-Agent: 
Python-urllib/2.7\r\n\r\n\255\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276\357Þ­\276"...,
 host_len=12) at CacheWrite.cc:1788
#47 0x0000000000739752 in Cache::open_write (this=0x7fffbc0058d0, 
cont=0x7fffb9e49e18, url=0x7fffb9e48b08, request=0x7fffb9e48af0, old_info=0x0, 
pin_in_cache=0, type=CACHE_FRAG_TYPE_HTTP) at P_CacheInternal.h:1093
#48 0x0000000000737075 in CacheProcessor::open_write (this=0x108b800, 
cont=0x7fffb9e49e18, expected_size=0, url=0x7fffb9e48b08, 
cluster_cache_local=false, request=0x7fffb9e48af0, old_info=0x0, 
pin_in_cache=0, type=CACHE_FRAG_TYPE_HTTP) at Cache.cc:3622
#49 0x00000000005eac7c in HttpCacheSM::open_write (this=0x7fffb9e49e18, 
url=0x7fffb9e48b08, request=0x7fffb9e48af0, old_info=0x0, pin_in_cache=0, 
retry=true, allow_multiple=false) at HttpCacheSM.cc:302
#50 0x0000000000607961 in HttpSM::do_cache_prepare_action (this=0x7fffb9e483e0, 
c_sm=0x7fffb9e49e18, object_read_info=0x0, retry=true, allow_multiple=false) at 
HttpSM.cc:4508
#51 0x000000000061720c in HttpSM::do_cache_prepare_write (this=0x7fffb9e483e0) 
at HttpSM.cc:4434
#52 0x0000000000611778 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:7107
#53 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#54 0x00000000005fbfe1 in HttpSM::handle_api_return (this=0x7fffb9e483e0) at 
HttpSM.cc:1517
#55 0x00000000005fbdcf in HttpSM::state_api_callout (this=0x7fffb9e483e0, 
event=0, data=0x0) at HttpSM.cc:1455
#56 0x00000000006092ad in HttpSM::do_api_callout_internal (this=0x7fffb9e483e0) 
at HttpSM.cc:4886
#57 0x000000000061716f in HttpSM::do_api_callout (this=0x7fffb9e483e0) at 
HttpSM.cc:442
#58 0x0000000000610410 in HttpSM::set_next_state (this=0x7fffb9e483e0) at 
HttpSM.cc:6885
#59 0x00000000006103aa in HttpSM::call_transact_and_set_next_state 
(this=0x7fffb9e483e0, f=0) at HttpSM.cc:6852
#60 0x00000000005fe68c in HttpSM::state_hostdb_lookup (this=0x7fffb9e483e0, 
event=500, data=0x7fffda3293c0) at HttpSM.cc:2137
#61 0x00000000005ffdfc in HttpSM::main_handler (this=0x7fffb9e483e0, event=500, 
data=0x7fffda3293c0) at HttpSM.cc:2552
#62 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9e483e0, 
event=500, data=0x7fffda3293c0) at ../iocore/eventsystem/I_Continuation.h:145
#63 0x00000000006dd6b3 in reply_to_cont (cont=0x7fffb9e483e0, r=0x7fffda3293c0, 
is_srv=false) at HostDB.cc:613
#64 0x00000000006e213e in HostDBContinuation::dnsEvent (this=0x7ffff7e430f0, 
event=600, e=0x498c8d0) at HostDB.cc:1604
#65 0x0000000000520494 in Continuation::handleEvent (this=0x7ffff7e430f0, 
event=600, data=0x498c8d0) at ../iocore/eventsystem/I_Continuation.h:145
#66 0x00000000006f8dcf in DNSEntry::postEvent (this=0x7fffb9d13510) at 
DNS.cc:1267
#67 0x0000000000520494 in Continuation::handleEvent (this=0x7fffb9d13510, 
event=1, data=0x7fffbc2ff7c0) at ../iocore/eventsystem/I_Continuation.h:145
#68 0x00000000007b1a7a in EThread::process_event (this=0x7fffeb47e010, 
e=0x7fffbc2ff7c0, calling_code=1) at UnixEThread.cc:128
#69 0x00000000007b1ce1 in EThread::execute (this=0x7fffeb47e010) at 
UnixEThread.cc:179
#70 0x00000000007b0f9b in spawn_thread_internal (a=0x1151f70) at Thread.cc:85
#71 0x00007ffff6ba2b50 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
#72 0x00007ffff4f2f95d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#73 0x0000000000000000 in ?? ()
{noformat}

> Segmentation fault possibly due leaks in atscppapi
> --------------------------------------------------
>
>                 Key: TS-3821
>                 URL: https://issues.apache.org/jira/browse/TS-3821
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: CPP API
>            Reporter: Jiri Podhorsky
>            Assignee: Brian Geffon
>             Fix For: 6.1.0
>
>
> Hello,
> I'm getting segmentation faults with ATS 5.3.1, possibly when I enabled 
> plugins in atscppapi, in which are used other Plugins than GlobalPlugin 
> (TransformationPlugin, InterceptionPlugin,...)
> i'm building traffic server only with parameters:
> ./configure --prefix=/install --exec-prefix=/exec --with-user=trafficserver 
> --enable-cppapi
> I'm getting segfault:
> {noformat}
> traffic_server: Segmentation fault (Address not mapped to object [(nil)])
> traffic_server - STACK TRACE: 
> /www/trafficserver/install/bin/traffic_server(_Z19crash_logger_invokeiP7siginfoPv+0x99)[0x4c64d9]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0)[0x2afbe25d90a0]
> {noformat}
> I tried to find an Issue and found possible leak in dectructor ~Transaction() 
>  of Transaction.cc file.
> The leak is, there is added plugin by addPlugin(TransactionPlugin *);
> and according to documentation 
> [https://docs.trafficserver.apache.org/en/latest/api/classatscppapi_1_1Transaction.html#a9835e610553275d197cabfbd6d1cab7b],
>  Transaction should be responsible for cleaning.
> But nothing removes items of list state_.plugins_, where should be pointers 
> to memory allocated with new, which won't be deleted by delete state_;
> I tried to correct it with
> {noformat} 
> for (TransactionPlugin* tmp : state_->plugins_) {
>       delete tmp;
> }
> {noformat}
> But it didn't work. I'm getting similar segfault with another 
> {noformat}
> traffic_server: Segmentation fault (Invalid permissions for mapped object 
> [0x2b86141ea898])
> traffic_server - STACK TRACE: 
> /www/trafficserver/install/bin/traffic_server(_Z19crash_logger_invokeiP7siginfoPv+0x99)[0x4c64d9]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0)[0x2b85d603d0a0]
> [0x2b86141ea898]
> {noformat}
> I tried to find more deep and find the plugins should be freed by delete in 
> another class in file utils_internal.cc.
> But if this is true, I should see in debug mode message, which is printed 
> before delete:
> {noformat}
> LOG_DEBUG("Locked Mutex...Deleting transaction plugin at %p", *iter);
> {noformat}
> But I don't see such messages in log.
> I can see in error.log lot of these messages. I'm getting them at least every 
> second.
> {noformat}
> 20150805.16h37m04s [atscppapi] [Transaction.cc:343, operator()()] server 
> request already initialized
> {noformat}
> Can you help me find the issue? Thanks for help in advance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to