-
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: deadlock due to blocked glibc-internal signals #12498
Comments
CL https://golang.org/cl/14297 mentions this issue. |
FYI, this is causing some quite serious issues. The Go1.5.1 milestone is maybe more appropriate? |
CL https://golang.org/cl/16967 mentions this issue. |
… thread Glibc uses some special signals for special thread operations. These signals will be used in programs that use cgo and invoke certain glibc functions, such as setgid. In order for this to work, these signals need to not be masked by any thread. Before this change, they were being masked by programs that used os/signal.Notify, because it carefully masks all non-thread-specific signals in all threads so that a dedicated thread will collect and report those signals (see ensureSigM in signal1_unix.go). This change adds the two glibc special signals to the set of signals that are unmasked in each thread. Fixes #12498. Change-Id: I797d71a099a2169c186f024185d44a2e1972d4ad Reviewed-on: https://go-review.googlesource.com/14297 Reviewed-by: David Crawshaw <[email protected]> Reviewed-on: https://go-review.googlesource.com/16967 Run-TryBot: Austin Clements <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Russ Cox <[email protected]>
A report from golang-dev says this still happens in go test -race mode: From: Mark Pulford [email protected] I've just noticed that the Setgid test updated in rev a897684 fails under the race detector. The previous rev builds and tests cleanly.
I haven't investigated further. |
I can not recreate the problem using -race. |
Mark reports that he was running stale binaries. |
The following code demonstrates the bug. The expected behaviour is that the program exits. Instead, the program hangs forever.
I did not experience these issues with Go 1.4; I suspect it is a result of the changes introduced in #9400, involving SIGSETXID.
The text was updated successfully, but these errors were encountered: