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: timeouts in os/signal tests [1.11 backport] #27521

gopherbot opened this issue Sep 5, 2018 · 2 comments


None yet
1 participant
Copy link

commented Sep 5, 2018

@randall77 requested issue #27520 to be considered for backport to the next 1.11 minor release.

@gopherbot, please open an issue for backport to 1.11.1.


This comment has been minimized.

Copy link

commented Sep 7, 2018

Change mentions this issue: runtime: in semasleep, subtract time spent so far from timeout


This comment has been minimized.

Copy link

commented Sep 7, 2018

Closed by merging 5753489 to release-branch.go1.11.

@gopherbot gopherbot closed this Sep 7, 2018

gopherbot pushed a commit that referenced this issue Sep 7, 2018

[release-branch.go1.11] runtime: in semasleep, subtract time spent so…
… far from timeout

When pthread_cond_timedwait_relative_np gets a spurious wakeup
(due to a signal, typically), we used to retry with the same
relative timeout. That's incorrect, we should lower the timeout
by the time we've spent in this function so far.

In the worst case, signals come in and cause spurious wakeups
faster than the timeout, causing semasleep to never time out.

Also fix nacl and netbsd while we're here. They have similar issues.

Fixes #27521

Change-Id: I6601e120e44a4b8ef436eef75a1e7c8cf1d39e39
Run-TryBot: Keith Randall <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Ian Lance Taylor <>
(cherry picked from commit 2bf1370f4369d75f4fffffc6fc05722bce13481b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.