-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: gc pauseNs larger than 4s #36080
Comments
I started my program and everything works fine over time, STW started to rise in time, after about 2.3 days later. My pauseNs:
If I restart the program,everything is returned to the normal. |
Go 1.9 is quite old and is no longer supported. The most recent release is 1.13.5. There have been many improvements to the garbage collector since 1.9. Is it possible for you to try a newer release? |
the cpu profile flat flat% sum% cum cum% |
iI wonder if it's a problem with our code itself |
The most likely cause of this problem is an unpreemptible loop: a loop that runs, perhaps checking some package variable, without making any function calls. That will break the Go scheduler; see #10958 (this problem is fixed in the upcoming 1.14 release). The fix is to add calls to |
I turned off the request to send,the GC PauseNs return to normal. But I only need to send 1 request, the system GC PauseNs larger than hundreds of mililseconds. How can I know what GC is doing at this time? |
Any better suggestions? we use the cpu profile and dichotomy also can not find the tight or busy loop.. so sad. |
Have you tried go 1.13? And if it is a non-preemptible loop, try go 1.14. A beta should be coming very soon. |
the reason for this is the grpc goroutine lead to the gentraceback with time growth |
Are you saying that grpc is leaking goroutines? |
Yes, the error disappeared when we replaced grpc with http. I'm not sure if it's because our usage is wrong. |
It sounds like a bug with grpc then. Please file an issue on their issue tracker. |
pprof's goroutine profiling may be useful for tracking down where the leaked goroutines are being created. See e.g. https://stackoverflow.com/questions/38401778/how-to-profile-number-of-goroutines#38414527 I'm going to close this issue, but if the issue does turn out to originate in grpc, please do file an issue with them. Thanks! |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
go version go1.9
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: