Repository navigation
Conversation
The random write scheduler, which both HTTP/2 servers use by default, queued RST_STREAM frames behind the stream's DATA frames. A stream whose peer stopped reading could then never be reset: the RST_STREAM waited for flow control that would not come. Port golang.org/x/net/http2 04296fa8 (CL 367154, golang/go#49741) to http2 and to the bundled server in h2_bundle.go: RST_STREAM frames are queued with the control frames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 random write scheduler, the default for both HTTP/2 servers (
http2.Serverand the one bundled inh2_bundle.go), queued an RST_STREAM behind the DATA frames already waiting on that stream. If the peer stops reading, those DATA frames wait for flow control that never comes, and the RST_STREAM that would end the stream waits behind them, so the stream can never be reset.This ports golang.org/x/net/http2 04296fa8 (CL 367154, golang/go#49741): RST_STREAM frames go into the control-frame queue. The
http2change, including its tests, is that commit unchanged;h2_bundle.gogets the same change.Tests:
TestRandomSchedulerandTestFrameWriteRequestWithDatainhttp2are from the x/net commit.TestBundledRandomSchedulerRSTStreamFirstcovers the bundled copy, which has no scheduler tests of its own.TestRandomSchedulerand the bundled test fail on master and pass here.go test ./...passes; the scheduler tests also pass with-race.🤖 Generated with Claude Code