New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: TestRequestLimit/h2 becomes significantly more expensive and slower after x/net@v0.23.0 [1.22 backport] #66698
Comments
Just https://go.dev/cl/576756 (sending the correct LastStreamID), which is a bugfix/refinement of the previously backported security fix. https://go.dev/cl/576895 is an improvement to the client behavior, I think, but not directly related. |
Approved as this is a serious performance regression that was introduced by a fix. |
Change https://go.dev/cl/578338 mentions this issue: |
Change https://go.dev/cl/578337 mentions this issue: |
…d flakes This test causes the server to send a GOAWAY and close a connection. The server GOAWAY path writes a GOAWAY frame asynchronously, and closes the connection if the write doesn't complete within 1s. This is causing failures on some builders, when the frame write doesn't complete in time. The important aspect of this test is that the connection be closed. Drop the check for the GOAWAY frame. This is a test-only fix that has no effect on the vendored content, helps tests on this branch, and avoids a merge conflict in next CL. For golang/go#66698. Change-Id: I099413be9c4dfe71d8fe83d2c6242e82e282293e Reviewed-on: https://go-review.googlesource.com/c/net/+/576235 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-on: https://go-review.googlesource.com/c/net/+/578337 Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
…tream-caused GOAWAY When closing a connection because a stream contained a request we didn't like (for example, because the request headers exceed the maximum we will accept), set the LastStreamID in the GOAWAY frame to include the offending stream. This informs the client that retrying the request is unlikely to succeed, and avoids retry loops. This change requires passing the stream ID of the offending stream from Framer.ReadFrame up to the caller. The most sensible way to do this would probably be in the error. However, ReadFrame currently returns a defined error type for connection-ending errors (ConnectionError), and that type is a uint32 with no place to put the stream ID. Rather than changing the returned errors, ReadFrame now returns an error along with a non-nil Frame containing the stream ID, when a stream is responsible for a connection-ending error. Merge conflicts were avoided by cherry-picking CL 576235 (test deflake) prior to this, and then by squashing CL 576175 (typo fix) into this CL. For golang/go#66668. For golang/go#66698. Change-Id: Iba07ccbd70ab4939aa56903605474d01703ac6e4 Reviewed-on: https://go-review.googlesource.com/c/net/+/576756 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-on: https://go-review.googlesource.com/c/net/+/578338 Reviewed-by: Than McIntosh <thanm@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Change https://go.dev/cl/578358 mentions this issue: |
Pull in CL 578338: db050b07 http2: send correct LastStreamID in stream-caused GOAWAY For #66668. Fixes #66698. Change-Id: Ie7cbc44cd559eb8bc34f6c4ad4ead678ec2f55ef Reviewed-on: https://go-review.googlesource.com/c/go/+/578358 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Closed by merging d6c972a to release-branch.go1.22. |
@neild requested issue #66668 to be considered for backport to the next 1.22 minor release.
The text was updated successfully, but these errors were encountered: