Skip to content

cgo fatal error #32228

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

Closed
litao09h opened this issue May 24, 2019 · 1 comment
Closed

cgo fatal error #32228

litao09h opened this issue May 24, 2019 · 1 comment

Comments

@litao09h
Copy link

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

$ go version
go version go1.10.3 linux/amd64

Does this issue reproduce with the latest release?

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=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build471889977=/tmp/go-build -gno-record-gcc-switches"


fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xffffffffffffffe4 pc=0x7f2cc6e3b5c6]
runtime stack:
.throw(0xf2701c, 0x2a)
/usr/local/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:372 +0x28e
goroutine 18337733 [syscall]:
runtime.cgocall(0xcb9d50, 0xc421bb9c90, 0x7f2c80812320)
/usr/local/go/src/runtime/cgocall.go:128 +0x64 fp=0xc421bb9c50 sp=0xc421bb9c18 pc=0x403374
/path/to/myfunc._Cfunc_start(0x7f2c80813a30, 0x0)
_cgo_gotypes.go:181 +0x4d fp=0xc421bb9c90 sp=0xc421bb9c50 pc=0xa3d0bd
/path/to/xx.Init(0xc42e98acb0, 0x71c0, 0xc42b4ff330, 0xc, 0xc42b4ff320, 0xb, 0xc42b4ff319, 0x1, 0xc428d29700, 0x32, ...)
/path/to/xg.go:90 +0x637 fp=0xc421bb9dd8 sp=0xc421bb9c90 pc=0xa3d997

What did you do?

Estimated to be related to memory gc

What did you expect to see?

The cause of the problem, how to avoid it

What did you see instead?

@bradfitz
Copy link
Contributor

Sorry, there's not enough information here to help you. (There's actually no information)

See the cgo rules at https://golang.org/cmd/cgo/, try Go 1.12, run with GODEBUG=cgocheck=2 (per that earlier URL), and try the golang-nuts mailing list if you have further question.

@golang golang locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants