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: server ignores GOAWAY #17800

Closed
tombergan opened this issue Nov 4, 2016 · 5 comments
Closed

x/net/http2: server ignores GOAWAY #17800

tombergan opened this issue Nov 4, 2016 · 5 comments

Comments

@tombergan
Copy link
Contributor

@tombergan tombergan commented Nov 4, 2016

processFrame doesn't handle GOAWAY:
https://github.com/golang/net/blob/master/http2/server.go#L1137

Firefox apparently sends GOAWAY after a connection is idle, but this frame is ignored by our http2 server. With VerboseLogs=true, I see:

2016/11/04 21:27:28 http2: server read frame GOAWAY len=8 LastStreamID=2 ErrCode=NO_ERROR Debug=""
2016/11/04 21:27:28 http2: server ignoring frame: [FrameHeader GOAWAY len=8]

Is this intentional?

/cc @bradfitz

@quentinmit quentinmit added this to the Go1.8Maybe milestone Nov 4, 2016
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Nov 4, 2016

What should the server do? I forget what the spec says here. Intuitively, I'd think the server doesn't care if the client wants to go away.

@tombergan

This comment has been minimized.

Copy link
Contributor Author

@tombergan tombergan commented Nov 4, 2016

I just reread Section 6.8. The main effects of GOAWAY are: (a) it tells the peer which requests have been processed, and (b) it stops the peer from creating new requests (so the connection eventually quiesces and shuts down gracefully).

(a) is only meaningful when the server tells the client to GOAWAY (so the client knows which POSTs were handled). (b) means the server shouldn't send new pushes. So maybe the only effect is that the server should disable push upon receiving a GOAWAY?

I agree this doesn't seem very important.

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Nov 4, 2016

So maybe the only effect is that the server should disable push upon receiving a GOAWAY?

SGTM. Want to send a CL for that?

@tombergan

This comment has been minimized.

Copy link
Contributor Author

@tombergan tombergan commented Nov 5, 2016

Sure, I'll get to that next week.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 8, 2016

CL https://golang.org/cl/32887 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 8, 2017
c3mb0 pushed a commit to c3mb0/net that referenced this issue Apr 2, 2018
Fixes golang/go#17800

Change-Id: Ibcba9302e2e595ae49d9246ecedd332760486441
Reviewed-on: https://go-review.googlesource.com/32887
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.