Repository navigation
Conversation
The test opens the client's window once upstream_rq_completed reaches 1, expecting the whole 1 MiB body to be buffered in the downstream codec by then. The router charges that counter on the upstream response headers, not the end of the body, so the window could open while the body was still streaming in. Envoy then sends what is pending as one frame and each later upstream chunk as its own, and the test saw 42, 50 or 64 DATA frames where it expected one. Wait on http2.pending_send_bytes reaching the body size instead. Capping oghttp2 DATA frames at 16 KiB (envoyproxy#48514) made the count come out at 64 either way, which hid the race on the default path; the branch with http2_oghttp2_cap_data_frame_payload disabled still asserts a single frame. Signed-off-by: Derek Argueta <[email protected]>
derekargueta
marked this pull request as ready for review
October 28, 2026 05:39
botengyao
approved these changes
Oct 30, 2026
phlax
pushed a commit
to phlax/envoy
that referenced
this pull request
Nov 12, 2026
…oxy#48790) Commit Message: http2: deflake WindowUpdateAfterLargeResponseRealisticClient The test opens the client's window once `upstream_rq_completed` reaches 1, on the assumption that the whole 1 MiB body is buffered in the downstream codec by then. The router charges that counter on the upstream response headers, not at the end of the body, so the window could open while the body was still streaming in. Envoy then sends whatever is pending as one frame and each later upstream chunk as its own, and CI saw 42, 50 or 64 DATA frames where the oghttp2 branch expects 1. This waits for `http2.pending_send_bytes` to reach the body size instead. envoyproxy#48514's 16 KiB cap made the count come out at 64 either way, which hid the race on the default path, but the branch with `http2_oghttp2_cap_data_frame_payload` disabled still asserts a single frame. Additional Description: It failed on 10 changes between 10-11 and 10-23, on msan and tsan, always at the `data_frames` check. It hasn't failed since envoyproxy#48514 landed, because no CI job runs with the cap disabled, so this fixes the wait rather than a flake CI can still hit. To reproduce, I had the autonomous upstream send the 1 MiB body 500ms after the headers, from another thread, with the cap disabled. With the old wait, `pending_send_bytes` was 0 when the wait returned and oghttp2 sent 64 frames, failing every run. With the new wait the test waits out the delay, gets 1 frame, and passes 12/12. AI Disclaimer: code change created with AI assistance, fully reviewed by me prior to opening. Risk Level: Low (test only) Testing: - delayed-body repro above, cap disabled: fails on both oghttp2 params before, 12/12 pass after - `bazel test //test/integration:http2_flood_integration_test --runs_per_test=5`: pass (macOS arm64, fastbuild) Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Signed-off-by: Derek Argueta <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
jwendell
pushed a commit
that referenced
this pull request
Nov 12, 2026
Commit Message: http2: deflake WindowUpdateAfterLargeResponseRealisticClient The test opens the client's window once `upstream_rq_completed` reaches 1, on the assumption that the whole 1 MiB body is buffered in the downstream codec by then. The router charges that counter on the upstream response headers, not at the end of the body, so the window could open while the body was still streaming in. Envoy then sends whatever is pending as one frame and each later upstream chunk as its own, and CI saw 42, 50 or 64 DATA frames where the oghttp2 branch expects 1. This waits for `http2.pending_send_bytes` to reach the body size instead. #48514's 16 KiB cap made the count come out at 64 either way, which hid the race on the default path, but the branch with `http2_oghttp2_cap_data_frame_payload` disabled still asserts a single frame. Additional Description: It failed on 10 changes between 10-11 and 10-23, on msan and tsan, always at the `data_frames` check. It hasn't failed since #48514 landed, because no CI job runs with the cap disabled, so this fixes the wait rather than a flake CI can still hit. To reproduce, I had the autonomous upstream send the 1 MiB body 500ms after the headers, from another thread, with the cap disabled. With the old wait, `pending_send_bytes` was 0 when the wait returned and oghttp2 sent 64 frames, failing every run. With the new wait the test waits out the delay, gets 1 frame, and passes 12/12. AI Disclaimer: code change created with AI assistance, fully reviewed by me prior to opening. Risk Level: Low (test only) Testing: - delayed-body repro above, cap disabled: fails on both oghttp2 params before, 12/12 pass after - `bazel test //test/integration:http2_flood_integration_test --runs_per_test=5`: pass (macOS arm64, fastbuild) Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Signed-off-by: Derek Argueta <[email protected]> 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.
Commit Message: http2: deflake WindowUpdateAfterLargeResponseRealisticClient
The test opens the client's window once
upstream_rq_completedreaches 1, on the assumption that the whole 1 MiB body is buffered in the downstream codec by then. The router charges that counter on the upstream response headers, not at the end of the body, so the window could open while the body was still streaming in. Envoy then sends whatever is pending as one frame and each later upstream chunk as its own, and CI saw 42, 50 or 64 DATA frames where the oghttp2 branch expects 1.This waits for
http2.pending_send_bytesto reach the body size instead. #48514's 16 KiB cap made the count come out at 64 either way, which hid the race on the default path, but the branch withhttp2_oghttp2_cap_data_frame_payloaddisabled still asserts a single frame.Additional Description:
It failed on 10 changes between 10-11 and 10-23, on msan and tsan, always at the
data_framescheck. It hasn't failed since #48514 landed, because no CI job runs with the cap disabled, so this fixes the wait rather than a flake CI can still hit.To reproduce, I had the autonomous upstream send the 1 MiB body 500ms after the headers, from another thread, with the cap disabled. With the old wait,
pending_send_byteswas 0 when the wait returned and oghttp2 sent 64 frames, failing every run. With the new wait the test waits out the delay, gets 1 frame, and passes 12/12.AI Disclaimer: code change created with AI assistance, fully reviewed by me prior to opening.
Risk Level: Low (test only)
Testing:
bazel test //test/integration:http2_flood_integration_test --runs_per_test=5: pass (macOS arm64, fastbuild)Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A