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: Transport leaks net.Conns if connections never become idle [1.13 backport] #33878

Closed
gopherbot opened this issue Aug 27, 2019 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #33849 to be considered for backport to the next 1.13 minor release.

@gopherbot, please backport to Go 1.13: this is a regression from 1.12.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 27, 2019
@bcmills bcmills added the CherryPickApproved Used during the release process for point releases label Aug 27, 2019
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Aug 27, 2019
@bcmills bcmills added this to the Go1.13 milestone Aug 27, 2019
@gopherbot
Copy link
Author

Change https://golang.org/cl/191967 mentions this issue: [release-branch.go1.13] net/http: fix wantConnQueue memory leaks in Transport

@gopherbot
Copy link
Author

Closed by merging 44a66ac to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Aug 27, 2019
…ransport

I'm trying to keep the code changes minimal for backporting to Go 1.13,
so it is still possible for a handful of entries to leak,
but the leaks are now O(1) instead of O(N) in the steady state.

Longer-term, I think it would be a good idea to coalesce idleMu with
connsPerHostMu and clear entries out of both queues as soon as their
goroutines are done waiting.

Cherry-picked from CL 191964.

Updates #33849
Updates #33850
Fixes #33878

Change-Id: Ia66bc64671eb1014369f2d3a01debfc023b44281
Reviewed-on: https://go-review.googlesource.com/c/go/+/191964
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 94bf9a8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/191967
@golang golang locked and limited conversation to collaborators Aug 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants