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: SIGSEGV in runtime.mapdelete_faststr #41170

Open
taoyuanyuan opened this issue Sep 2, 2020 · 2 comments
Open

runtime: SIGSEGV in runtime.mapdelete_faststr #41170

taoyuanyuan opened this issue Sep 2, 2020 · 2 comments

Comments

@taoyuanyuan
Copy link
Contributor

@taoyuanyuan taoyuanyuan commented Sep 2, 2020

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

$ go version
go version go1.12.7 linux/amd64

Does this issue reproduce with the latest release?

never test

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build509857713=/tmp/go-build -gno-record-gcc-switches"

What did you do?

unexpected fault address 0x17446ede014
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x17446ede014 pc=0x414e4f]

goroutine 15940029 [running]:
runtime.throw(0x19d10d9, 0x5)
    /usr/local/go/src/runtime/panic.go:617 +0x72 fp=0xc004df5760 sp=0xc004df5730 pc=0x42f672
runtime.sigpanic()
    /usr/local/go/src/runtime/signal_unix.go:397 +0x401 fp=0xc004df5790 sp=0xc004df5760 pc=0x445031
runtime.mapdelete_faststr(0x1745080, 0x17446ede014, 0x19e866b, 0x15)
    /usr/local/go/src/runtime/map_faststr.go:302 +0x2f fp=0xc004df57f8 sp=0xc004df5790 pc=0x414e4f
gitlab.alipay-inc.com/ant-mesh/mosn/vendor/mosn.io/mosn/pkg/protocol/rpc/sofarpc.(*BoltRequest).Del(0xc0018d3a80, 0x19e866b, 0x15)

the fault address was the same as "*hmap", the map had been gc?

What did you expect to see?

no panic

What did you see instead?

painc

@davecheney
Copy link
Contributor

@davecheney davecheney commented Sep 2, 2020

I’m sorry to report that go 1.12 is long out of support. Can you please upgrade to go 1.15.1 or later and confirm if the issue still exists. Thank you

@randall77
Copy link
Contributor

@randall77 randall77 commented Sep 2, 2020

That hmap value (0x17446ede014) looks corrupted. It should be in the Go heap (an address starting with 0xc0, like the fp and sp values), and it isn't. Run the race detector and see if that reports anything.
Audit your unsafe uses, that could also make this happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.