Skip to content
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: access to written data after ResponseWriter.Write returns #58446

Closed
neild opened this issue Feb 9, 2023 · 3 comments
Closed

net/http: access to written data after ResponseWriter.Write returns #58446

neild opened this issue Feb 9, 2023 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@neild
Copy link
Contributor

neild commented Feb 9, 2023

The HTTP/2 ResponseWriter can access the contents of the slice passed to Write after Write returns.

  • When closing a stream while a write is in progress.
  • When shutting down the server while a write is in progress.

This is a violation of the io.Writer contract, and responsible for a number of recent net/http flakes.

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 9, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/467055 mentions this issue: http2: wait for in-progress writes after a stream is closed

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/467355 mentions this issue: http2: avoid referencing ResponseWrite.Write parameter after returning

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/467657 mentions this issue: all: update vendored golang.org/x/net

gopherbot pushed a commit that referenced this issue Feb 13, 2023
Pull in HTTP/2 fix to deflake builders:

    547e7edf38 http2: avoid referencing ResponseWrite.Write parameter after returning

For #58446

Change-Id: I7f3666bc1f20ee03a7ccf25f0e091033cbc635d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/467657
Auto-Submit: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 13, 2023
@dmitshur dmitshur added this to the Go1.21 milestone Feb 13, 2023
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 22, 2023
Pull in HTTP/2 fix to deflake builders:

    547e7edf38 http2: avoid referencing ResponseWrite.Write parameter after returning

For golang#58446

Change-Id: I7f3666bc1f20ee03a7ccf25f0e091033cbc635d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/467657
Auto-Submit: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants