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

Open
mediocregopher opened this Issue Nov 2, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@mediocregopher

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?

yes

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 https://gist.githubusercontent.com/mediocregopher/5b365a3dfedb58dfff5e7dc973dee480/raw/761d04ae1ebd44f2d806aa33bad16dde38d8e401/panic_test.go > panic_test.go
go get -u github.com/mediocregopher/radix.v3
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:
with_cgo.txt

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.

@agnivade

This comment has been minimized.

Member

agnivade commented Nov 2, 2018

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

@mediocregopher

This comment has been minimized.

mediocregopher commented Nov 2, 2018

Wow that was a stupid mistake, sorry >_<

curl https://gist.githubusercontent.com/mediocregopher/5b365a3dfedb58dfff5e7dc973dee480/raw/71d923f7fef25ea401396b3db01cae5dc3610d50/panic_test.go > panic_test.go
go get -u github.com/mediocregopher/radix.v3
go test -v -run xxx -bench Panic -benchmem

should actually panic.

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

@mengzhuo

This comment has been minimized.

Contributor

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
PASS
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