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: unexpected signal during runtime execution - segmentation violation SIGSEGV #46666

Open
levesquejf opened this issue Jun 9, 2021 · 4 comments

Comments

@levesquejf
Copy link

@levesquejf levesquejf commented Jun 9, 2021

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

$ go version
go version go1.16.5 linux/amd64

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="arm"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.5"
GCCGO="gccgo"
GOARM="5"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build217510741=/tmp/go-build -gno-record-gcc-switches"

Note: I am using docker container golang:1.16.5 to build on linux/amd64 for linux/arm

What did you do?

My program crashed with this fatal error:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1ae2c]

runtime stack:
runtime.throw(0x497051, 0x2a)
	/usr/local/go/src/runtime/panic.go:1117 +0x5c
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:718 +0x224
runtime.unlock2(0x9f25e8)
	/usr/local/go/src/runtime/lock_futex.go:129 +0x94
runtime.unlockWithRank(...)
	/usr/local/go/src/runtime/lockrank_off.go:31
runtime.unlock(...)
	/usr/local/go/src/runtime/lock_futex.go:111
runtime.sysmon()
	/usr/local/go/src/runtime/proc.go:5217 +0x4a0
runtime.mstart1()
	/usr/local/go/src/runtime/proc.go:1306 +0xa0
runtime.mstart()
	/usr/local/go/src/runtime/proc.go:1272 +0x60

...all my goroutines stacks...
@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Jun 9, 2021

Thanks for report. What program do you run? Is this always reproducible or only fails sporadically? Thanks.

@cherrymui cherrymui changed the title unexpected signal during runtime execution - segmentation violation SIGSEGV runtime: unexpected signal during runtime execution - segmentation violation SIGSEGV Jun 9, 2021
@levesquejf
Copy link
Author

@levesquejf levesquejf commented Jun 9, 2021

My own code. It fails sporadically, no easy way to reproduce.

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Jun 9, 2021

Does the code use any unsafe code or cgo? Does this happen with a different version of Go?

Without more information it is hard to proceed from here. Thanks.

@levesquejf
Copy link
Author

@levesquejf levesquejf commented Jun 9, 2021

I don't use any unsafe or cgo. In the third-party modules I am using, I see some unsafe and some cgo for darwin... No worries, I understand it's hard with what I have to share. I will post here when it happens again and see if I have more info.

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
2 participants