From 7e97e4e8ccdba9677f31ab9380802cd7613f62c5 Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Fri, 26 Mar 2021 19:27:22 -0700 Subject: syscall: syscall.AllThreadsSyscall signal handling fixes The runtime support for syscall.AllThreadsSyscall() functions had some corner case deadlock issues when signal handling was in use. This was observed in at least 3 build test failures on ppc64 and amd64 architecture CGO_ENABLED=0 builds over the last few months. The fixes involve more controlled handling of signals while the AllThreads mechanism is being executed. Further details are discussed in bug #44193. The all-threads syscall support is new in go1.16, so earlier releases are not affected by this bug. Fixes #44193 Change-Id: I01ba8508a6e1bb2d872751f50da86dd07911a41d Reviewed-on: https://go-review.googlesource.com/c/go/+/305149 Reviewed-by: Michael Pratt Trust: Michael Pratt Trust: Ian Lance Taylor Run-TryBot: Michael Pratt TryBot-Result: Go Bot --- src/runtime/sigqueue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/sigqueue.go') diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go index aae1d00046..6c91fb3fb3 100644 --- a/src/runtime/sigqueue.go +++ b/src/runtime/sigqueue.go @@ -120,7 +120,7 @@ Send: } case sigFixup: // nothing to do - we need to wait for sigIdle. - osyield() + mDoFixupAndOSYield() } } -- cgit v1.3