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
We did nothing. One of our service was running, but received a crash.
What did you see happen?
We find the core dump file, gdb shows that it crashed at runtime/traceback.go:gentraceback:258-270.
Code is: flr = findfunc(frame.lr) if !flr.valid() { // This happens if you get a profiling interrupt at just the wrong time. // In that context it is okay to stop early. // But if callback is set, we're doing a garbage collection and must // get everything, so crash loudly. doPrint := printing if doPrint && gp.m.incgo && f.funcID == funcID_sigpanic { // We can inject sigpanic // calls directly into C code, // in which case we'll see a C // return PC. Don't complain. doPrint = false } if callback != nil || doPrint { print("runtime: g ", gp.goid, ": unexpected return pc for ", funcname(f), " called from ", hex(frame.lr), "\n") tracebackHexdump(stack, &frame, lrPtr) } if callback != nil { throw("unknown caller pc") } }
It seems that it triggered throw("unknown caller pc") and got core dump. Now we cannot reproduce it, but are concerning it happens again.
What did you expect to see?
We don't know the reason, only see the comment in the code is: // This happens if you get a profiling interrupt at just the wrong time. // In that context it is okay to stop early. // But if callback is set, we're doing a garbage collection and must // get everything, so crash loudly.
Could you please help us understand what the issue is? Thank you so much.
The text was updated successfully, but these errors were encountered:
And we saw the previous stack frame, it seems that the callback should not be nil at any time. // Scan the stack. Accumulate a list of stack objects. scanframe := func(frame *stkframe, unused unsafe.Pointer) bool { scanframeworker(frame, &state, gcw) return true } gentraceback(^uintptr(0), ^uintptr(0), 0, gp, 0, nil, 0x7fffffff, scanframe, nil, 0)
Here, the func scanframe is the callback inside gentraceback. Supplement a debugging information, when calls findfunc(frame.lr), we saw that the frame.lr == 1, and the result flr is not valid. frame = {fn = {_func = 0x18c5f28, datap = 0x1d58220 <runtime.firstmoduledata>}, pc = 4519102, continpc = 4454006, lr = 1, sp = 824875715648, fp = 824875715968, varp = 824875715632, argp = 824875715648}
Another question, I think the parameter of findfunc should be pc rather than lr, am I right?
Go version
go1.20.6
Output of
go env
in your module/workspace:What did you do?
We did nothing. One of our service was running, but received a crash.
What did you see happen?
We find the core dump file, gdb shows that it crashed at runtime/traceback.go:gentraceback:258-270.
Code is:
flr = findfunc(frame.lr) if !flr.valid() { // This happens if you get a profiling interrupt at just the wrong time. // In that context it is okay to stop early. // But if callback is set, we're doing a garbage collection and must // get everything, so crash loudly. doPrint := printing if doPrint && gp.m.incgo && f.funcID == funcID_sigpanic { // We can inject sigpanic // calls directly into C code, // in which case we'll see a C // return PC. Don't complain. doPrint = false } if callback != nil || doPrint { print("runtime: g ", gp.goid, ": unexpected return pc for ", funcname(f), " called from ", hex(frame.lr), "\n") tracebackHexdump(stack, &frame, lrPtr) } if callback != nil { throw("unknown caller pc") } }
It seems that it triggered
throw("unknown caller pc")
and got core dump. Now we cannot reproduce it, but are concerning it happens again.What did you expect to see?
We don't know the reason, only see the comment in the code is:
// This happens if you get a profiling interrupt at just the wrong time. // In that context it is okay to stop early. // But if callback is set, we're doing a garbage collection and must // get everything, so crash loudly.
Could you please help us understand what the issue is? Thank you so much.
The text was updated successfully, but these errors were encountered: