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

math/bits: TestDiv32PanicOverflow, fatal error: unexpected signal during runtime execution #37065

Closed
mewmew opened this issue Feb 5, 2020 · 2 comments

Comments

@mewmew
Copy link
Contributor

mewmew commented Feb 5, 2020

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

$ go version

go version devel +88ae4ccefb Wed Feb 5 20:54:27 2020 +0000 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

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/u/.cache/go-build"
GOENV="/home/u/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/u/goget:/home/u/Desktop/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/u/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/u/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/u/go/src/go.mod"
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-build846989873=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Pull the latest revision of Go (rev 88ae4cc), and then trying to build using src/all.bash.

What did you expect to see?

All tests passing.

What did you see instead?

This panic on go test math/bits. Note, the panic is reproducible, and occurs every time I run go test math/bits.

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x680000 pc=0x462e34]

goroutine 21 [running]:
runtime.throw(0x55415a, 0x2a)
	/home/u/go/src/runtime/panic.go:1112 +0x72 fp=0xc00002e600 sp=0xc00002e5d0 pc=0x431f52
runtime.sigpanic()
	/home/u/go/src/runtime/signal_unix.go:671 +0x46a fp=0xc00002e630 sp=0xc00002e600 pc=0x446a0a
runtime.memmove(0x67a700, 0x680000, 0x200)
	/home/u/go/src/runtime/memmove_amd64.s:250 +0x2a4 fp=0xc00002e638 sp=0xc00002e630 pc=0x462e34
runtime.recordForPanic(0x577800, 0x647f50, 0x647f50)
	/home/u/go/src/runtime/print.go:46 +0x101 fp=0xc00002e670 sp=0xc00002e638 pc=0x433591
runtime.gwrite(0x577800, 0x647f50, 0x647f50)
	/home/u/go/src/runtime/print.go:90 +0x4c fp=0xc00002e6b0 sp=0xc00002e670 pc=0x43372c
runtime.printstring(0x577800, 0x647f50)
	/home/u/go/src/runtime/print.go:242 +0x78 fp=0xc00002e700 sp=0xc00002e6b0 pc=0x433fa8
math/bits.Div32(...)
	/home/u/go/src/math/bits/bits.go:501
math/bits_test.TestDiv32PanicOverflow(0xc000087200)
	/home/u/go/src/math/bits/bits_test.go:931 +0x6e fp=0xc00002e780 sp=0xc00002e700 pc=0x50047e
testing.tRunner(0xc000087200, 0x556838)
	/home/u/go/src/testing/testing.go:993 +0xdc fp=0xc00002e7d0 sp=0xc00002e780 pc=0x4c013c
runtime.goexit()
	/home/u/go/src/runtime/asm_amd64.s:1375 +0x1 fp=0xc00002e7d8 sp=0xc00002e7d0 pc=0x4619f1
created by testing.(*T).Run
	/home/u/go/src/testing/testing.go:1044 +0x357

goroutine 1 [chan receive]:
testing.(*T).Run(0xc000087200, 0x54f122, 0x16, 0x556838, 0x475801)
	/home/u/go/src/testing/testing.go:1045 +0x37e
testing.runTests.func1(0xc000086000)
	/home/u/go/src/testing/testing.go:1286 +0x78
testing.tRunner(0xc000086000, 0xc000066e10)
	/home/u/go/src/testing/testing.go:993 +0xdc
testing.runTests(0xc00000c080, 0x64ce60, 0x18, 0x18, 0x0)
	/home/u/go/src/testing/testing.go:1284 +0x2a7
testing.(*M).Run(0xc000082000, 0x0)
	/home/u/go/src/testing/testing.go:1201 +0x15f
main.main()
	_testmain.go:234 +0x135
FAIL	math/bits	0.025s
@randall77
Copy link
Contributor

I can't reproduce on linux/amd64 at this commit.

There's definitely something strange here:

runtime.printstring(0x577800, 0x647f50)
	/home/u/go/src/runtime/print.go:242 +0x78 fp=0xc00002e700 sp=0xc00002e6b0 pc=0x433fa8
math/bits.Div32(...)
	/home/u/go/src/math/bits/bits.go:501

The length of that string looks very wrong.

Any chance you have two Go instances installed, and the system is getting confused?
We've seen instances like this when the compiler comes from one release and the stdlib from another.

@mewmew
Copy link
Contributor Author

mewmew commented Feb 5, 2020

@randall77 Thanks for the quick response, and you were indeed correct. This was an issue on my end, I cleaned up my local machine and did a fresh clone of the Go repo at the specified revision, and now all.bash pass as expected.

Sorry for the noise. I'll close the issue as it was an error on my part.

Cheers,
Robin

@mewmew mewmew closed this as completed Feb 5, 2020
@golang golang locked and limited conversation to collaborators Feb 4, 2021
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