shinrich edited a comment on pull request #7237:
URL: https://github.com/apache/trafficserver/pull/7237#issuecomment-708018646


   I pushed another commit.  It addresses the assert you saw (case 2).  With 
that change, I didn't have to change HttpTunnel::is_tunnel_alive().   I also 
adjusted the h2spec test to not send a content-length, and with this change, 
the inactivity_timeout seemed to kick in as expected (case 3).
   
   The second commit includes changes in HttpSM::tunnel_handler_post_server to 
address crashes we started seeing once we deployed the first patch (a few 
crashes a day over the fleet).  The following stack trace.  Seemed to occur on 
POST with very large post bodies (2MB) with a content-length specified, but the 
bad client sent another data frame after the content-length number of bytes was 
sent.  Our internal patch includes an additional warning message to try an get 
additional information about our faulty client.
   
   ```
   #0  operator= (p=0x2b819957b600, this=0x5529e2a5c0e67277) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/P_IOBuffer.h:805
   #1  append_block_internal (b=0x2b819957b600, this=0x2b81994ea800) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/P_IOBuffer.h:805
   #2  append_block (b=0x2b819957b600, this=0x2b81994ea800) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/P_IOBuffer.h:823
   #3  MIOBuffer::write (this=this@entry=0x2b81994ea800, b=0x2b8380a47840, 
alen=alen@entry=8192, offset=<optimized out>) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/IOBuffer.cc:127
   #4  0x00000000007668fd in MIOBuffer::write (this=this@entry=0x2b81994ea800, 
r=r@entry=0x2b81702d0240, len=len@entry=8192, offset=offset@entry=0)
       at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/IOBuffer.cc:96
   #5  0x00000000005df8a0 in rcv_data_frame (cstate=..., frame=...) at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ConnectionState.cc:198
   #6  0x00000000005e49a4 in Http2ConnectionState::main_event_handler(int, 
void*) () at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ConnectionState.cc:1063
   #7  0x00000000005d9139 in handleEvent (data=0x2b7fa9908ee0, event=2253, 
this=0x2b8e76fc3100)
       at 
/sd/workspace/src/git.vzbuilders.com/Edge/build/_build/build_release_posix-x86_64_gcc_8/trafficserver9/build/../../../../_vcs/trafficserver9/iocore/eventsystem/I_Continuation.h:167
   #8  handleEvent (data=0x2b7fa9908ee0, event=2253, this=0x2b8e76fc3100)
       at 
/sd/workspace/src/git.vzbuilders.com/Edge/build/_build/build_release_posix-x86_64_gcc_8/trafficserver9/build/../../../../_vcs/trafficserver9/iocore/eventsystem/I_Continuation.h:163
   #9  send_connection_event(Continuation*, int, void*) () at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ClientSession.cc:65
   #10 0x00000000005d99f7 in Http2ClientSession::do_complete_frame_read 
(this=0x2b8e76fc2e00) at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ClientSession.cc:545
   #11 0x00000000005d9ee5 in Http2ClientSession::state_process_frame_read(int, 
VIO*, bool) () at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ClientSession.cc:564
   #12 0x00000000005da455 in Http2ClientSession::state_complete_frame_read 
(this=0x2b8e76fc2e00, event=100, edata=0x2b95baf0c2d8)
       at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ClientSession.cc:535
   #13 0x00000000005d9443 in Http2ClientSession::main_event_handler 
(this=0x2b8e76fc2e00, event=100, edata=0x2b95baf0c2d8) at 
../../../../../../_vcs/trafficserver9/proxy/http2/Http2ClientSession.cc:331
   #14 0x000000000072bb83 in handleEvent (data=0x2b95baf0c2d8, event=100, 
this=0x2b8e76fc2e00)
       at 
/sd/workspace/src/git.vzbuilders.com/Edge/build/_build/build_release_posix-x86_64_gcc_8/trafficserver9/build/../../../../_vcs/trafficserver9/iocore/eventsystem/I_Continuation.h:167
   #15 handleEvent (data=0x2b95baf0c2d8, event=100, this=0x2b8e76fc2e00)
       at 
/sd/workspace/src/git.vzbuilders.com/Edge/build/_build/build_release_posix-x86_64_gcc_8/trafficserver9/build/../../../../_vcs/trafficserver9/iocore/eventsystem/I_Continuation.h:163
   #16 read_signal_and_update (vc=vc@entry=0x2b95baf0c100, 
event=event@entry=100) at 
../../../../../../_vcs/trafficserver9/iocore/net/UnixNetVConnection.cc:83
   #17 UnixNetVConnection::readSignalAndUpdate (this=this@entry=0x2b95baf0c100, 
event=event@entry=100) at 
../../../../../../_vcs/trafficserver9/iocore/net/UnixNetVConnection.cc:1014
   #18 0x00000000007040d8 in SSLNetVConnection::net_read_io(NetHandler*, 
EThread*) () at 
../../../../../../_vcs/trafficserver9/iocore/net/SSLNetVConnection.cc:672
   #19 0x000000000071fcbe in NetHandler::process_ready_list 
(this=this@entry=0x2b7fa3775360) at 
../../../../../../_vcs/trafficserver9/iocore/net/UnixNet.cc:413
   #20 0x0000000000720130 in NetHandler::waitForActivity(long) () at 
../../../../../../_vcs/trafficserver9/iocore/net/UnixNet.cc:548
   #21 0x000000000076c1e1 in EThread::execute_regular 
(this=this@entry=0x2b7fa37712c0) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/I_PriorityEventQueue.h:115
   #22 0x000000000076c436 in execute (this=0x2b7fa37712c0) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/UnixEThread.cc:332
   #23 EThread::execute (this=0x2b7fa37712c0) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/UnixEThread.cc:310
   #24 0x000000000076a6b9 in spawn_thread_internal (a=0x2b7f9de7f600) at 
../../../../../../_vcs/trafficserver9/iocore/eventsystem/Thread.cc:92
   #25 0x00002b7f9c27bdd5 in start_thread () from /lib64/libpthread.so.0
   #26 0x00002b7f9cfb0ead in clone () from /lib64/libc.so.6
   ```
   
   In any case, the change in HttpSM::tunnel_handler_post_server seems good. 
The original do_io_read's are being set up with tunnel buffers that are very 
soon to be deleted.  I changed the do_io_read's to target the ua_buffer which 
should exist for the lifetime of the HttpSM.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to