-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: fatal error: unknown caller pc #44096
Comments
This may be caused by memory corruption. Have you tried running your program under the race detector? See https://blog.golang.org/race-detector . |
The call to (CC @mdempsky @danscales) On the other hand, a similar symptom can also occur if the program has a C dependency that registers a signal handler without |
The stack trace looks a lot like #43882.
|
@davecheney I ever built with race condition detection enabled but crash doesn't happen again with such bin. I'm also confused about that. |
@bcmills thanks for the comment. |
@xqzhang2015 A fix for #43882 is included in Go 1.16rc1 and will be included in the upcoming Go 1.16 release, likely within the next couple weeks. If this is related to #43882, which seems likely to me, then upgrading to Go 1.16rc1 or Go 1.16 (once it's released) should address the problem. If you see the issue again with Go 1.16rc1 or Go 1.16 though, that would be interesting. I'm afraid there's not much else we're able to do at the moment with your report, unless you're able to reproduce the failure. |
@mdempsky totally understands that. And all your comments are very helpful. |
@bcmills I didn't find any signal handler in use on the C side. |
I use goreplay to capture and replay the traffic during crash, then the crash could be reproduced but not stable. Interesting thing is that panic during panic happens, which is in the bt below. New back traceruntime: unexpected return pc for crypto/tls.(*Conn).readRecordOrCCS called from 0xc006709c00 stack: frame={sp:0xc0067096c8, fp:0xc006709b28} stack=[0xc006709000,0xc00670a000) 000000c0067095c8: 0000000000000000 0000000000000000 000000c0067095d8: 0000000000000000 0000000000000010 000000c0067095e8: 0000000000000018 00007f1620f0d360 000000c0067095f8: 000000c006709668 00000000005154d1 000000c006709608: 000000c005ee45e0 000000c006d68000 000000c006709618: 0000000000000f3b 0000000000000f3b 000000c006709628: 00000000000004b6 0000000000000f36 000000c006709638: 000000c006709668 0000000000000000 000000c006709648: 0000000000000020 0000000000d922a0 000000c006709658: 0000000000000000 000000c005ee45e0 000000c006709668: 000000c0067096b8 0000000000666073 000000c006709678: 000000c005613780 0000000000fb6a00 000000c006709688: 000000c005ee45e0 000000000040e1e5 000000c006709698: 0000000000d66720 0000000000e3f7e0 000000c0067096a8: 0000000000000005 000000c005613780 000000c0067096b8: 000000c006709b18 0000000000662e95 000000c0067096c8: <000000c005613500 0000000000fb72e0 000000c0067096d8: 000000c0067c05c8 0000000000000005 000000c0067096e8: 000000c0067c05c8 00007f1619156700 000000c0067096f8: 0000000000000200 00007f16192e5fff 000000c006709708: 0000000000000800 00007f1619156900 000000c006709718: 0000000100000000 00007f16192e5fff 000000c006709728: 0000000000000800 0000000000203000 000000c006709738: 0000000000000800 0000000000000800 000000c006709748: 0000000000000580 00007f1619156900 000000c006709758: 00007f16192e5fff 000000c0067097a8 000000c006709768: 000000000041b99e 00007f1619156700 000000c006709778: 0020300000000000 00007f16192e5fff 000000c006709788: 00007f15efc74980 00007f15efc74980 000000c006709798: 0000000000000580 0000000000000002 000000c0067097a8: 000000c006709820 000000000041b485 000000c0067097b8: 00007f15efc74980 0000000000000000 000000c0067097c8: 0000000000000003 0000000000000002 000000c0067097d8: 0000000000000001 000000000051ad6b 000000c0067097e8: 000000c006d6933f 0000000000000166 000000c0067097f8: 0000000000000cc1 0000000000000008 000000c006709808: 0000000000000001 0000000000000030 000000c006709818: 0000000000203000 000000c006709890 000000c006709828: 000000000051af34 0000000000203000 000000c006709838: 0000000000203000 0000000000203000 000000c006709848: 0000000000000002 0000000000000cc1 000000c006709858: 0000000000000000 0000000000000000 000000c006709868: 0000000000000000 000000c006709910 000000c006709878: 00000000004104d0 000000c00031fd70 000000c006709888: 0000000000000030 0000000000000028 000000c006709898: 000000c0056137a8 000000c001e51200 000000c0067098a8: 000000c006d6933f 0000000000203001 000000c0067098b8: 0000000000000020 0000000000000028 000000c0067098c8: 0000000000203001 0000000000203001 000000c0067098d8: 0000000000203001 000000c000780400 000000c0067098e8: 0000000000000000 00000000ca152938 000000c0067098f8: 0000000000000008 000000c006709978 000000c006709908: 000000c0067099a8 0000000000203000 000000c006709918: 000000c000d7c020 0000000000000010 000000c006709928: 0000000000203000 0000000000203000 000000c006709938: 0000000000203000 000000c0067099d8 000000c006709948: 00007f15efc31908 0000000000000008 000000c006709958: 0000000000000010 00007f1620f0d360 000000c006709968: 000000c006709a08 00000000004104d0 000000c006709978: 000000c00031fdd0 0000000000000030 000000c006709988: 0000000000000028 0000000000dddfe0 000000c006709998: 0000000000000008 0000000000e3cea0 000000c0067099a8: 00007f15efc2b180 0000000000000028 000000c0067099b8: 0000000000000028 00007f1620f0d360 000000c0067099c8: 000000c00031fdd0 0000000000417c3b 000000c0067099d8: 000000c000780400 0000000000000000 000000c0067099e8: 0000000000000038 0000000000000001 000000c0067099f8: 77d220971a80dc27 0000000000415a3b 000000c006709a08: 000000c006709a58 000000007d9504a8 000000c006709a18: 0000000000000000 0000000000000000 000000c006709a28: 000000c006709a58 000000000047039b 000000c006709a38: 00007f161d406370 0000000000000001 000000c006709a48: 0000000000000000 000000c007c94000 000000c006709a58: 000000c000000000 0000000000008000 000000c006709a68: 000000c00670a801 0000000000000004 000000c006709a78: 0000000000fe15c0 0000000000000212 000000c006709a88: 00000000ed3cee2e 000000000000000e 000000c006709a98: 000000c0057f2b40 0000000000000200 000000c006709aa8: 00000000000001c3 000000c00177ae00 000000c006709ab8: 000000c00670a798 000000c00004f800 000000c006709ac8: 000000000000001f ffffffffffffffe0 000000c006709ad8: ffffffffffffffff 000000c00670a748 000000c006709ae8: 000000000048a65b 0000000000000212 000000c006709af8: 0000000000000033 0000000000000000 000000c006709b08: 0000000000000000 0000000000000000 000000c006709b18: 0000000000000000 !000000c006709c00 000000c006709b28: >000000c005613500 0000000000000000 000000c006709b38: 0000000000000000 0000000000000000 000000c006709b48: 010000000043d0dc 000000c006709b58 000000c006709b58: 000000000046a740 000000c001def380 000000c006709b68: 0000000000000000 0000000000ecf3d8 000000c006709b78: 000000c006709be8 000000000074f3f7 000000c006709b88: 000000c005613500 000000c006d69000 000000c006709b98: 0000000000001000 0000000000001000 000000c006709ba8: 0000000000000000 0000000000000000 000000c006709bb8: 0000000000000000 000000c006709cc2 000000c006709bc8: 000000c006709c10 0000000000000003 000000c006709bd8: 0000000000000000 0000000000000005 000000c006709be8: 000000c006709c38 0000000000519fa5 000000c006709bf8: 000000c0067d4c60 000000000000037f 000000c006709c08: 00007f161b0cb5e8 0000000000000000 000000c006709c18: 0000ffff00001fa0 0000000000000000 fatal error: unknown caller pc |
@xqzhang2015 Glad to hear you're able to reproduce the crash. Are you able to test with Go 1.16rc1 to see if the crash still reproduces? Alternatively, you can try cherry-picking just a5a5e2c back to Go 1.15.3. |
@mdempsky Thanks and will try Go 1.16rc1 |
With Go 1.16rc1, there is similar crash and backtrace. The good news is that we narrow down the issue scope to cgo(calling C library) usage. In the app, I use cgo to call C API and use one flag to control C debug log level and some other business logic, but not related to a signal handler. One suspicious point is something like the stack bytes size, because the crash only happens when the flag is enabled, which could dump more debug logs to stack, then will be collected by Go side(by a pointer). Will verify it. bt with Go 1.16rc1runtime: unexpected return pc for crypto/tls.(*Conn).readRecordOrCCS called from 0x0 stack: frame={sp:0xc000871998, fp:0xc000871c10} stack=[0xc000871000,0xc000872000) 000000c000871898: 0000000000000000 0000000000000018 000000c0008718a8: 0000000000d5d340 0000000000000000 000000c0008718b8: 0000000000000000 000000c000871938 000000c0008718c8: 0000000000519ede 000000c00000ed08 000000c0008718d8: 000000c005680000 0000000000001756 000000c0008718e8: 0000000000001756 0000000000000008 000000c0008718f8: 000000c000101800 0000000000000000 000000c000871908: 0000000000000000 00000000004111d8 000000c000871918: 0000000000000018 0000000000000000 000000c000871928: 0000000000e07701 000000c00000ed08 000000c000871938: 000000c000871988 0000000000658f33 000000c000871948: 000000c00179d078 0000000000f7d5a0 000000c000871958: 000000c00000ed08 000000000040e805 000000c000871968: 0000000000d318e0 0000000000e07700 000000c000871978: 0000000000000005 000000c00179d078 000000c000871988: 000000c000871c00 0000000000655d75 000000c000871998: <000000c00179ce00 0000000000f7de80 000000c0008719a8: 000000c00627c0b0 0000000000000005 000000c0008719b8: 000000c00627c0b0 0000000000203002 000000c0008719c8: 0000000000203002 3ddd431c2076c8a9 000000c0008719d8: 000000c000101800 0000000000000000 000000c0008719e8: 0000000100871a18 00000000004111d8 000000c0008719f8: 0000000000000008 0000000000410a7b 000000c000871a08: 000000c006db8580 0000000000203000 000000c000871a18: 0000000000000010 000000c00179d0a0 000000c000871a28: 0000000000203000 0000000000203000 000000c000871a38: 0000000000203000 0000000000000008 000000c000871a48: 0000000000000010 00007fab433a71d8 000000c000871a58: 0000000000000010 000000c006db8580 000000c000871a68: 000000c000871af0 0000000000410a7b 000000c000871a78: 000000c001231320 0000000000000030 000000c000871a88: 0000000000000028 0000000000da8980 000000c000871a98: 0000000000000010 0000000000e04a80 000000c000871aa8: 00007fab12a5d338 0000000000000028 000000c000871ab8: 0000000000000028 00007fab433a71d8 000000c000871ac8: 0000000000000030 000000c001231320 000000c000871ad8: 0000000000000018 000000c000101800 000000c000871ae8: 0000000000415e3b 000000c000871b40 000000c000871af8: 00000000859b02ee 0000000000000000 000000c000871b08: 0000000000000000 000000c000871b40 000000c000871b18: 000000000047285b 000188c96d2c6334 000000c000871b28: 0000000004d25f8f 04d25f8f00d11580 000000c000871b38: 00007fab3f8ae370 0000000000000001 000000c000871b48: 0000000000000000 000000c000012000 000000c000871b58: 000000c000000000 0000000000008000 000000c000871b68: 000000000000001f 0000000000000004 000000c000871b78: 000000000000001f 0000000000000206 000000c000871b88: 00000000acf85492 000000000000000e 000000c000871b98: 0000000000000086 ffffffffffffffff 000000c000871ba8: 00000000000001d2 000000c0006190a0 000000c000871bb8: 000000c000872870 000000c00003e000 000000c000871bc8: 000000000000001f ffffffffffffffe0 000000c000871bd8: ffffffffffffffff 000000c000872820 000000c000871be8: 000000000048c7fb 0000000000000206 000000c000871bf8: 0000000000000033 0000000000000000 000000c000871c08: !0000000000000000 >0000000000000000 000000c000871c18: 0000000000000000 000000c000871d00 000000c000871c28: 000000000043df1c 010000c000871c38 000000c000871c38: 000000000046cb40 000000c001d76180 000000c000871c48: 0000000000000004 000000c00179cf58 000000c000871c58: 0000000000e95610 000000c000871cd0 000000c000871c68: 0000000000000000 000000c00179ce00 000000c000871c78: 000000c000e7c000 0000000000001000 000000c000871c88: 0000000000001000 0000000000000000 000000c000871c98: 0000000000000000 0000000000000000 000000c000871ca8: 000000c000871cf8 0000000000000003 000000c000871cb8: 0000000000000000 0000000000000000 000000c000871cc8: 0000000000000005 000000c000871d20 000000c000871cd8: 000000000051e9c8 000000c005e2a000 000000c000871ce8: 000000c000e7c000 0000000000001000 000000c000871cf8: 0000000000001000 000000000000037f 000000c000871d08: 00007fab3d5735e8 fatal error: unknown caller pc |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure. Randomly crashed, no core file generated, and can't manually reproduce. And it's a PROD env, I haven't tried the latest Go version.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Can't reproduce now and a huge codebase.
What did you expect to see?
Not crash
What did you see instead?
back trace
OutputThe text was updated successfully, but these errors were encountered: