Repository navigation
Preserve completed HTTP/2 responses after repeated stream resets - #137255
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
ManickaP
reviewed
Nov 10, 2026
ManickaP
left a comment
Member
There was a problem hiding this comment.
This demonstrates the repeated-reset race, not the reported production attribution or the separate GOAWAY + FIN scenario.
Can we also add a test for the GO_AWAY?
The product code change looks good though.
Clarify test synchronization names and bound the blocked body read. Co-authored-by: Copilot App <[email protected]>
Use scoped response and server-owned connection cleanup, release the upload gate on stream disposal, and bound the response wait. Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 23, 2026
ManickaP
approved these changes
Nov 24, 2026
krwq
enabled auto-merge (squash)
November 25, 2026 09:13
Member
Author
CI Failures analysis
|
Member
Author
|
/ba-g The only unmatched failure is the dead-lettered iOS CoreCLR.R2R.Test, tracked in dotnet/dnceng#6790. Its work-item logs are missing, leaving no specific test error for Build Analysis to match. This startup smoke test does not exercise HTTP/2; all other failures are already matched to known issues. |
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.
Note
This pull request description was generated with GitHub Copilot.
When a server sends a complete HTTP/2 response followed by
RST_STREAM(NO_ERROR), we stop uploading the request body and keep the response, as required by RFC 9113 §8.1. However, if another reset arrives before the upload task observes cancellation, it can still discard the completed response and fail the request.For applications sending large request bodies, this can make an early server response intermittently look like a network failure. Preserving the response lets callers handle the server's actual status and body instead of losing that information to a stream-reset exception.
Ignore subsequent reset notifications once the request body has been abandoned this way. The existing handling of the first reset and errors before the response completes stays unchanged.
Add a deterministic regression test using non-duplex
StreamContent. It holds the upload open until a matching PING acknowledgment confirms that both resets have been processed, then checks that the original response is returned. The test coversSTREAM_CLOSEDwith both completion options, plusCANCELandINTERNAL_ERROR, and cleans up the connection and pending send on every exit path.Validation
Validated on Windows x64 with locally built Debug libraries and Release CoreCLR:
SocketsHttpHandlerTest_Http2pass with outer-loop coverage enabled, with no skips.git diff --checkpasses.The full functional test suite and other platforms were not run. This demonstrates the repeated-reset race, not the reported production attribution or the separate GOAWAY + FIN scenario.
Fixes #135063