maskit commented on issue #7562:
URL: https://github.com/apache/trafficserver/issues/7562#issuecomment-786355180


   The crash happens if a producer is throttled (flow controlled) and 
background fill starts.
   Workaround is to disable flow control 
(`proxy.config.http.flow_control.enabled`).
   
   Here is the detail:
   
   `consumer_handler` calls `HttpSM::tunnel_handler_ua` here
   
https://github.com/apache/trafficserver/blob/e24c79a4a530dc9b12880503e8c047e5610c3224/proxy/http/HttpTunnel.cc#L1317-L1330
   
   And if background fill starts in `HttpSM::tunnel_handler_ua`, a consumer for 
client is closed here.
   
https://github.com/apache/trafficserver/blob/e24c79a4a530dc9b12880503e8c047e5610c3224/proxy/http/HttpSM.cc#L3326-L3329
   
   So the consumer `c` is no longer available at this point.
   
   However, this block somehow calls `consumer_reenable` for the consumer that 
has just been closed, despite the comment.
   
https://github.com/apache/trafficserver/blob/e24c79a4a530dc9b12880503e8c047e5610c3224/proxy/http/HttpTunnel.cc#L1367-L1379
   
   `consumer_reenable` uses the consumer here and ATS crashes, because 
`write_vio` is null.
   
https://github.com/apache/trafficserver/blob/e24c79a4a530dc9b12880503e8c047e5610c3224/proxy/http/HttpTunnel.cc#L1272-L1280
   
   The reenabling above won't happen if flow control is disabled, because 
throttling happens only if flow control is enabled.
   
   


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