/ go Public
runtime: mexit leads to SIGSEGV due to g.m becoming nil #52394
Issues related to the Go compiler and/or runtime.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Issue is reproducible on openbsd/amd64 with both go1.17.7 and -tip.
While debugging test failures (for another software package - delve), the
go testrun will regularly hit a
SIGSEGVlike the following:
This is occurring due to
nilduring the following in
mexit(it is non-nil before this line and is nil immediately afterwards):
The next piece of code is:
And this leads to a
gp.m.locksdereference and hence a
This seems to be triggered by the fact that these tests run code that calls
runtime.LockOSThread- adding a matching
runtime.UnlockOSThreadcall makes the issue disappear, as does removing the
runtime.LockOSThreadcall. Additionally, the
openbsd/amd64port uses system threads, which may play a part.
So far I've been unsuccessful in reducing the test suite to provide a minimal reproducer. However, it is easy to trigger and I can provide further information as needed.
The text was updated successfully, but these errors were encountered: