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: offset too large #55357

Open
elagergren-spideroak opened this issue Sep 22, 2022 · 4 comments
Open

cmd/compile: panic: offset too large #55357

elagergren-spideroak opened this issue Sep 22, 2022 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@elagergren-spideroak
Copy link

elagergren-spideroak commented Sep 22, 2022

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

$ go version
go version go1.19 darwin/amd64

Does this issue reproduce with the latest release?

Unsure.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/x/gopath/bin"
GOCACHE="/Users/x/Library/Caches/go-build"
GOENV="/Users/x/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/x/gopath/pkg/mod"
GONOPROXY="*.s.com,*.s-s.com"
GONOSUMDB="*.s.com,*.s-s.com"
GOOS="darwin"
GOPATH="/Users/x/gopath"
GOPRIVATE="*.s.com,*.s-s.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2b/74fz3jhd4wz4vnbf4z7ywzww0000gp/T/go-build668550611=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ PROJ_TEST_LOG_STDERR=1 go test -v -vet all -failfast -run TestStashOutgoing 2>&1 | tee /tmp/logs.txt
# spideroak.com/proj/policy [spideroak.com/proj/policy.test]
panic: offset too large

goroutine 560 [running]:
cmd/compile/internal/liveness.(*argLiveness).emit(0xc001039800)
	/usr/local/go/src/cmd/compile/internal/liveness/arg.go:310 +0x3aa
cmd/compile/internal/liveness.ArgLiveness(0xc001ec92c0, 0xc000c32540, 0x123e35c?)
	/usr/local/go/src/cmd/compile/internal/liveness/arg.go:218 +0xab5
cmd/compile/internal/ssagen.genssa(0xc000c32540, 0xc00098dce0)
	/usr/local/go/src/cmd/compile/internal/ssagen/ssa.go:6834 +0x117
cmd/compile/internal/ssagen.Compile(0xc001ec92c0, 0xc002712f90?)
	/usr/local/go/src/cmd/compile/internal/ssagen/pgen.go:193 +0x26f
cmd/compile/internal/gc.compileFunctions.func4.1(0x0?)
	/usr/local/go/src/cmd/compile/internal/gc/compile.go:153 +0x3a
cmd/compile/internal/gc.compileFunctions.func3.1()
	/usr/local/go/src/cmd/compile/internal/gc/compile.go:140 +0x4d
created by cmd/compile/internal/gc.compileFunctions.func3
	/usr/local/go/src/cmd/compile/internal/gc/compile.go:138 +0x78
FAIL	spideroak.com/proj/policy [build failed]

I don't have any sort of repro yet. I've built this project easily hundreds of times with Go 1.19 and this is the first time it's happened. Of course, it hasn't happened in the dozens of test runs since. I know it's not much to work with, but it's probably better to report ICEs than not, right?

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 22, 2022
@cherrymui
Copy link
Member

cherrymui commented Sep 22, 2022

I've built this project easily hundreds of times with Go 1.19 and this is the first time it's happened.

Were they building the same source code, or different? That is, is this a nondeterministic failure, or an ICE because the input source code is changed? Thanks.

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 22, 2022
@elagergren-spideroak
Copy link
Author

elagergren-spideroak commented Sep 22, 2022

@cherrymui sorry, usually different source code.

I've lost my scrollback buffer, so I can't say for certain, I believe this compiler panic occurred after making an edit to the source code. But, I did re-run that same source code after the compiler panic occurred and it did (and has not) not panicked.

@cherrymui
Copy link
Member

cherrymui commented Sep 22, 2022

Thanks. So it sounds like nondeterministic failure. Maybe next time if you can have some input that can trigger the failure (even nondeterministically), that would be helpful.

For that particular panic, I think we only add to lv.args for offset < 0xff https://cs.opensource.google/go/go/+/master:src/cmd/compile/internal/liveness/arg.go;l=106, so it shouldn't happen. Maybe memory corruption or data race?

@cherrymui cherrymui added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 22, 2022
@elagergren-spideroak
Copy link
Author

elagergren-spideroak commented Sep 22, 2022

Yeah, if I can reproduce this again I'll certainly post more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
Status: No status
Development

No branches or pull requests

3 participants