Repository navigation
http2: deflake DownstreamConnectionDurationTimeoutTriggersFloodProtection - #49209
Merged
Merged
Conversation
…tion The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Risk Level: Low (test only) Testing: See above Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Signed-off-by: Ryan Northey <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the test-only change aimed at reducing HTTP/2 connection-duration test flakiness.
No open issues 🎉
What changed in this PR
Reduces timing-related flakiness in the HTTP/2 connection-duration flood-protection test, addressing #28733 without changing production behavior.
Changes:
- Extracts
sendPrefillRequest()to send the pre-fill request without waiting for the queue to fill. - Updates the duration-timeout test to wait directly for disconnect, preserving the existing helper behavior for other tests.
| File | Description |
|---|---|
test/integration/http2_flood_integration_test.cc |
Separates request setup from queue-state waits to avoid racing with the connection-duration timer. |
Review effort: Balanced
ravenblackx
approved these changes
Nov 12, 2026
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 13, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 16, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 16, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
that referenced
this pull request
Nov 17, 2026
…tion (#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. #28733 reported the same failure on the same variant in 2023. Fixes #28733 Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
that referenced
this pull request
Nov 17, 2026
…tion (#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. #28733 reported the same failure on the same variant in 2023. Fixes #28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 18, 2026
…tion (envoyproxy#49209) The test sets `max_connection_duration` to 1s and then pre-fills the downstream outbound queue. The duration timer runs from when the connection is made, so it also covers the pre-fill, and the pre-fill helper waits to see `http2.outbound_frames_active` at exactly 1000. If the timer fires before the test thread has seen that, the GOAWAY overflows the queue and the connection closes, which is what the test is after, but the gauge drops to 0 and the helper times out with "current value 0" and `http2.outbound_flood` already at 1. This splits sending the pre-fill request out of the helper, and the test uses that and waits for the disconnect, without waiting on the state of the queue in between. The response and the GOAWAY are one frame over the limit together, so nothing has to be seen before the timer fires. The other users of the helper do not change. Additional Description: Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the pre-fill normally fits in the second with little to spare. It did not reproduce in 1000 runs of the test or 100 runs of the suite under tsan on a quiet cluster. Stalling the test thread for 1.5s after the pre-fill request is sent reproduces the exact symptom in 20 of 20 runs on all four variants. With this change the test passes 500 of 500 runs under tsan. It also passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20 of 20 with the stall after that but before the request is sent, so it holds when the timer fires first. envoyproxy#28733 reported the same failure on the same variant in 2023. Fixes envoyproxy#28733 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 0dfc464) Signed-off-by: Ryan Northey <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test sets
max_connection_durationto 1s and then pre-fills thedownstream outbound queue. The duration timer runs from when the
connection is made, so it also covers the pre-fill, and the pre-fill
helper waits to see
http2.outbound_frames_activeat exactly 1000. Ifthe timer fires before the test thread has seen that, the GOAWAY
overflows the queue and the connection closes, which is what the test
is after, but the gauge drops to 0 and the helper times out with
"current value 0" and
http2.outbound_floodalready at 1.This splits sending the pre-fill request out of the helper, and the
test uses that and waits for the disconnect, without waiting on the
state of the queue in between. The response and the GOAWAY are one
frame over the limit together, so nothing has to be seen before the
timer fires. The other users of the helper do not change.
Additional Description:
Seen under tsan on IPv4Oghttp2. The test takes about 2s there, so the
pre-fill normally fits in the second with little to spare. It did not
reproduce in 1000 runs of the test or 100 runs of the suite under tsan
on a quiet cluster. Stalling the test thread for 1.5s after the
pre-fill request is sent reproduces the exact symptom in 20 of 20 runs
on all four variants.
With this change the test passes 500 of 500 runs under tsan. It also
passes 20 of 20 with a 1.5s stall before the socket is blocked, and 20
of 20 with the stall after that but before the request is sent, so it
holds when the timer fires first.
#28733 reported the same failure on the same variant in 2023.
Fixes #28733
Risk Level: Low (test only)
Testing: See above
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A