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: panic with no details #19259

Closed
tlbtlbtlb opened this issue Feb 23, 2017 · 3 comments
Closed

runtime: panic with no details #19259

tlbtlbtlb opened this issue Feb 23, 2017 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@tlbtlbtlb
Copy link

tlbtlbtlb commented Feb 23, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.8rc3 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build054843203=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

This crash happened 5 times in 9500 hours of runtime while running http://github.com/openai/go-vncdriver. It uses the CGO library to interface with Python.

What did you expect to see?

No crash. Or at least, a stack trace telling me what part of our code caused it. It's not impossible that our code tries to slice beyond an array, but in that case I'd expect to see a stack trace.

This is with go 1.8beta3, but I saw the same crash with go 1.7.4 (details at openai/universe#134)

I'm not sure how to start debugging this.

What did you see instead?

panic: runtime error: slice bounds out of range
fatal error: panic on system stack

runtime stack:
panic(0x7fb59dd9ed00, 0xc42001a0f0)
	/usr/local/go/src/runtime/panic.go:389 +0x6d6

goroutine 3 [running]:
panic: runtime error: slice bounds out of range
fatal error: panic on system stack
panic during panic

runtime stack:
panic(0x7fb59dd9ed00, 0xc42001a0f0)
	/usr/local/go/src/runtime/panic.go:389 +0x6d6
panic(0x7fb59dd9ed00, 0xc42001a0f0)
	/usr/local/go/src/runtime/panic.go:389 +0x6d6
@JayNakrani JayNakrani changed the title Panic with no details runtime: panic with no details Feb 23, 2017
@JayNakrani JayNakrani added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 23, 2017
@ianlancetaylor
Copy link
Contributor

Can you tell us what line 389 of runtime/panic.go looks like in your Go sources? Because for me it looks like

		switch v := p.arg.(type) {

and that doesn't make any sense.

It appears that the out-of-range slice index is occurring somewhere in the runtime code while running on the system stack. The lack of traceback suggests that it is occurring while doing the traceback. But I'm not sure how to get much farther with such a rare reproducer.

@ianlancetaylor ianlancetaylor added this to the Go1.9 milestone Feb 23, 2017
@mvdan
Copy link
Member

mvdan commented Feb 23, 2017

@tlbtlbtlb since you're on 1.8rc3, have you tried 1.8?

@tlbtlbtlb
Copy link
Author

I'm sorry, this happened on a system with go 1.8rc3 installed, but the shared library was built with 1.7.4. I'll make sure we're using consistent go versions everywhere.

@golang golang locked and limited conversation to collaborators Feb 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants