-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: SIGBUS during TestTraceStress on freebsd-386-gce101 #10212
Comments
See http://build.golang.org/log/51a465959ec7ed0f9b6d695745cfa94fa3759ad2. % git rev-parse HEAD |
This could be caused by the write barrier consulting arena_used and then h_spans while this sequence runs in another thread:
If there is system memory in the middle of the arena (more likely on 32-bit systems) then the advancement of arena_used may cause the range arena_start, arena_used to now include that memory. Inheap sees that the system pointer it is considering (and it is a system pointer since the barrier is in traceEvent) is in range, so it looks at the corresponding h_spans entry. But since mHeap_MapSpans has not completed yet, the corresponding h_spans entry is not present in memory and causes the fault. The fix would be to swap the two halves of the above code, passing the expected new arena_end value into mHeap_MapBits and mHeap_MapSpans, but waiting until they return to actually update h.arena_used. This sequence happens twice in runtime/malloc.go. The other looks like:
Both need to be fixed. |
If Russ's theory is right, this is closely related to issue #9984. |
CL https://golang.org/cl/10816 mentions this issue. |
This crash is still happening regularly on freebsd-386-gce101, openbsd-386-gce56, and windows-386-gce. |
Not sure this is the same as #9953.
The text was updated successfully, but these errors were encountered: