@prattmic requested issue #50249 to be considered for backport to the next 1.17 minor release.
@gopherbot please backport to 1.17 and 1.18. This triggers a false positive in the race detector for programs calling syscall.NewCallback from multiple goroutines. There is a workaround: use a single global lock around all calls to syscall.NewCallback in the program. However, that is quite invasive and difficult for complex code.
The text was updated successfully, but these errors were encountered:
cbs.lock protects a map. The map implementation is race instrumented
regardless of which package is it called from.
lock/unlock are not automatically race instrumented, so we can trigger
race false positives without manually annotating our lock acquire and
compileCallback is used during initialization before the P is available,
at which point raceacquire will crash during a racecallback to get the
race proc. Thus we skip instrumentation until scheduler initialization
TryBot-Result: Gopher Robot <email@example.com>
Reviewed-by: Cherry Mui <firstname.lastname@example.org>
Run-TryBot: Michael Pratt <email@example.com>
(cherry picked from commit 20760cf)