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: TestClientTimeoutCancel is flaky #34658

Closed
bcmills opened this issue Oct 2, 2019 · 14 comments
Closed

net/http: TestClientTimeoutCancel is flaky #34658

bcmills opened this issue Oct 2, 2019 · 14 comments
Assignees
Labels
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Oct 2, 2019

From the linux-ppc64le-power9osu (https://build.golang.org/log/bc146619a7844f5eadaff5632418865af83dacf4):

--- FAIL: TestClientTimeoutCancel (0.00s)
    client_test.go:1353: error = read tcp 127.0.0.1:42466->127.0.0.1:40975: use of closed network connection; want errRequestCanceled
FAIL
FAIL	net/http	7.264s

CC @laboger @bradfitz

@ceseo
Copy link
Contributor

@ceseo ceseo commented Oct 2, 2019

I'll take a look.

@ceseo
Copy link
Contributor

@ceseo ceseo commented Oct 2, 2019

I tried a standalone build in that system and can't reproduce. Can't reproduce in any of my POWER9 systems as well. Looks like it's one of those intermittent failures.

@laboger
Copy link
Contributor

@laboger laboger commented Oct 7, 2019

@ceseo I think you need to try and reproduce using GOMAXPROCS=2 since that is the number of processors on the build systems.

@bcmills bcmills changed the title net/http: TestClientTimeoutCancel flake on linux-ppc64le-power9osu builder net/http: TestClientTimeoutCancel is flaky Nov 8, 2019
@bcmills bcmills modified the milestones: Unplanned, Backlog Nov 11, 2019
@bcmills
Copy link
Member Author

@bcmills bcmills commented Dec 10, 2020

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 20, 2021

Change https://golang.org/cl/303489 mentions this issue: net/http: fix request cancellation race

@neild
Copy link
Contributor

@neild neild commented Mar 20, 2021

This was really hard to track down.

The problem is that (*Transport).cancelRequest calls a per-request cancellation function, but a racing call to cancelRequest can return before that function has been called.

@neild neild self-assigned this Mar 20, 2021
@gopherbot gopherbot closed this in 6f62f85 Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants