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: unknown pc during parallel benchmarks #28541

mediocregopher opened this Issue Nov 2, 2018 · 3 comments


None yet
4 participants

mediocregopher commented Nov 2, 2018

Please answer these questions before submitting your issue. Thanks!

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

go1.11.1 linux/arm64

Does this issue reproduce with the latest release?


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

I'm using archlinux installed into a chroot on a chromebook, which is arm64.

What did you do?

This error is quite easy for me to reproduce, but difficult to pin down a small test-case for it.

The following will cause the error, but requires a redis server to be running in order to do so:

curl > panic_test.go
go get -u
go test -v -run xxx -bench Panic -benchmem

What did you expect to see?

Both the panicking and not-panicking benchmarks to complete successfully.

What did you see instead?

If I run that with CGO_ENABLED=1 the runtime panics with an unknown pc error:

If I run it with CGO_ENABLED=0 it panics with an unexpected fault address: without_cgo.txt

Either way it seems the panicking is happening within the benchmark package, not my own, though I'm not able to find a reproducible test case without using my own code.


This comment has been minimized.


agnivade commented Nov 2, 2018

Your gist doesn't seem to have a panicking benchmark.


This comment has been minimized.

mediocregopher commented Nov 2, 2018

Wow that was a stupid mistake, sorry >_<

curl > panic_test.go
go get -u
go test -v -run xxx -bench Panic -benchmem

should actually panic.

@dmitshur dmitshur added this to the Go1.12 milestone Nov 4, 2018


This comment has been minimized.


mengzhuo commented Nov 13, 2018

I can't reproduce the panic 1.11.1 nor 1.11

~ go version
go version go1.11.1 linux/arm64
~ go test -v -run xxx -bench Panic -benchmem
goos: linux
goarch: arm64
BenchmarkPanic/not-panicking-8           1000000              1003 ns/op               0 B/op          0 allocs/op
BenchmarkPanic/panicking-8                100000             14668 ns/op              32 B/op          1 allocs/op
ok      _/root  2.671s
Linux hikey970 4.9.78-g6daba8c09 #1 SMP PREEMPT Tue Sep 11 23:25:44 CST 2018 aarch64 aarch64 aarch64 GNU/Linux
CPU: Hisilicon Kirin 970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment