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

os/signal: "timeout waiting for hangup" in TestSignal #35466

Closed
bcmills opened this issue Nov 8, 2019 · 2 comments

Comments

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 8, 2019

This is a problem with the test, exposed by using signals to preempt goroutines. The test uses a channel with a buffer size of 1 and passes it to signal.Notify with no arguments, meaning to accept all signals. Then it sends a SIGHUP to the process and expects to see a SIGHUP on the channel. But if the runtime sends itself a SIGURG to preempt a goroutine, then it also reports that signal to the channel. So if we get both a SIGURG and a SIGHUP, before the test reads from the channel, there isn't room in the buffer to hold the signals.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 8, 2019

Change https://golang.org/cl/206257 mentions this issue: os/signal: use a larger channel buffer for all signals in TestSignal

@gopherbot gopherbot closed this in bde1968 Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.