-
Notifications
You must be signed in to change notification settings - Fork 18k
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: TestCancelRequestWhenSharingConnection failures with nil err instead of Canceled
#55226
Comments
Found new matching flaky dashboard failures for:
2022-09-03 18:21 windows-arm64-10 go@a0f05823 net/http.TestCancelRequestWhenSharingConnection (log)
|
https://storage.googleapis.com/go-build-log/1e6b7c4d/linux-amd64-unified_9f4321a1.log (a (attn @neild) |
a trybot failed on https://go.dev/cl/414954 (linux-amd64-race) |
Change https://go.dev/cl/446676 mentions this issue: |
https://storage.googleapis.com/go-build-log/20b2f437/windows-386-2012_09808bc8.log ( |
The test sleeps for 1 millisecond to give the cancellation a moment to take effect. This is flaky because the request can finish before the cancellation of the context is seen. It's easy to verify by adding time.Sleep(2*time.Millisecond) after https://github.com/golang/go/blob/0a6c4c87404ecb018faf002919e5d5db04c69ee2/src/net/http/transport.go#L2619. With this modification, the test fails about 5 times out of 10 runs. The fix is easy. We just need to block the handler of the second request until this request is cancelled. I have verify that the updated test can uncover the issue fixed by CL 257818. Fixes golang#55226. Change-Id: I81575beef1a920a2ffaa5c6a5ca70a4008bd5f94 GitHub-Last-Rev: 99cb1c2 GitHub-Pull-Request: golang#56500 Reviewed-on: https://go-review.googlesource.com/c/go/+/446676 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Found new dashboard test flakes for:
2022-10-25 20:28 windows-amd64-race go@b95ea201 net/http.TestCancelRequestWhenSharingConnection (log)
2022-10-28 23:35 linux-amd64-race go@b726b0ca net/http.TestCancelRequestWhenSharingConnection (log)
|
These two failures happened before e943dc5 was landed on 2022-11-01. So they are not new. The root cause of this issue is that the second request finishes before the context cancellation is seen. While the root cause of #56587 is that the first request does not finish. I think it is not a duplicate of this one, and it's better to close this one and reopen that one. |
If they have different causes and/or symptoms, then I agree they should be tracked as separate issues, but if that's the case then the issue titles and |
I have commented #56587 with the suggested |
Canceled
Re-closing as probably fixed by CL 446676, since the |
Bug automatically created to track these flakes.
— watchflakes
The text was updated successfully, but these errors were encountered: