bryancall opened a new pull request, #13834: URL: https://github.com/apache/trafficserver/pull/13834
`h2_to_origin_safe_retry`, added in [#13447](https://github.com/apache/trafficserver/pull/13447), fails now and then in autest shard 1of4, usually with a 502 to the client. The failures come from how the test's Python origin, `safe_retry_origin.py`, ends its connections, not from ATS. The origin closed its socket as soon as it wrote its last frame. ATS often has a SETTINGS ACK in flight at that point, and closing a socket that still holds unread input makes Linux reset the connection, which can drop the response the origin just wrote. The goaway, goaway-reserved, goaway-drain-above and early-rst retries failed this way on a busy machine. The origin now shuts down its sending side and reads until ATS closes before it closes the socket. It does this on a background thread so it can still accept the new connection ATS opens for a retry. The early-rst origin also closes its connection right after the reset. ATS can take that session back from the pool for the retry before it reads the close, and it then correctly declines to replay a POST written to a connection that closed without a response. That scenario now sets `server_session_sharing.match` to `none`, so its retry always opens a new connection. The other scenarios keep `ip` matching and still cover a retry on a reused connection. Testing: in the `ci.trafficserver.apache.org/ats/fedora:44` image, with 32 copies of the test running in parallel, master failed 39 of 640 runs on one machine, and 135 of 800 on a second machine with CPU load added. With this change it failed 0 of 640 and 0 of 800, although ATS admitted the early-rst retry before reading the origin's close in 596 and 437 of those runs. To check that the test still catches a broken retry, I built ATS so it never admits a not-processed retry. The changed test failed on that build in all 4 runs, on the same 12 checks as the original test. -- 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]
