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
Assignees
Milestone

Comments

@mknyszek
Copy link
Contributor

@mknyszek 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 this to the Go1.14 milestone Nov 26, 2019
@mknyszek mknyszek self-assigned this Nov 26, 2019
@mknyszek

This comment has been minimized.

Copy link
Contributor Author

@mknyszek mknyszek commented Nov 26, 2019

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

@mknyszek mknyszek removed the NeedsFix label Nov 26, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 26, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.