Skip to content
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: spurious unknown caller pc in cgo application #59538

Open
khlipeng opened this issue Apr 11, 2023 · 3 comments
Open

runtime: spurious unknown caller pc in cgo application #59538

khlipeng opened this issue Apr 11, 2023 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@khlipeng
Copy link

khlipeng commented Apr 11, 2023

What version of Go are you using (go version)?

$ go version

go version go1.20.2 linux/amd64

$  cat /proc/version

Linux version 5.4.0-84-generic (buildd@lcy01-amd64-007) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="DEV"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY="xxxx.xxxx.xxxx"
GONOSUMDB="xxxx.xxxx.xxxx"
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE="xxx.xxxx.xxx"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"

What did you do?

use CGO, connect to the device and process the video stream.

What did you expect to see?

Not crash

What did you see instead?

use CGO, appears after running for a while, the following abnormalities occur randomly.

panic 1 Output

runtime: g 118: unexpected return pc for runtime.sigpanic called from 0xc0000de000
stack: frame={sp:0xc0003deb38, fp:0xc0003deb98} stack=[0xc0003de000,0xc0003df000)
0x000000c0003dea38:  0x000000c0003dea40  0x0000000000439320 <runtime.addOneOpenDeferFrame.func1+0x0000000000000000> 
0x000000c0003dea48:  0x0000000000450ffd <runtime.sigpanic+0x000000000000037d>  0x000000c0003deb38 
0x000000c0003dea58:  0x000000c0005d3ba0  0x0000000000000000 
0x000000c0003dea68:  0x000000c0003deb28  0x0000000000439b13 <runtime.gopanic+0x0000000000000113> 
0x000000c0003dea78:  0x000000c0003deae0  0x00000000005e010a <net.(*Buffers).WriteTo+0x000000000000006a> 
0x000000c0003dea88:  0x00007f61df7f1e78  0x000000c0003deac0 
0x000000c0003dea98:  0x00000000004091fd <runtime.chansend1+0x000000000000001d>  0x000000c000046360 
0x000000c0003deaa8:  0x000000c0003deae0  0x0000000000000001 
0x000000c0003deab8:  0x000000c0003deae0  0x000000c0003deae0 
0x000000c0003deac8:  0x000000000095a366 <github.com/gorilla/websocket.(*Conn).write.func1+0x0000000000000026>  0x0000000000b3fb80 
0x000000c0003dead8:  0x000000c000328008  0x000000c0005d3bc0 
0x000000c0003deae8:  0x000000c0005d3ba0  0x0000000000000000 
0x000000c0003deaf8:  0x0000000000aad0e0  0x0000000001016140 
0x000000c0003deb08:  0x0000000000000000  0x0000000000000000 
0x000000c0003deb18:  0x0000000000000000  0x0000000000000000 
0x000000c0003deb28:  0x000000c0003deb88  0x0000000000450ffd <runtime.sigpanic+0x000000000000037d> 
0x000000c0003deb38: <0x0000000000aad0e0  0x0000000001016140 
0x000000c0003deb48:  0x000000c0003e8330  0x000000c0003deb80 
0x000000c0003deb58:  0x000000000044c788 <runtime.sellock+0x0000000000000068>  0x0000000000000000 
0x000000c0003deb68:  0x000000c0005d3ba0  0x000000c0003df8c0 
0x000000c0003deb78:  0x00007f6209db3140  0x0000000000000007 
0x000000c0003deb88:  0x0000000000000007 !0x000000c0000de000 
0x000000c0003deb98: >0x0000000000000000  0x0000000000008000 
0x000000c0003deba8:  0x0000000000000000  0x0000000000000000 
0x000000c0003debb8:  0x0000000000000000  0x0000000000000206 
0x000000c0003debc8:  0x000000c0003dfa00  0x0000000000000000 
0x000000c0003debd8:  0x000000c0003f41a0  0x00007f61df7f3000 
0x000000c0003debe8:  0x0000000000000009  0x000000c00053648c 
0x000000c0003debf8:  0x000000c0003df8c0  0x0000000000000009 
0x000000c0003dec08:  0x000000000000007e  0xffffffffffffffe0 
0x000000c0003dec18:  0x0000000000405fce <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x000000c0003df880 
0x000000c0003dec28:  0x0000000000405fce <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x0000000000000206 
0x000000c0003dec38:  0x002b000000000033  0x0000000000000000 
0x000000c0003dec48:  0x0000000000000000  0x0000000000000000 
0x000000c0003dec58:  0x0000000000000000  0x000000c0003ded40 
0x000000c0003dec68:  0x000000c0000dc6c0  0x0000000000000002 
0x000000c0003dec78:  0x000000c0005d3c28  0x000000c0005d3ce8 
0x000000c0003dec88:  0x000000c0003decc0  0x000000000097cbf4 <{GIT}/media-center/video-streams/cmd/gateway/apis/muxer.(*wsWriter).Write+0x0000000000000034> 
fatal error: unknown caller pc


1.log

panic 2 Output

  0x0000000000000000 
0x000000c000132af8:  0x0000000000aac080  0x0000000001015130 
0x000000c000132b08:  0x0000000000000000  0x0000000000000000 
0x000000c000132b18:  0x0000000000000000  0x0000000000000000 
0x000000c000132b28:  0x000000c000132b88  0x0000000000450fdd <runtime.sigpanic+0x000000000000037d> 
0x000000c000132b38: <0x0000000000aac080  0x0000000001015130 
0x000000c000132b48:  0x000000c0004a1690  0x000000c000132b80 
0x000000c000132b58:  0x000000000044c768 <runtime.sellock+0x0000000000000068>  0x000000000044c873 <runtime.selunlock+0x0000000000000073> 
0x000000c000132b68:  0x000000c0004b76c0  0x000000c0001338c0 
0x000000c000132b78:  0x00007fba67109140  0x0000000000000007 
0x000000c000132b88:  0x0000000000000007 !0x000000c0003ee000 
0x000000c000132b98: >0x0000000000000000  0x0000000000008000 
0x000000c000132ba8:  0x0000000000000000  0x0000000000000000 
0x000000c000132bb8:  0x0000000000000000  0x0000000000000206 
0x000000c000132bc8:  0x000000c000133a00  0x0000000000000000 
0x000000c000132bd8:  0x000000c0003ecea0  0x00007fba3cb56b50 
0x000000c000132be8:  0x000000000000000f  0x000000c0002d648c 
0x000000c000132bf8:  0x000000c0001338c0  0x000000000000000f 
0x000000c000132c08:  0x000000000000007e  0xffffffffffffffe0 
0x000000c000132c18:  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x000000c000133880 
0x000000c000132c28:  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x0000000000000206 
0x000000c000132c38:  0x002b000000000033  0x0000000000000000 
0x000000c000132c48:  0x0000000000000000  0x0000000000000000 
0x000000c000132c58:  0x0000000000000000  0x000000c000132d40 
0x000000c000132c68:  0x000000c0001883f0  0x0000000002625a00 
0x000000c000132c78:  0x000000c0004b7748  0x000000c0004b7808 
0x000000c000132c88:  0x0000000000002000  0x000000c000048a00 
fatal error: unknown caller pc
runtime: g 177: unexpected return pc for {GIT}/media-center/video-streams/pkg/fmp4.(*Stream).writePacketV2 called from 0x2b000000000033
stack: frame={sp:0xc0001cda50, fp:0xc0001cdc40} stack=[0xc0001cd000,0xc0001ce000)
0x000000c0001cd950:  0x00000b0500000000  0x0200000000000080 
0x000000c0001cd960:  0x000000c0003406a0  0x0000000000000002 
0x000000c0001cd970:  0x0000000000000002  0x0000000000000000 
0x000000c0001cd980:  0x0000000000000000  0x000000c0001cda40 
0x000000c0001cd990:  0x000000000096927f <github.com/deepch/vdk/format/mp4f/mp4fio.MovieFrag.Len+0x000000000000011f>  0x000000c0000f9bc0 
0x000000c0001cd9a0:  0x000000c0000f9ba0  0x0000000000000000 
0x000000c0001cd9b0:  0x0000000000aac080  0x0000000001015130 
0x000000c0001cd9c0:  0x0000000000000000  0x0000000000000000 
0x000000c0001cd9d0:  0x0000000000000000  0x0000000000000000 
0x000000c0001cd9e0:  0x000000c0001cda40  0x0000000000450fdd <runtime.sigpanic+0x000000000000037d> 
0x000000c0001cd9f0:  0x0000000000aac080  0x0000000001015130 
0x000000c0001cda00:  0x000000c000101c00  0x000000c0005c5800 
0x000000c0001cda10:  0x0000000000000000  0x000000c0001cda40 
0x000000c0001cda20:  0x000000c0000f9ba0  0x000000000000413e 
0x000000c0001cda30:  0x0000000000a77780  0x0000000000000001 
0x000000c0001cda40:  0x000000c0001cdc30  0x000000000097572b <{GIT}/media-center/video-streams/pkg/fmp4.(*Stream).writePacketV2+0x00000000000006eb> 
0x000000c0001cda50: <0x000000c000340500  0x000000c00049e200 
0x000000c0001cda60:  0x0000000000000001  0x0000000000000001 
0x000000c0001cda70:  0x0000000000000000  0x0000000000000000 
0x000000c0001cda80:  0x0000000000000000  0x0000000000000000 
0x000000c0001cda90:  0x0000000000000000  0x00000000004091dd <runtime.chansend1+0x000000000000001d> 
0x000000c0001cdaa0:  0x000000c000522120  0x000000c0001cdae0 
0x000000c0001cdab0:  0x0000000000000001  0x000000000000413e 
0x000000c0001cdac0:  0x00000000000040c6  0x0000000000004800 
0x000000c0001cdad0:  0x000000000000005a  0x0000000000000e10 
0x000000c0001cdae0:  0x000000c0005c5800  0x000000c0005c1000 
0x000000c0001cdaf0:  0x000000c0002243c0  0x000000c00024a8a0 
0x000000c0001cdb00:  0x000000c000224380  0x000000c00049e200 
0x000000c0001cdb10:  0x0000000000aeda60  0x000000c000230030 
0x000000c0001cdb20:  0x0000000000000000  0x0000000000000000 
0x000000c0001cdb30:  0x00000000007e3578 <encoding/json.(*encodeState).reflectValue+0x0000000000000078>  0x000000c0001cdba0 
0x000000c0001cdb40:  0x000000c00049e080  0x000000c0002300c0 
0x000000c0001cdb50:  0x000000c0001cdb80  0x000000c0001cdb80 
0x000000c0001cdb60:  0x000000000044c873 <runtime.selunlock+0x0000000000000073>  0x0000000d0043cef6 
0x000000c0001cdb70:  0x000000c0001ce8c0  0x00007fba67109140 
0x000000c0001cdb80:  0x0000000000000007  0x0000000000000000 
0x000000c0001cdb90:  0x000000c00045c000  0x0000000000000000 
0x000000c0001cdba0:  0x0000000000008000  0x0000000000000000 
0x000000c0001cdbb0:  0x0000000000000000  0x0000000000000000 
0x000000c0001cdbc0:  0x0000000000000206  0x000000c0001cea00 
0x000000c0001cdbd0:  0x0000000000000000  0x000000c0003eda00 
0x000000c0001cdbe0:  0x00007fba3cb56d30  0x000000000000000d 
0x000000c0001cdbf0:  0x000000c000157b0c  0x000000c0001ce8c0 
0x000000c0001cdc00:  0x000000000000000d  0x000000000000007e 
0x000000c0001cdc10:  0xffffffffffffffe0  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e> 
0x000000c0001cdc20:  0x000000c0001ce880  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e> 
0x000000c0001cdc30:  0x0000000000000206 !0x002b000000000033 
0x000000c0001cdc40: >0x0000000000000000  0x0000000000000000 
0x000000c0001cdc50:  0x0000000000000000  0x0000000000000000 
0x000000c0001cdc60:  0x000000c0001cdd40  0x0000000007270e00 
0x000000c0001cdc70:  0x0000000002625a00  0x000000c000282a00 
0x000000c0001cdc80:  0x000000000000233b  0x0000000000002500 
0x000000c0001cdc90:  0x000000c000048780  0x000000c000224500 
0x000000c0001cdca0:  0x000000c0000dc360  0x0000000000000000 
0x000000c0001cdcb0:  0x000000000001a9e7  0x000000000001a9e7 
0x000000c0001cdcc0:  0x000000c0001cdf78  0x000000000097681f <{GIT}/media-center/video-streams/pkg/muxer/fmp4.(*Fmp4Muxer).Handler+0x000000000000021f> 
0x000000c0001cdcd0:  0x000000c0001cde00  0x000000c00030a2d0 
0x000000c0001cdce0:  0x0000000000010000  0x00000000000f4240 
0x000000c0001cdcf0:  0x0000000007270e00  0x0000000002625a00 
0x000000c0001cdd00:  0x000000c000282a00  0x000000000000233b 
0x000000c0001cdd10:  0x0000000000002500  0x010100c0000f9ba0 
0x000000c0001cdd20:  0x000000000000007c  0x0000000000000080 
0x000000c0001cdd30:  0x000000000000007b  0x0000000000000000 
fatal error: unknown caller pc
unexpected fault address 0x8000
fatal error: fault

2.log

panic 3 Output
runtime: g 88: unexpected return pc for runtime.selectgo called from 0x0
stack: frame={sp:0xc000436a78, fp:0xc000436bb8} stack=[0xc000436000,0xc000437000)
0x000000c000436978:  0x0000000000aedb20  0x0000000000000060 
0x000000c000436988:  0x000000c000436a80  0x000000c000426ea0 
0x000000c000436998:  0x000000c000436a20  0x00000000004097a5 <runtime.chansend+0x00000000000005a5> 
0x000000c0004369a8:  0x00007fb95356ca68  0x000000c0001121e0 
0x000000c0004369b8:  0x000000c0005a2000  0x000000c000436a10 
0x000000c0004369c8:  0x0000000000000003  0x0000000000419250 <runtime.heapBitsSetType+0x0000000000000290> 
0x000000c0004369d8:  0x0000000000000000  0x0000000000000058 
0x000000c0004369e8:  0x000000c0004a82f8  0x0000000000000001 
0x000000c0004369f8:  0x000000c000436ba8  0x000000000092b72f <{GIT}/media-center/video-streams/pkg/stream.(*stream).Run.func2+0x00000000000001af> 
0x000000c000436a08:  0x000000000040dead <runtime.getitab+0x000000000000006d>  0x0000000000409860 <runtime.chansend.func1+0x0000000000000000> 
0x000000c000436a18:  0x000000c0004a82a0  0x000000c000436a50 
0x000000c000436a28:  0x00000000004091dd <runtime.chansend1+0x000000000000001d>  0x000000c0004a82a0 
0x000000c000436a38:  0x000000c000436a68  0x000000000044c768 <runtime.sellock+0x0000000000000068> 
0x000000c000436a48:  0x000000c000436a70  0x000000000043cef6 <runtime.gopark+0x00000000000000d6> 
0x000000c000436a58:  0x0000000000000001  0x000000c0004a8360 
0x000000c000436a68:  0x000000c000436ba8  0x000000000044d17e <runtime.selectgo+0x00000000000007be> 
0x000000c000436a78: <0x000000c000436d00  0x0000000000000002 
0x000000c000436a88:  0x000000000000002c  0x000000c000436cc4 
0x000000c000436a98:  0x0000000000000002  0x0000000001070460 
0x000000c000436aa8:  0x0000000100412030  0x0000000000000000 
0x000000c000436ab8:  0x0000000000000002  0x0000000000000001 
0x000000c000436ac8:  0x0000000000000000  0xffffffffffffffff 
0x000000c000436ad8:  0x0000000000000000  0x0000000002625a00 
0x000000c000436ae8:  0x000000c000287000  0x0000000000000000 
0x000000c000436af8:  0x0000000000000000  0x0000000000000001 
0x000000c000436b08:  0x0000000000000002  0x000000c000436ba8 
0x000000c000436b18:  0x0000000000478af1 <sync.(*Map).Range+0x00000000000001d1>  0x000000c0000dc6a0 
0x000000c000436b28:  0x000000c000436cc4  0x000000c000426d00 
0x000000c000436b38:  0x000000c0004a4410  0x000000c0004a8360 
0x000000c000436b48:  0x000000c000046480  0x000000c000046480 
0x000000c000436b58:  0x000000c000046480  0x000000c000426d88 
0x000000c000436b68:  0x0000000d00426e48  0x000000c0004378c0 
0x000000c000436b78:  0x00007fb954e5d140  0x0000000000000007 
0x000000c000436b88:  0x0000000000000000  0x000000c000644000 
0x000000c000436b98:  0x0000000000000000  0x0000000000008000 
0x000000c000436ba8:  0x0000000000000000 !0x0000000000000000 
0x000000c000436bb8: >0x0000000000000000  0x0000000000000206 
0x000000c000436bc8:  0x000000c000437a00  0x0000000000000000 
0x000000c000436bd8:  0x000000c0004271e0  0x00007fb929863f98 
0x000000c000436be8:  0x000000000000002b  0x000000c00019720c 
0x000000c000436bf8:  0x000000c0004378c0  0x000000000000002b 
0x000000c000436c08:  0x000000000000007e  0xffffffffffffffe0 
0x000000c000436c18:  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x000000c000437880 
0x000000c000436c28:  0x0000000000405fae <runtime/internal/syscall.Syscall6+0x000000000000000e>  0x0000000000000206 
0x000000c000436c38:  0x002b000000000033  0x0000000000000000 
0x000000c000436c48:  0x0000000000000000  0x0000000000000000 
0x000000c000436c58:  0x0000000000000000  0x000000c000436d40 
0x000000c000436c68:  0x000000c00040a000  0x0000000000000001 
0x000000c000436c78:  0x0000000000000001  0x0000000000000000 
0x000000c000436c88:  0x00000000000f4240  0x0000000058370200 
0x000000c000436c98:  0x0000000002625a00  0x000000c000287000 
0x000000c000436ca8:  0x0000000000000000  0x0000000000003000 
fatal error: unknown caller pc


3.log

panic 4 Output
runtime: unexpected return pc for net/http.(*conn).serve called from 0x0
stack: frame={sp:0xc0000bab58, fp:0xc0000bafb8} stack=[0xc0000ba000,0xc0000bb000)
0x000000c0000baa58:  0x0000000000000000  0x0000000000411d05 <runtime.mallocgc+0x00000000000006c5> 
0x000000c0000baa68:  0x0000000000000001  0x0000000000000040 
0x000000c0000baa78:  0x0000000000000000  0x000000c000145580 
0x000000c0000baa88:  0x000000c0000baac0  0x00007f4a4e0a4e60 
0x000000c0000baa98:  0x0000000000000040  0x0000000000000000 
0x000000c0000baaa8:  0x0000000000000000  0x000000c0000ae800 
0x000000c0000baab8:  0x000000c00010e0c0  0x0000000000000000 
0x000000c0000baac8:  0x000000000047738e <sync.(*Pool).Get+0x000000000000008e>  0x000000c0000baaf8 
0x000000c0000baad8:  0x0000000000412067 <runtime.newobject+0x0000000000000027>  0x0000000000000040 
0x000000c0000baae8:  0x0000000000ae59c0  0x0000000000000001 
0x000000c0000baaf8:  0x000000c0000bab48  0x00000000006c23c8 <net/http.newBufioWriterSize+0x00000000000001a8> 
0x000000c0000bab08:  0x000000000103d1e0  0x0000000000000000 
0x000000c0000bab18:  0x0000000000497ff1 <context.WithCancel+0x00000000000000d1>  0x0000000000001000 
0x000000c0000bab28:  0x0000000000412067 <runtime.newobject+0x0000000000000027>  0x000000c000149000 
0x000000c0000bab38:  0x000000c0001400a0  0x0000000000000000 
0x000000c0000bab48:  0x000000c0000bafa8  0x00000000006c750b <net/http.(*conn).serve+0x000000000000032b> 
0x000000c0000bab58: <0x000000c0001400a0  0x0000000000c51158 
0x000000c0000bab68:  0x000000c00010e080  0x0000000000fe3180 
0x000000c0000bab78:  0x0000000000aefc20  0x000000c00011e240 
0x000000c0000bab88:  0x0000000000002000  0x0000000000000000 
0x000000c0000bab98:  0x0000000000000000  0x0000000000000000 
0x000000c0000baba8:  0x0000000d00000000  0x000000c0000bb8f8 
0x000000c0000babb8:  0x00007f4a7f9ef140  0x0000000000000007 
0x000000c0000babc8:  0x0000000000000000  0x000000c0005b0000 
0x000000c0000babd8:  0x0000000000000000  0x0000000000008000 
0x000000c0000babe8:  0x0000000000000000  0x0000000000000000 
0x000000c0000babf8:  0x0000000000000000  0x0000000000000202 
0x000000c0000bac08:  0x0000000000000000  0x0000000000000001 
0x000000c0000bac18:  0x000000c000403520  0x0000000000000001 
0x000000c0000bac28:  0x0000000000000009  0x000000c0004c4000 
0x000000c0000bac38:  0x000000c0000bb8f8  0x000000c000046500 
0x000000c0000bac48:  0x0000000000000001  0xffffffffffffffe0 
0x000000c0000bac58:  0x00000000004830fb <syscall.Syscall+0x000000000000001b>  0x000000c0000bb8a0 
0x000000c0000bac68:  0x00000000004830fb <syscall.Syscall+0x000000000000001b>  0x0000000000000202 
0x000000c0000bac78:  0x002b000000000033  0x0000000000000000 
0x000000c0000bac88:  0x0000000000000000  0x0000000000000000 
0x000000c0000bac98:  0x0000000000000000  0x000000c0000bad80 
0x000000c0000baca8:  0x0000000000000000  0x000000c0000bacd0 
0x000000c0000bacb8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bacc8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bacd8:  0x000000c0000bab58  0x00000000006c731c <net/http.(*conn).serve+0x000000000000013c> 
0x000000c0000bace8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bacf8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bad08:  0x0000000000000000  0x0000000000000000 
0x000000c0000bad18:  0x0000000000000000  0x0000000000000000 
0x000000c0000bad28:  0x0000000000000000  0x000000c0000ac560 
0x000000c0000bad38:  0x000000000044bf08 <runtime.sellock+0x0000000000000068>  0x000000c0000ae800 
0x000000c0000bad48:  0x000000c0000ac580  0x0000000000000000 
0x000000c0000bad58:  0x000000c000046500  0x000000c0000ac6a0 
0x000000c0000bad68:  0x000000000044c61b <runtime.selectgo+0x00000000000004bb>  0x000000c00011e2a0 
0x000000c0000bad78:  0x0000000000000003  0x000000000000037f 
0x000000c0000bad88:  0x0000000000000000  0x0000000000000000 
0x000000c0000bad98:  0x0000ffff00001fa0  0x0000000000000000 
0x000000c0000bada8:  0x0000000000000000  0x0000000000000000 
0x000000c0000badb8:  0x0000000000000000  0x0000000000000000 
0x000000c0000badc8:  0x0000000000000000  0x0000000000000000 
0x000000c0000badd8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bade8:  0x0000000000000000  0x0000000000000000 
0x000000c0000badf8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bae08:  0x0000000000000000  0x0000000000000000 
0x000000c0000bae18:  0x0000000000000000  0x3fe7a6d84cec031f 
0x000000c0000bae28:  0x0000000000000000  0x0000000000000000 
0x000000c0000bae38:  0x0000000000000000  0x412e848000000000 
0x000000c0000bae48:  0x0000000000000000  0x3fd3faba874feafa 
0x000000c0000bae58:  0x0000000000000000  0x3f844ef7ef321322 
0x000000c0000bae68:  0x0000000000000000  0x0000000000000000 
0x000000c0000bae78:  0x0000000000000000  0x3fe7a6d84cec031f 
0x000000c0000bae88:  0x0000000000000000  0x41486a0000000000 
0x000000c0000bae98:  0x0000000000000000  0x0000000000000000 
0x000000c0000baea8:  0x0000000000000000  0x41cdcd6500000000 
0x000000c0000baeb8:  0x0000000000000000  0x545555d5545455d5 
0x000000c0000baec8:  0x5555d55555555555  0x5654d555d555d554 
0x000000c0000baed8:  0x5757565656575050  0x5457575454575657 
0x000000c0000baee8:  0xd4d4d7d4d4d4d4d4  0x000000c0000e0f50 
0x000000c0000baef8:  0x000000c0000e10e0  0x000000c0000e0af0 
0x000000c0000baf08:  0x000000c0000e0d70  0x0000000000000000 
0x000000c0000baf18:  0x0000000000000000  0x0000000000000000 
0x000000c0000baf28:  0x000000c00010e000  0x0000000000c51158 
0x000000c0000baf38:  0x0000000000000000  0x00000000008fd620 <go.opentelemetry.io/otel/sdk/trace.(*batchSpanProcessor).processQueue.func1+0x0000000000000000> 
0x000000c0000baf48:  0x000000c000386aa0  0x00000a8c46505853 
0x000000c0000baf58:  0x00000000000002ff  0x0000000000000a88 
0x000000c0000baf68:  0x0000000000000000  0x0000000000000000 
0x000000c0000baf78:  0x0000000000000000  0x0000000000000203 
0x000000c0000baf88:  0x0000000000000000  0x0000000000000000 
0x000000c0000baf98:  0x0000000000000000  0x0000000000000000 
0x000000c0000bafa8:  0x0000000000000000 !0x0000000000000000 
0x000000c0000bafb8: >0x0000000000000000  0x0000000000000000 
0x000000c0000bafc8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bafd8:  0x0000000000000000  0x0000000000000000 
0x000000c0000bafe8:  0x0000000000000000  0x0000000000000000 
0x000000c0000baff8:  0x0000000000000000 
fatal error: unknown caller pc

runtime stack:
runtime.throw({0xb48ca2?, 0x1002f20?})
	/usr/local/go/src/runtime/panic.go:992 +0x71
runtime.gentraceback(0x10?, 0xc48208?, 0x100000000?, 0x7f4a12dfafc8?, 0x0, 0x0, 0x7fffffff, 0x7f4a12dfb128, 0x0?, 0x0)
	/usr/local/go/src/runtime/traceback.go:254 +0x1a36
runtime.scanstack(0xc0001024e0, 0xc000049c38)
	/usr/local/go/src/runtime/mgcmark.go:783 +0x1ba
runtime.markroot.func1()
	/usr/local/go/src/runtime/mgcmark.go:241 +0xc5
runtime.markroot(0xc000049c38, 0x20, 0x1)
	/usr/local/go/src/runtime/mgcmark.go:214 +0x1a5
runtime.gcDrain(0xc000049c38, 0x3)
	/usr/local/go/src/runtime/mgcmark.go:1047 +0x39f
runtime.gcBgMarkWorker.func2()
	/usr/local/go/src/runtime/mgc.go:1276 +0xa5
runtime.systemstack()
	/usr/local/go/src/runtime/asm_amd64.s:469 +0x49

goroutine 37 [GC worker (idle)]:
runtime.systemstack_switch()
	/usr/local/go/src/runtime/asm_amd64.s:436 fp=0xc000608758 sp=0xc000608750 pc=0x46ae20
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1263 +0x1b1 fp=0xc0006087e0 sp=0xc000608758 pc=0x41ff91
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0006087e8 sp=0xc0006087e0 pc=0x46d041
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1131 +0x25

@bcmills bcmills added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 11, 2023
@bcmills
Copy link
Member

bcmills commented Apr 11, 2023

Compare #48921.

@mknyszek
Copy link
Contributor

mknyszek commented Apr 12, 2023

In triage, the panics are happening all over the place, so this looks like the stack being smashed. Unfortunately we don't have enough detail here to investigate further. Maybe you could run your Go and C code with ASAN (go build -asan)? That might identify the issue. Note that if you're linking against other libraries that you will have to rebuild them with -fsanitize=address to get full coverage.

@mknyszek mknyszek added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 12, 2023
@mknyszek mknyszek added this to the Backlog milestone Apr 12, 2023
@mknyszek mknyszek changed the title runtime(cgo): unknown caller pc runtime: spurious unknown caller pc in cgo application Apr 12, 2023
@khlipeng
Copy link
Author

在分类中,到处都在发生恐慌,所以这看起来像是堆栈被砸碎了。不幸的是,我们在这里没有足够的细节来进一步调查。也许你可以用 ASAN ( ) 运行你的 Go 和 C 代码go build -asan?这可能会确定问题所在。请注意,如果您要链接到其他库,则必须重建它们才能-fsanitize=address获得全面覆盖。

use go build -asan , at runtime, it does not recur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
Status: Todo
Development

No branches or pull requests

3 participants