You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/06/06 20:13:39 UTC

[GitHub] [trafficserver] sudheerv commented on issue #6853: Crash on dynamic_cast

sudheerv commented on issue #6853:
URL: https://github.com/apache/trafficserver/issues/6853#issuecomment-640112563


   Dug into this some more and it turns out this is likely related to the issue https://github.com/apache/trafficserver/issues/6849 and https://github.com/apache/trafficserver/issues/6850. 
   
   The root cause seems to be that the default `max_iobuffer_size` which is supposed to be an iobuffer size index (and not the raw size) and is used in figuring out the iobuffer index for a caller that asks for a IOBuffer (without explicitly passing in a max), is sometimes garbage. This results in corrupting IOBuffers and ends in weird crashes like a few of these.
   
   ```
   (gdb) p max_iobuffer_size
   $1 = 8245894515088831029
   ```
   
   
   ```
   (gdb) bt
   #0  0x00002b1926ed987e in __cxxabiv1::__dynamic_cast (src_ptr=0x2b19e1b0baf0, src_type=src_type@entry=0x7c1498 <typeinfo for Continuation>, dst_type=dst_type@entry=0x7c5188 <typeinfo for PluginUserArgsMixin>, src2dst=src2dst@entry=-2) at ../../.././libstdc++-v3/libsupc++/dyncast.cc:71
   #1  0x00000000004e17ce in TSUserArgGet (data=<optimized out>, arg_idx=0) at traffic_server/InkAPI.cc:6200
   #2  0x00002b193e022144 in atscppapi::utils::internal::getTransaction (ats_txn_handle=ats_txn_handle@entry=0x2b19e1b0baf0) at utils_internal.cc:178
   #3  0x00002b193e0230ce in (anonymous namespace)::handleTransactionEvents (cont=0x2b192abf4ec0, event=TS_EVENT_HTTP_READ_RESPONSE_HDR, edata=0x2b19e1b0baf0) at utils_internal.cc:76
   #4  0x00000000004d7231 in INKContInternal::handle_event (this=0x2b192abf4ec0, event=60006, edata=0x2b19e1b0baf0) at traffic_server/InkAPI.cc:1096
   #5  0x00000000004ef7e6 in Continuation::handleEvent (this=0x2b192abf4ec0, event=event@entry=60006, data=data@entry=0x2b19e1b0baf0) at /home/svinukon/Traffic/ATS/ats9/ats-core_trunk/ats9/src/iocore/eventsystem/I_Continuation.h:193
   #6  0x00000000004e9517 in APIHook::invoke (this=this@entry=0x2b1928d6df80, event=60006, edata=edata@entry=0x2b19e1b0baf0) at traffic_server/InkAPI.cc:1333
   #7  0x000000000054c987 in HttpSM::state_api_callout (this=0x2b19e1b0baf0, event=<optimized out>, data=<optimized out>) at HttpSM.cc:1499
   #8  0x000000000054db4b in HttpSM::state_read_server_response_header (this=0x2b19e1b0baf0, event=100, data=0x2b19f25c9130) at HttpSM.cc:2026
   #9  0x000000000054fa58 in HttpSM::main_handler (this=0x2b19e1b0baf0, event=100, data=0x2b19f25c9130) at HttpSM.cc:2729
   #10 0x000000000076fbbe in handleEvent (data=0x2b19f25c9130, event=100, this=0x2b19e1b0baf0) at /home/svinukon/Traffic/ATS/ats9/ats-core_trunk/ats9/src/iocore/eventsystem/I_Continuation.h:193
   #11 read_signal_and_update (vc=0x2b19f25c8f50, event=100) at UnixNetVConnection.cc:83
   #12 UnixNetVConnection::readSignalAndUpdate (this=this@entry=0x2b19f25c8f50, event=event@entry=100) at UnixNetVConnection.cc:1016
   #13 0x000000000073f64d in SSLNetVConnection::net_read_io (this=0x2b19f25c8f50, nh=0x2b192aa23d80, lthread=<optimized out>) at SSLNetVConnection.cc:674
   #14 0x000000000075de68 in NetHandler::process_ready_list (this=this@entry=0x2b192aa23d80) at UnixNet.cc:412
   #15 0x000000000075e15d in NetHandler::waitForActivity (this=0x2b192aa23d80, timeout=<optimized out>) at UnixNet.cc:547
   #16 0x00000000007bbc0a in EThread::execute_regular (this=this@entry=0x2b192aa20000) at UnixEThread.cc:266
   #17 0x00000000007bbe92 in EThread::execute (this=0x2b192aa20000) at UnixEThread.cc:327
   #18 0x00000000007ba1e9 in spawn_thread_internal (a=0x2b1928d63a40) at Thread.cc:92
   #19 0x00002b1926a33dd5 in start_thread () from /lib64/libpthread.so.0
   #20 0x00002b19277e4ead in clone () from /lib64/libc.so.6
   (gdb) p max_iobuffer_size
   $1 = 8245894515088831029
   (gdb) 
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org