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

runtime: debug.FreeOSMemory not freeing memory #35858

Closed
mknyszek opened this issue Nov 26, 2019 · 2 comments
Closed

runtime: debug.FreeOSMemory not freeing memory #35858

mknyszek opened this issue Nov 26, 2019 · 2 comments

Comments

@mknyszek
Copy link
Contributor

mknyszek commented Nov 26, 2019

At tip, debug.FreeOSMemory isn't doing what its documentation is saying it will do. Notably, HeapReleased doesn't increase all the way to HeapIdle. This failure is obvious in https://github.com/savalin/example/blob/master/main.go and this was discovered in investigating #35848.

This is happening because the changes to debug.FreeOSMemory in the page allocator don't do the right thing. The fix is to reset the scavenger address, then scavenge.

This may need to block the beta, but the fix is known and easy. I will put up a change ASAP.

CC @aclements @andybons

@mknyszek mknyszek added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 26, 2019
@mknyszek mknyszek added this to the Go1.14 milestone Nov 26, 2019
@mknyszek mknyszek self-assigned this Nov 26, 2019
@mknyszek
Copy link
Contributor Author

I've uploaded a fix which I've confirmed resolves the issue.

@mknyszek mknyszek removed the NeedsFix The path to resolution is known, but the work has not been done. label Nov 26, 2019
@gopherbot
Copy link

Change https://golang.org/cl/208960 mentions this issue: runtime: reset scavenge address in scavengeAll

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants