-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: TestServerKeepAlivesEnabled_h2 test flake #18083
Comments
Wild guess: The server becomes "idle" before it sends the GOAWAY: The test sends the second request after the server has transitioned to "idle": Line 5030 in 409a667
The test can make the second getURL call before receiving the GOAWAY. However, the h2 transport doesn't retry a request when the following code executes before GOAWAY is actually received: There is a race: if the client sends a new request on stream n+2, then shortly afterwards receives GOAWAY(lastStream=n), the client won't auto-retry that request on a new connection. Auto-retry happens only if RoundTrip gets to line 679 after the GOAWAY is received. There is arguably a second bug, though this isn't the root cause of the test flake: the server transitions to idle at the line below even though there may still be response frames queued in the write scheduler. (Is it really correct to consider the server "idle" at this point?) Finally, I noticed a third bug: the following code should check curClientStreams+curPushedStreams==0 rather than curClientStreams==0: |
CL https://golang.org/cl/33972 mentions this issue. |
CL https://golang.org/cl/33971 mentions this issue. |
This is not a problem. At the end of sc.closeStream, the call to writeSched.CloseStream will discard any frames queued for that stream.
This is a bug. Sending a CL. |
CL https://golang.org/cl/33974 mentions this issue. |
Update golang/go#18083 Change-Id: I2600f8a7a0d3a630003c010496a7fceca1b9f660 Reviewed-on: https://go-review.googlesource.com/33974 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]>
Debugged & wrote with Tom Bergan. Updates golang/go#18083 Change-Id: I00a1cb748fe9c0f01c5bd4b8d1ac4438b56f1f8c Reviewed-on: https://go-review.googlesource.com/33971 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Tom Bergan <[email protected]>
CL https://golang.org/cl/34011 mentions this issue. |
linux-amd64-race at 789e14c1aa487f83d6e99f369b22c4fa60bf6f4c
https://storage.googleapis.com/go-build-log/789e14c1/linux-amd64-race_7fc53188.log
The text was updated successfully, but these errors were encountered: