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: panic during early copyelim crash #35658

Closed
mvdan opened this issue Nov 18, 2019 · 7 comments
Closed

cmd/compile: panic during early copyelim crash #35658

mvdan opened this issue Nov 18, 2019 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Nov 18, 2019

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

$ go version
go version devel +6ba0be1639 Sat Nov 16 20:31:45 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

Haven't checked; I assume not.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mvdan/.cache/go-build"
GOENV="/home/mvdan/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="brank.as/*"
GONOSUMDB="brank.as/*"
GOOS="linux"
GOPATH="/home/mvdan/go"
GOPRIVATE="brank.as/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/mvdan/tip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
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-build387823981=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version devel +6ba0be1639 Sat Nov 16 20:31:45 2019 +0000 linux/amd64
GOROOT/bin/go tool compile -V: compile version devel +6ba0be1639 Sat Nov 16 20:31:45 2019 +0000
uname -sr: Linux 5.3.11-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.30.
gdb --version: GNU gdb (GDB) 8.3.1

What did you do?

go install github.com/kevinburke/go-bindata

What did you expect to see?

Success.

What did you see instead?

/home/mvdan/go/pkg/mod/github.com/kevinburke/go-bindata@v3.16.0+incompatible/release.go:63:20: internal compiler error: 'writeReleaseAsset': panic during early copyelim while compiling writeReleaseAsset:

runtime error: invalid memory address or nil pointer dereference

goroutine 81 [running]:
cmd/compile/internal/ssa.Compile.func1(0xc000c9ef88, 0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/compile.go:47 +0xa5
panic(0xde2900, 0x154cfa0)
	/home/mvdan/tip/src/runtime/panic.go:961 +0x15d
cmd/compile/internal/ssa.copyelim(0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/copyelim.go:31 +0x1a0
cmd/compile/internal/ssa.Compile(0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/compile.go:92 +0x9a5
cmd/compile/internal/gc.buildssa(0xc000607080, 0x0, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/ssa.go:444 +0xcd8
cmd/compile/internal/gc.compileSSA(0xc000607080, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:298 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc000bdb200, 0xc000015d50, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:363 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:361 +0x128



goroutine 81 [running]:
runtime/debug.Stack(0x100a780, 0xc000128008, 0x0)
	/home/mvdan/tip/src/runtime/debug/stack.go:24 +0x9d
cmd/compile/internal/gc.Fatalf(0xc000cae000, 0x32, 0xc0004a6000, 0x5, 0x5)
	/home/mvdan/tip/src/cmd/compile/internal/gc/subr.go:193 +0x291
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000bb1080, 0x3f14100000009, 0xe6424c, 0x2c, 0xc000c82240, 0x4, 0x4)
	/home/mvdan/tip/src/cmd/compile/internal/gc/ssa.go:6805 +0x1b0
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/func.go:625
cmd/compile/internal/ssa.Compile.func1(0xc000c9ef88, 0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/compile.go:49 +0x216
panic(0xde2900, 0x154cfa0)
	/home/mvdan/tip/src/runtime/panic.go:961 +0x15d
cmd/compile/internal/ssa.copyelim(0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/copyelim.go:31 +0x1a0
cmd/compile/internal/ssa.Compile(0xc000b87760)
	/home/mvdan/tip/src/cmd/compile/internal/ssa/compile.go:92 +0x9a5
cmd/compile/internal/gc.buildssa(0xc000607080, 0x0, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/ssa.go:444 +0xcd8
cmd/compile/internal/gc.compileSSA(0xc000607080, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:298 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc000bdb200, 0xc000015d50, 0x0)
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:363 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/home/mvdan/tip/src/cmd/compile/internal/gc/pgen.go:361 +0x128

/cc @randall77

@cuonglm
Copy link
Member

cuonglm commented Nov 18, 2019

I can't reproduce this on Mac OSX.

@mvdan
Copy link
Member Author

mvdan commented Nov 18, 2019

It only happened one time, so I presume it's some sort of flake. If the info above isn't enough to write a test case and a fix, I can spend some time trying to reproduce it reliably.

@mvdan mvdan added this to the Go1.14 milestone Nov 18, 2019
@mvdan mvdan added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 18, 2019
@danscales
Copy link
Contributor

I built the compiler/go command, etc., at the indicated commit 6ba0be1 and then repeatedly did this command (-a to force recompile):

go install -a github.com/kevinburke/go-bindata

I wasn't able to reproduce on linux-amd64 on over 250 repetitions of the command

@mvdan
Copy link
Member Author

mvdan commented Nov 22, 2019

I just hit it one time, sorry. Perhaps the compiler devs can easily spot a reproducer and fix from the panic trace. If not, I will try to provide a reproducer.

@aclements
Copy link
Member

@mvdan, I assume this is on the same 5.3.8 kernel you reported in #35326?

@mvdan
Copy link
Member Author

mvdan commented Nov 22, 2019

Yes, I've been on a 5.3.x kernel since early October. I'm on 5.3.12 now, and if memory serves right, I should have been on 5.3.11 when this was filed.

@aclements
Copy link
Member

Thanks for confirming. I'm going to fold this into the memory corruption super-bug I just created and close this one since no one has been able to reproduce this specific failure.

@golang golang locked and limited conversation to collaborators Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants