-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: memory of finished goroutines not freed #65864
Comments
In short period of time ? If so, it might related to #9869 ? |
1.19 isn't a supported version anymore (currently 1.22 and 1.21). |
It is true that we never free a Which is to say, maybe we could do this, but it isn't trivial. Is there a situation where this is actually causing a problem? Most servers, at least in steady state, would reuse these |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go version go1.19 windows/amd64
Output of
go env
in your module/workspace:What did you do?
I have observed that after creating a large number of Goroutines, the memory does not seem to be released back to the system. Specifically, I suspect there might be an issue with the
sched.gFree.noStack
in proc.go, where the Goroutine structures are not being properly cleared, leading to potential memory leak.What did you see happen?
The memory used by the finished Goroutines does not appear to be released, even when the Goroutines are no longer in use. This suggests a potential memory leak in the runtime's Goroutine management.
What did you expect to see?
I expected that after Goroutines finish their execution and are no longer needed, the memory they occupied would be returned to the system.
The text was updated successfully, but these errors were encountered: