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

x/net/http2: RSTStream stream error write scheduling might panic with priority scheduler #17919

bradfitz opened this issue Nov 15, 2016 · 1 comment


Copy link

@bradfitz bradfitz commented Nov 15, 2016

Follow-up to for #17243

With the priority write scheduler, it's possible that the Server could generate a RSTStream write that would then crash the write scheduler I think. Perhaps if the user sends a bogus frame to an un-opened stream or something and then we reply with RST_STREAM?


Doesn't affect Go 1.8, which will ship with the random write scheduler still.

@bradfitz bradfitz added this to the Unreleased milestone Nov 15, 2016
Copy link

@gopherbot gopherbot commented Nov 15, 2016

CL mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 15, 2017
c3mb0 pushed a commit to c3mb0/net that referenced this issue Apr 2, 2018 fixed scheduling of RST_STREAMs so
they are added to the appropriate stream queue. However, RST_STREAM may be
sent before OpenStream or after CloseStream in certain error cases, such as:

In these cases, the failing stream has no queue and in priorityWriteScheduler.Push
will panic. A simple fix is to add RST_STREAMs to the root queue when the stream
queue doesn't exist. This is correct because:

- RST_STREAM is tiny and doesn't use flow control bytes, so prioritization is
  not important.

- The server should not send any frames on a stream after sending RST_STREAM,
  but even if that happens, the RST_STREAM will be ordered before those other
  frames because the control queue has the highest priority.

Fixes golang/go#17919

Change-Id: I2e8101f015822ef975303a1fe87634b36afbdc6b
Reviewed-by: Brad Fitzpatrick <>
Run-TryBot: Brad Fitzpatrick <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants