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
Program crashed after running for several days, with linux log
Dec 20 18:24:03 hostname kernel: myprogram[27064]: segfault at 119 ip 00007f5bb82c8bd2 sp 00007f5bb4840f70 error 4 in libgowrapper.so[7f5bb7fc3000+8e7000]
My analysis
hex(0x7f5bb82c8bd2 - 0x7f5bb7fc3000)= 0x305bd2
(gdb) info sym 0x305bd2
runtime.gentraceback + 5522 in section .text
(gdb) break *0x305bd2
Breakpoint 1 at 0x305bd2: file /opt/go/src/runtime/traceback.go, line 290.
funcgentraceback(...) int {
flr=findfunc(frame.lr)
if!flr.valid() {
// This happens if you get a profiling interrupt at just the wrong time. ...doPrint:=printingifdoPrint&&gp.m.incgo { // *** Line 290// We can inject sigpanic...doPrint=false
}
unsafe.Offsetof(m.incgo) gives 0x119 so the crash point should be exact: m==nil thus accessing m.incgo cause the segfault.
doPrint should be true, so pcbuf == nil && callback == nil is true. gentraceback() should be called for 'stack prints'.
My questiones:
How to reproduce 'get a profiling interrupt at just the wrong time'?
Is gp.m==nil a go-side problem, or it could be caused by user-side code?
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Cannot reproduce on go1.10, let alone the latest release.
What operating system and processor architecture are you using (
go env
)?Here is the compiling env. Running env is out of reach.
go env
OutputWhat did you do?
It is a C++ server program, calling a go lib.
What did you expect to see?
Program continues running for a long term.
What did you see instead?
Program crashed after running for several days, with linux log
My analysis
Link to the line
unsafe.Offsetof(m.incgo)
gives 0x119 so the crash point should be exact:m==nil
thus accessingm.incgo
cause the segfault.doPrint
should be true, sopcbuf == nil && callback == nil
is true.gentraceback()
should be called for 'stack prints'.My questiones:
gp.m==nil
a go-side problem, or it could be caused by user-side code?The text was updated successfully, but these errors were encountered: