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

sync: Pool does not release memory on GC #8979

Closed
dvyukov opened this issue Oct 22, 2014 · 2 comments
Closed

sync: Pool does not release memory on GC #8979

dvyukov opened this issue Oct 22, 2014 · 2 comments

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Oct 22, 2014

Reported on golang-nuts:
https://groups.google.com/d/msg/golang-nuts/6vxv4xRPT38/bKzf1oM7v8cJ

sync.Pool does not release memory on GC

Introduced in:
https://code.google.com/p/go/source/detail?r=ad21d6ca5d82#

Marking as Release-Go1.3.4 so that we can decide later if we ever do 1.3.4.
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 22, 2014

Comment 1:

CL https://golang.org/cl/162980043 mentions this issue.
@dvyukov
Copy link
Member Author

@dvyukov dvyukov commented Oct 22, 2014

Comment 2:

This issue was closed by revision af3868f.

Status changed to Fixed.

@dvyukov dvyukov added fixed labels Oct 22, 2014
@rsc rsc removed the release-go1.3.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes golang#8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes golang#8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes golang#8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes golang#8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
Pool memory was only being released during the first GC after the first Put.

Put assumes that p.local != nil means p is on the allPools list.
poolCleanup (called during each GC) removed each pool from allPools
but did not clear p.local, so each pool was cleared by exactly one GC
and then never cleared again.

This bug was introduced late in the Go 1.3 release cycle.

Fixes golang#8979.

LGTM=rsc
R=golang-codereviews, bradfitz, r, rsc
CC=golang-codereviews, khr
https://golang.org/cl/162980043
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.