Navigation Menu

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: TestPingPongHog fail randomly on linux/arm64 #20494

Closed
williamweixiao opened this issue May 25, 2017 · 8 comments
Closed

runtime: TestPingPongHog fail randomly on linux/arm64 #20494

williamweixiao opened this issue May 25, 2017 · 8 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@williamweixiao
Copy link
Member

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

go version devel +2d20ded Sat May 20 00:45:56 2017 +0000 linux/arm64

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

GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/weixia01/go"
GORACE=""
GOROOT="/home/weixia01/workspace/llt/golang/golang"
GOTOOLDIR="/home/weixia01/workspace/llt/golang/golang/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build257642744=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

$cd src/runtime
$go test -run="TestPingPongHog"

What did you expect to see?

PASS

What did you see instead?

--- FAIL: TestPingPongHog (0.15s)
proc_test.go:434: want hogCount/lightCount in [0.5, 2]; got 23000000/11097000 = 2.072632242948545
FAIL
exit status 1

@williamweixiao
Copy link
Member Author

williamweixiao commented May 25, 2017

I'm not sure whether the required range [0.5, 2] is reasonable.
I would appreciate it if someone can shed some light on the range.

@mvdan mvdan added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 25, 2017
@mvdan
Copy link
Member

mvdan commented May 25, 2017

How often does it fail? Does -race affect the frequency? I guess you used something like go test -run=TestPingPongHog -count 1000 to try many times and get a few failures?

@williamweixiao
Copy link
Member Author

The failure rate is about: 458/1000 (-count 1000)
The "-race" is only supported on amd64 and I can't use it on arm64.

@williamweixiao
Copy link
Member Author

I find there are failures even for amd64 but the rate is very small: 24/1000.
The "-race" will improve the failure rate to: 100%.
So it seems that arm64 just amplify the failure probability.

@williamweixiao
Copy link
Member Author

/cc @ianlancetaylor @bradfitz
any comments on the failure rate?

@ianlancetaylor
Copy link
Contributor

I just ran the test 1000 times on amd64 and saw 39 failures. The smallest ratio I saw was 0.4875967574815627 and the largest was 2.5314388371713212.

@aclements wrote the test so I will let him decide what to do.

@ianlancetaylor ianlancetaylor added this to the Go1.9 milestone May 31, 2017
@aclements
Copy link
Member

I think we can just expand the range a bit. There's was nothing special about the 2X. If this test weren't working, I would expect the gap to be closer to 1000X.

@gopherbot
Copy link

CL https://golang.org/cl/44859 mentions this issue.

@golang golang locked and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants