-
Notifications
You must be signed in to change notification settings - Fork 18.1k
runtime: crash in sigtramp #10534
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
Comments
/cc @rsc @randall77 @RLH @aclements |
Could you say a bit about what the program was doing? Is it reproducable? I wonder if this is the same silent crash that we're seeing sometimes in the runtime/pprof test. E.g., http://build.golang.org/log/10670960d0c768b1c68b429984beaaa004281db7 (linux-386-sid on commit 58c1c01). |
The program is fuzzer: It is well possible that it is the same crash we are seeing on bots, since pprof tests sends signal. Mine crash is not reproducible. |
Another similar crash:
|
We've fixed several memory corruption problems in the runtime since this was reported and also rewritten this part of the signal handling code. Since this is most likely fixed, I'm closing the issue, but please reopen if it is still happening. I tried, unsuccessfully, to map this to a specific issue that was fixed. Below is a log of what I figured out from the core file and the version you were running. In your first trace, it was actually goroutine 23 (0x17):
Not very enlightening, unfortunately. And since it's running, probably a lie. The signal itself reveals some of what was happening at the time. rdi is 11, so this is a SIGSEGV. rdx is the signal context (type *ucontext), so we can find out where caused the original segfault:
So the original cause of the SIGSEGV was also that g.m==nil. Annoyingly, gdb won't let me trick it in to unwinding the pre-signal stack on a core file, but groveling through the stack for plausible return RIPs yields:
So we're not in anything strange. We're just running regular user code and it's allocating a regular object. Taking a different track (suggested by your original post), I found only two places where we can legitimately set g.m to nil. There are other places where we change g.m, but they would all clearly crash immediately if g.m were set to nil. We set g.m to nil in dropg, but it also sets m.curg to nil. M 31 has curg set to 0xc20807ab40, the g that crashed, so unless two Ms were running that G, g.m wasn't set to nil in dropg. We set g.m to nil in goexit0, but we also cas the status to _Gdead and the g that crashed is in status _Grunning. At this point, there seems to be no plausible way g.m could be nil other than memory corruption. |
go version devel +87054c4 Wed Apr 22 02:50:48 2015 +0000 linux/amd64
A program silently crashed here (from a core file):
It means that g != nil but g.m == nil. The goroutine descriptor looks valid:
This is goroutine 17:
I don't any obvious place where we setg(g) with g.m==nil.
Core file and the binary are here:
https://drive.google.com/file/d/0B20Uwp8Hs1oCdVpieWdfZy1PN3M/view?usp=sharing
The text was updated successfully, but these errors were encountered: