golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.71k stars 17.5k forks source link

runtime: issue in unwinder.next, if flr is not valid, sometimes gp.m is nil and crash #64863

Closed yongjichen closed 7 months ago

yongjichen commented 8 months ago

Go version

go1.21.4

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

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ccc/.cache/go-build'
GOENV='/home/ccc/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ccc/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ccc/go'
GOPRIVATE=''
GOPROXY='https://goproxy.io,direct'
GOROOT='/home/ccc/.go/go1.21.4'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/ccc/.go/go1.21.4/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/ccc/proj/go/test/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3367080928=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Test something with gomonkey, met a crash at traceback.go:477, not the expected error message.
I added some log, and found the gp.m is nil.

What did you expect to see?

the error message with invalid function info.

What did you see instead?

segmentation violation error

smiletrl commented 8 months ago

can you provide code sample to reproduce this error?

gopherbot commented 7 months ago

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.)