You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macOS generates a crash report with this key annotation:
"asi": {"libsystem_c.dylib": ["crashed on child side of fork pre-exec"]}
"exception": {"type": "EXC_BAD_ACCESS", "signal": "SIGSEGV", "subtype": "KERN_INVALID_ADDRESS at 0x0000000000000008"}
The crash occurs in the forked child process before exec() replaces it, i.e. it is in the Go runtime's fork/exec path, not in the child binary.
Additional observations
Requires -race: 0 crashes in 10 runs without -race; ~2 in 5 with -race.
darwin/arm64 specific: macOS 26.5.1 (25F80), Apple Silicon (Mac17,8).
Crash address is deterministic: Always 0x8 (nil pointer dereference at struct offset 8). The instructionByteStream at the crash point is identical across different test binaries and runs.
Binary size does not matter: The crash reproduces with both a small stdlib-only test binary (~12MB) and a larger one with third-party dependencies (~40MB).
Full macOS crash report (.ips)
{"app_name":"pkg02.test","timestamp":"2026-06-03 06:25:22.00 -0700","app_version":"","slice_uuid":"...","build_version":"","platform":1,"bug_type":"309","os_version":"macOS 26.5.1 (25F80)","name":"pkg02.test"}
{
"cpuType": "ARM-64",
"procName": "pkg02.test",
"parentProc": "pkg02.test",
"exception": {
"type": "EXC_BAD_ACCESS",
"signal": "SIGSEGV",
"subtype": "KERN_INVALID_ADDRESS at 0x0000000000000008"
},
"termination": {"indicator": "Segmentation fault: 11"},
"asi": {"libsystem_c.dylib": ["crashed on child side of fork pre-exec"]},
"faultingThread": 0
}
Go version
go1.26.4 darwin/arm64 (GOTOOLCHAIN resolves to go1.26.3 from Homebrew)
Output of
go envin your module/workspaceWhat did you do?
Ran concurrent Go tests that spawn child processes via
os/execwhilenet/http/httptestTLS servers are active, with-raceenabled on darwin/arm64.Minimal reproducer (no third-party dependencies, pure stdlib):
To reproduce, create 10 copies of this file in separate packages (
pkg01/throughpkg10/, adjusting the package name) and run:The crash is intermittent; it occurs roughly 1 in 10 runs.
What did you expect to see?
All tests pass.
What did you see instead?
Intermittent SIGSEGV:
macOS generates a crash report with this key annotation:
The crash occurs in the forked child process before
exec()replaces it, i.e. it is in the Go runtime's fork/exec path, not in the child binary.Additional observations
-race: 0 crashes in 10 runs without-race; ~2 in 5 with-race.MallocNanoZone=0does not help: This is not the same issue as runtime: race detector SIGABRT or SIGSEGV on macOS Monterey #49138.0x8(nil pointer dereference at struct offset 8). TheinstructionByteStreamat the crash point is identical across different test binaries and runs.Full macOS crash report (.ips)
{"app_name":"pkg02.test","timestamp":"2026-06-03 06:25:22.00 -0700","app_version":"","slice_uuid":"...","build_version":"","platform":1,"bug_type":"309","os_version":"macOS 26.5.1 (25F80)","name":"pkg02.test"} { "cpuType": "ARM-64", "procName": "pkg02.test", "parentProc": "pkg02.test", "exception": { "type": "EXC_BAD_ACCESS", "signal": "SIGSEGV", "subtype": "KERN_INVALID_ADDRESS at 0x0000000000000008" }, "termination": {"indicator": "Segmentation fault: 11"}, "asi": {"libsystem_c.dylib": ["crashed on child side of fork pre-exec"]}, "faultingThread": 0 }