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

cmd/compile: intermittently crash:unexpected fault address 0xc000c060a0 #32729

Open
andycook-bcs opened this issue Jun 21, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@andycook-bcs
Copy link

commented Jun 21, 2019

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

From the golang:1.12.6 Docker container.

$ go version go1.12.6 linux/amd64

Does this issue reproduce with the latest release?

Unknown if in 1.13.x

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

go env Output
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-build824262995=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Compiling a a moderately large project like normal. However we upgraded from GO 1.10.2 -> 1.12.6 it occasionally panic during compilation (1 out ~50) times?

  • No specific code to demonstrate problem.

What did you expect to see?

A successful compile with no panic.

What did you see instead?

This panic.

# strconv
unexpected fault address 0xc000c060a0
fatal error: fault
[signal SIGBUS: bus error code=0x2 addr=0xc000c060a0 pc=0xc7a2e0]

goroutine 33 [running]:
runtime.throw(0xe4eb44, 0x5)
	/usr/local/go/src/runtime/panic.go:617 +0x72 fp=0xc0009d98f8 sp=0xc0009d98c8 pc=0x42cbe2
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:387 +0x47e fp=0xc0009d9928 sp=0xc0009d98f8 pc=0x441aae
cmd/compile/internal/gc.newliveness(0xc0002c9b80, 0xc000900000, 0xc00064d100, 0x4, 0x4, 0xc00089f350, 0x0, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/plive.go:507 +0x2e0 fp=0xc0009d9a20 sp=0xc0009d9928 pc=0xc7a2e0
cmd/compile/internal/gc.liveness(0xc00070a030, 0xc000900000, 0xc000a8a310, 0x0, 0x0, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/plive.go:1394 +0x95 fp=0xc0009d9ab8 sp=0xc0009d9a20 pc=0xc81115
cmd/compile/internal/gc.genssa(0xc000900000, 0xc000a8a310)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:5097 +0x93 fp=0xc0009d9ee8 sp=0xc0009d9ab8 pc=0xcd19e3
cmd/compile/internal/gc.compileSSA(0xc0002c9b80, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:309 +0x350 fp=0xc0009d9f98 sp=0xc0009d9ee8 pc=0xc71b20
cmd/compile/internal/gc.compileFunctions.func2(0xc0003ba0c0, 0xc0003edab0, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:364 +0x49 fp=0xc0009d9fc8 sp=0xc0009d9f98 pc=0xd35859
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0009d9fd0 sp=0xc0009d9fc8 pc=0x45ae81
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:362 +0x129

goroutine 1 [chan send]:
cmd/compile/internal/gc.compileFunctions()
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:370 +0x17d
cmd/compile/internal/gc.Main(0xe767c8)
	/usr/local/go/src/cmd/compile/internal/gc/main.go:675 +0x3172
main.main()
	/usr/local/go/src/cmd/compile/main.go:51 +0xad

goroutine 16 [runnable]:
cmd/internal/obj.pctopcdata(0xc0000c8500, 0xc0008755e0, 0xc000000000, 0xc0000e6fd0, 0x0, 0xdc2660, 0xc0003a1b30, 0x0)
	/usr/local/go/src/cmd/internal/obj/pcln.go:287 +0x182
cmd/internal/obj.funcpctab(0xc0000c8500, 0xc000086ad0, 0xc0008755e0, 0xe5558c, 0xa, 0xe77028, 0xdc2660, 0xc0003a1b30)
	/usr/local/go/src/cmd/internal/obj/pcln.go:59 +0x13a
cmd/internal/obj.linkpcln(0xc0000c8500, 0xc0008755e0)
	/usr/local/go/src/cmd/internal/obj/pcln.go:370 +0x82e
cmd/internal/obj.Flushplist(0xc0000c8500, 0xc0009b7ec0, 0xc0008ec8e0, 0x7fff38385aa4, 0x7)
	/usr/local/go/src/cmd/internal/obj/plist.go:108 +0x749
cmd/compile/internal/gc.(*Progs).Flush(0xc00094bf80)
	/usr/local/go/src/cmd/compile/internal/gc/gsubr.go:93 +0xbc
cmd/compile/internal/gc.compileSSA(0xc0002c98c0, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:324 +0x5d4
cmd/compile/internal/gc.compileFunctions.func2(0xc0003ba0c0, 0xc0003edab0, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:364 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:362 +0x129

goroutine 34 [runnable]:
cmd/compile/internal/gc.(*ssafn).AllocFrame(0xc000397f50, 0xc000451ce0)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:153 +0x26c
cmd/compile/internal/ssa.stackframe(0xc000451ce0)
	/usr/local/go/src/cmd/compile/internal/ssa/stackframe.go:9 +0x39
cmd/compile/internal/ssa.Compile(0xc000451ce0)
	/usr/local/go/src/cmd/compile/internal/ssa/compile.go:90 +0x479
cmd/compile/internal/gc.buildssa(0xc0004091e0, 0x2, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:233 +0xbfd
cmd/compile/internal/gc.compileSSA(0xc0004091e0, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:299 +0x4d
cmd/compile/internal/gc.compileFunctions.func2(0xc0003ba0c0, 0xc0003edab0, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:364 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:362 +0x129

goroutine 35 [runnable]:
cmd/compile/internal/ssa.(*sparseSet).addAll(0xc000547ad0, 0xc00095d000, 0x4, 0x40)
	/usr/local/go/src/cmd/compile/internal/ssa/sparseset.go:43 +0x153
cmd/compile/internal/ssa.(*stackAllocState).computeLive(0xc0000d42c0, 0xc000bf6d80, 0x2c, 0x2c)
	/usr/local/go/src/cmd/compile/internal/ssa/stackalloc.go:317 +0x9ec
cmd/compile/internal/ssa.(*stackAllocState).init(0xc0000d42c0, 0xc00054e2c0, 0xc000bf6d80, 0x2c, 0x2c)
	/usr/local/go/src/cmd/compile/internal/ssa/stackalloc.go:125 +0x41b
cmd/compile/internal/ssa.stackalloc(0xc00054e2c0, 0xc000bf6d80, 0x2c, 0x2c, 0x0, 0x0, 0x0)
	/usr/local/go/src/cmd/compile/internal/ssa/stackalloc.go:87 +0xb0
cmd/compile/internal/ssa.(*regAllocState).regalloc(0xc000355b00, 0xc00054e2c0)
	/usr/local/go/src/cmd/compile/internal/ssa/regalloc.go:1644 +0x6d27
cmd/compile/internal/ssa.regalloc(0xc00054e2c0)
	/usr/local/go/src/cmd/compile/internal/ssa/regalloc.go:146 +0x62
cmd/compile/internal/ssa.Compile(0xc00054e2c0)
	/usr/local/go/src/cmd/compile/internal/ssa/compile.go:90 +0x479
cmd/compile/internal/gc.buildssa(0xc0004089a0, 0x3, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:233 +0xbfd
cmd/compile/internal/gc.compileSSA(0xc0004089a0, 0x3)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:299 +0x4d
cmd/compile/internal/gc.compileFunctions.func2(0xc0003ba0c0, 0xc0003edab0, 0x3)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:364 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:362 +0x129

@agnivade

This comment has been minimized.

Copy link
Member

commented Jun 22, 2019

Just to confirm - you are seeing this with 1.12.6 right ? Your Go version shows 1.10.2.

Could you also try with tip and see if you are experiencing the same issue -

$ go get golang.org/dl/gotip
$ gotip download

@randall77

@agnivade agnivade added this to the Go1.14 milestone Jun 22, 2019

@andycook-bcs

This comment has been minimized.

Copy link
Author

commented Jun 24, 2019

Just to confirm - you are seeing this with 1.12.6 right ? Your Go version shows 1.10.2.

Yes, sorry. Copy/Pasted from wrong window. This is definitely new from the 1.12.6 docker container.

I will try from tip soon. Might take a while to collect data since this is an intermittent bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.