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: deadlock after leaked transport detected in TestConsumingBodyOnNextConn #42943

Open
bcmills opened this issue Dec 2, 2020 · 9 comments
Open

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 2, 2020

2020-12-01T21:42:10-7fca39a/linux-386-longtest

This is the only failure in the logs matching the regexp (?ms)Test appears to have leaked a Transport.*test timed out. It may be a secondary failure mode associated with #42942, or a different regression from CL 213277, or a latent bug that just happened to turn up now.

CC @neild @fraenkel @bradfitz @nhooyr

@bcmills
Copy link
Member Author

@bcmills bcmills commented Dec 2, 2020

Marking as release-blocker for 1.16 at least until we understand whether this is a regression. (CC @golang/release)

@bcmills bcmills changed the title net/http net/http: deadlock after leaked transport detected in TestConsumingBodyOnNextConn Dec 2, 2020
@bcmills bcmills added this to the Go1.16 milestone Dec 2, 2020
@nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Dec 2, 2020

I believe this issue is unrelated to the recent change I submitted. My change only modifies how http.Server behaves when keep alives are disabled but they are enabled in the problematic test.

@nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Dec 2, 2020

As far as I can tell, the affected test also doesn't use http.Transport anywhere. It's a leak from a different test.

@nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Dec 2, 2020

Ah I see, the test I submitted isn't closing rwc. Pushing a fix.

@nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Dec 2, 2020

Actually nvm, the body is being closed above before being asserted into a rwc.

@nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Dec 2, 2020

As far as I can tell, the affected test also doesn't use http.Transport anywhere. It's a leak from a different test.

So in order for the afterTest leak test to run, t.Short() must be false which also means the tests aren't running in parallel, so I guess I'm wrong, the test must be using http.Transport somewhere. Or there's a test that doesn't have the preceding setParallel call.

@fraenkel
Copy link
Contributor

@fraenkel fraenkel commented Dec 3, 2020

Most likely related to #42942 given the goroutine stuck on line 2605.

@toothrot
Copy link
Contributor

@toothrot toothrot commented Dec 10, 2020

/cc @neild

@toothrot
Copy link
Contributor

@toothrot toothrot commented Dec 10, 2020

Labeling as okay-after-beta1, but still considering this a release blocking issue. Please comment if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.