Closed bryancall closed 8 months ago
H3Transaction removes itself from _transaction_list
by calling H3Session::remove_transaction
in its destructor, but the destructor is not called because the transaction is still on going (i.e. HttpSM has not called transaction_done
) although there's no traffic.
We need to stop the transaction and delete the H3Transaction instance first if inactivity timeout kicks in.
I looked into this a bit more. My comment above was not very accurate (the abort happens even if transaction_done()
is called by HttpSM).
There are (at least) two issues around this. When inactive timeout happens on a QUIC connection:
On H1 and H2, their session directly interacts SSLNetVC, so they call SSLNetVC::do_io_read/write
and that establishes a way to propagate events. On H3, H3App/Session cannot directly read/write data from/to QUICNetVC (everything is done on streams), so it seemed like there's no need to call do_io_read/write. But we probably need to call them to receive events.
Just documenting how I regenerated this crash.
I'm running h2load
with the following command ./bin/h2load -n 10000 -c 100 -m 10 --npn-list=h3 https://127.0.0.1:9090
. where 9090
is the port I set for QUIC. This command should return fail for all requests, since the path isn't specified like it should for the generator.so
plugin. ATS crashes after a while with the following backtrace.
#0 0x000014c5bbf38acf in raise () from /lib64/libc.so.6
#1 0x000014c5bbf0bea5 in abort () from /lib64/libc.so.6
#2 0x0000000000913ffe in ink_abort (message_format=0xd570bc "%s:%d: failed assertion `%s`") at /home/feid/git/duke-ats/src/tscore/ink_error.cc:99
#3 0x000000000091197d in _ink_assert (expression=0xe5d020 "this->_transaction_list.head == nullptr",
file=0xe5cfe8 "/home/feid/git/duke-ats/src/proxy/http3/Http3Session.cc", line=42) at /home/feid/git/duke-ats/src/tscore/ink_assert.cc:37
#4 0x0000000000d08832 in HQSession::~HQSession (this=0x14c59411bb00, __vtt_parm=0xe5d940 <VTT for Http3Session+8>, __in_chrg=<optimized out>)
at /home/feid/git/duke-ats/src/proxy/http3/Http3Session.cc:42
#5 0x0000000000d090c4 in Http3Session::~Http3Session (this=0x14c59411bb00, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
at /home/feid/git/duke-ats/src/proxy/http3/Http3Session.cc:180
#6 0x0000000000d09104 in Http3Session::~Http3Session (this=0x14c59411bb00, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
at /home/feid/git/duke-ats/src/proxy/http3/Http3Session.cc:185
#7 0x0000000000d02e84 in Http3App::~Http3App (this=0x14c594119190, __in_chrg=<optimized out>) at /home/feid/git/duke-ats/src/proxy/http3/Http3App.cc:71
#8 0x0000000000d02f42 in Http3App::~Http3App (this=0x14c594119190, __in_chrg=<optimized out>) at /home/feid/git/duke-ats/src/proxy/http3/Http3App.cc:74
#9 0x0000000000c79d27 in QUICApplicationMap::~QUICApplicationMap (this=0x14c594039b50, __in_chrg=<optimized out>)
at /home/feid/git/duke-ats/include/iocore/net/quic/QUICApplicationMap.h:41
#10 0x0000000000c77408 in QUICNetVConnection::free_thread (this=0x14c51803fb50, t=0x14c5bad2d010) at /home/feid/git/duke-ats/src/iocore/net/QUICNetVConnection.cc:128
#11 0x0000000000c9dd7a in NetHandler::free_netevent (this=0x14c5bad2dba0, ne=0x14c51803fd70) at /home/feid/git/duke-ats/src/iocore/net/NetHandler.cc:228
#12 0x0000000000c6065a in InactivityCop::check_inactivity (this=0x14c594000c50, event=2, e=0x14c594000ce0) at /home/feid/git/duke-ats/src/iocore/net/UnixNet.cc:98
#13 0x00000000008e54b9 in Continuation::handleEvent (this=0x14c594000c50, event=2, data=0x14c594000ce0)
at /home/feid/git/duke-ats/include/iocore/eventsystem/Continuation.h:228
#14 0x0000000000cdac60 in EThread::process_event (this=0x14c5bad2d010, e=0x14c594000ce0, calling_code=2) at /home/feid/git/duke-ats/src/iocore/eventsystem/UnixEThread.cc:150
#15 0x0000000000cdb26a in EThread::execute_regular (this=0x14c5bad2d010) at /home/feid/git/duke-ats/src/iocore/eventsystem/UnixEThread.cc:255
#16 0x0000000000cdb555 in EThread::execute (this=0x14c5bad2d010) at /home/feid/git/duke-ats/src/iocore/eventsystem/UnixEThread.cc:334
#17 0x0000000000cd9fa0 in spawn_thread_internal (a=0x2375600) at /home/feid/git/duke-ats/src/iocore/eventsystem/Thread.cc:78
#18 0x000014c5bc2b71ca in start_thread () from /lib64/libpthread.so.0
#19 0x000014c5bbf23e73 in clone () from /lib64/libc.so.6