bneradt opened a new pull request, #13114:
URL: https://github.com/apache/trafficserver/pull/13114

   Production crash logs show ink_assert(0) firing in 
HttpTransact::update_size_and_time_stats from HttpSM::update_stats via 
HttpSM::kill_this, triggered by an Http2Stream event re-entering the state 
machine while background_fill was still in the STARTED state. The 
background_fill state is normally driven to a terminal value (COMPLETED or 
ABORTED) by tunnel_handler_server, but when the SM is torn down before that 
handler runs the state stays STARTED and the unreachable default branch in 
update_size_and_time_stats asserts. The same path also leaks 
proxy.process.http.background_fill_current_count because tunnel_handler_server 
is the only site that decrements the gauge after tunnel_handler_ua incremented 
it.
   
   This normalizes STARTED to ABORTED at the top of HttpSM::update_stats and 
decrements the gauge there, so the accounting balances and the downstream stats 
helper sees a terminal state. As a defensive backstop it also folds the STARTED 
case into the ABORTED branch of update_size_and_time_stats so a future caller 
that reaches this point mid-fill records the bytes against 
background_fill_bytes_aborted instead of crashing the server.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to