-
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: epoll reader is blocked for a period of time because of runtime.netpollWaiters overflow #60782
Comments
@gopherbot Please open backport issues. This is an unusual but serious problem. A counter is not decremented as expected, and can overflow. |
Backport issue(s) opened: #60832 (for 1.19), #60833 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/503923 mentions this issue: |
Problem: overflow of variable netpollWaiters that cause the server blocked after period of time! if you insist on using io.CopyBuffer for copying data from the client connection to the server's standard output:
now test it. it doesn't overflow afterwards the server will not blocked as long as the client is sending data. If you are satisfied to use another way:
again test it. it works and the server will never be blocked! |
Change https://go.dev/cl/511356 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I verified that runtime.netpollWaiters is increased with each wait of a goroutine on network in an example of handling TCP server:
TCP client
What did you expect to see?
server will not be blocked for a period of time
What did you see instead?
server is blocked for a period of time
we can see that runtime.netpollWaiters become zero.
A previous issue mentioned the same problem: #33624
The text was updated successfully, but these errors were encountered: