Skip to content

Assert with POST request #3239

@shinrich

Description

@shinrich

We've just merged the 7.1.2 changes into our production build. Last night we crashed with the following stack.

#0  0x00002ab7986c2495 in raise () from /lib64/libc.so.6
#1  0x00002ab7986c3bfd in abort () from /lib64/libc.so.6
#2  0x00002ab795f7879a in ink_abort (message_format=0x2ab795f991bc "%s:%d: failed assertion `%s`") at ../../../../trafficserver/lib/ts/ink_error.cc:99
#3  0x00002ab795f758e0 in _ink_assert (expression=0x8287d2 "0", file=0x828700 "../../../../trafficserver/proxy/http/HttpTunnel.cc", line=1427)
    at ../../../../trafficserver/lib/ts/ink_assert.cc:37
#4  0x000000000066d5a6 in HttpTunnel::consumer_handler (this=0x2ab8524f4c78, event=100, c=0x2ab8524f4cb8) at ../../../../trafficserver/proxy/http/HttpTunnel.cc:1427
#5  0x000000000066dba1 in HttpTunnel::main_handler (this=0x2ab8524f4c78, event=100, data=0x2ab295e0e6a0) at ../../../../trafficserver/proxy/http/HttpTunnel.cc:1633
#6  0x000000000053c692 in Continuation::handleEvent (this=0x2ab8524f4c78, event=100, data=0x2ab295e0e6a0)
    at /var/builds/workspace/157188-v3-component/BUILD_CONTAINER/rhel6-gcc5_5/label/DOCKER-HIGH/app_root/_build/ats_build/../../trafficserver/iocore/eventsystem/I_Continuation.h:153
#7  0x00000000006760d8 in Http2Stream::update_read_request (this=0x2ab295e0e370, read_len=9223372036854775807, call_update=true)
    at ../../../../trafficserver/proxy/http2/Http2Stream.cc:495
#8  0x0000000000681827 in rcv_data_frame (cstate=..., frame=...) at ../../../../trafficserver/proxy/http2/Http2ConnectionState.cc:174
#9  0x0000000000684d61 in Http2ConnectionState::main_event_handler (this=0x2ab617f22590, event=2253, edata=0x2ab86d5e78d0)
    at ../../../../trafficserver/proxy/http2/Http2ConnectionState.cc:907
#10 0x000000000053c692 in Continuation::handleEvent (this=0x2ab617f22590, event=2253, data=0x2ab86d5e78d0)
    at /var/builds/workspace/157188-v3-component/BUILD_CONTAINER/rhel6-gcc5_5/label/DOCKER-HIGH/app_root/_build/ats_build/../../trafficserver/iocore/eventsystem/I_Continuation.h:153
#11 0x000000000067d5fd in send_connection_event (cont=0x2ab617f22590, event=2253, edata=0x2ab86d5e78d0) at ../../../../trafficserver/proxy/http2/Http2ClientSession.cc:58
#12 0x000000000067f9b9 in Http2ClientSession::do_complete_frame_read (this=0x2ab617f22330) at ../../../../trafficserver/proxy/http2/Http2ClientSession.cc:488
#13 0x000000000067fa63 in Http2ClientSession::state_process_frame_read (this=0x2ab617f22330, event=100, vio=0x2aacf0e19700, inside_frame=true)
    at ../../../../trafficserver/proxy/http2/Http2ClientSession.cc:501
#14 0x000000000067f91a in Http2ClientSession::state_complete_frame_read (this=0x2ab617f22330, event=100, edata=0x2aacf0e19700)
    at ../../../../trafficserver/proxy/http2/Http2ClientSession.cc:478
#15 0x000000000067e94f in Http2ClientSession::main_event_handler (this=0x2ab617f22330, event=100, edata=0x2aacf0e19700)
    at ../../../../trafficserver/proxy/http2/Http2ClientSession.cc:323
#16 0x000000000053c692 in Continuation::handleEvent (this=0x2ab617f22330, event=100, data=0x2aacf0e19700)
    at /var/builds/workspace/157188-v3-component/BUILD_CONTAINER/rhel6-gcc5_5/label/DOCKER-HIGH/app_root/_build/ats_build/../../trafficserver/iocore/eventsystem/I_Continuation.h:153
#17 0x00000000007c6434 in read_signal_and_update (event=100, vc=0x2aacf0e195d0) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:144
#18 0x00000000007c93ce in UnixNetVConnection::readSignalAndUpdate (this=0x2aacf0e195d0, event=100) at ../../../../trafficserver/iocore/net/UnixNetVConnection.cc:1092
#19 0x00000000007a1594 in SSLNetVConnection::net_read_io (this=0x2aacf0e195d0, nh=0x2ab79b686c50, lthread=0x2ab79b683010)
    at ../../../../trafficserver/iocore/net/SSLNetVConnection.cc:599
#20 0x00000000007bddf5 in NetHandler::waitForActivity (this=0x2ab79b686c50, timeout=39984786) at ../../../../trafficserver/iocore/net/UnixNet.cc:497
#21 0x00000000007eaa4f in EThread::execute_regular (this=0x2ab79b683010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:232
#22 0x00000000007eab25 in EThread::execute (this=0x2ab79b683010) at ../../../../trafficserver/iocore/eventsystem/UnixEThread.cc:262
#23 0x00000000007e9ab2 in spawn_thread_internal (a=0x24a1f60) at ../../../../trafficserver/iocore/eventsystem/Thread.cc:85
#24 0x00002ab798a2baa1 in start_thread () from /lib64/libpthread.so.0
#25 0x00002ab798778bcd in clone () from /lib64/libc.so.6

The immediate cause of the assert is that the H2 client sent data and the read ready was sent to a consumer because there was no producer set. The state machine is in the process of sending the request to the origin. So the ua_entry handler is set to watch_for_client_abort. The method is POST. So I assume that the client is sending post data while, we are sending the request to origin, which should be perfectly fine, and would be correctly handled in the past.

As a recall, while we are in the watch_for_client abort case, the read request is set to length 0, so no read_ready_event would be sent until the state machine had completed sending the request to origin and had set up the tunnel to send the post data to the origin.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions