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: TestCollisions failure on linux-arm64-longtest TryBot #59643

Closed
bcmills opened this issue Apr 14, 2023 · 3 comments
Closed

runtime: TestCollisions failure on linux-arm64-longtest TryBot #59643

bcmills opened this issue Apr 14, 2023 · 3 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 14, 2023

#!watchflakes
post <- pkg == "runtime" && test == "TestCollisions"

https://storage.googleapis.com/go-build-log/eb2e13b8/linux-arm64-longtest_dc236d4a.log:

--- FAIL: TestCollisions (0.68s)
    hash_test.go:779: too many collisions i=3 j=13 outputs=32768 out of 65536
    hash_test.go:779: too many collisions i=13 j=3 outputs=32768 out of 65536
FAIL
FAIL	runtime	154.178s
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 14, 2023
@bcmills
Copy link
Contributor Author

bcmills commented Apr 14, 2023

That was on release-branch.go1.20 at CL 484758.

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 14, 2023
@mknyszek mknyszek added this to the Backlog milestone Apr 19, 2023
@randall77
Copy link
Contributor

Weird. Probability says that the number of outputs should be close to 41427 (N balls in N bins, how many bins have a ball? N=65536). And the variance should be quite low, stddev is ~123. That means 32768 is 70 standard deviations away.

amd64 runs seem entirely consistent with that, both with amd64 assembly and with the fallback Go version. I see deviations at most in the small hundreds, not the tens of thousands.

arm64 looks different. The fallback is still ok, but the arm64 assembly has some weird behavior. For some cases it hits every bin exactly once! As a hash function that's great, but there's definitely something nonrandom about it. I have not been able to reproduce the described failure, but given the weird nonrandom behavior I'm less surprised.

Sounds like the arm64 assembly hash function needs some more mixing.

@gopherbot
Copy link

Change https://go.dev/cl/486616 mentions this issue: runtime: mix a bit more in arm64 hash function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Done
Development

No branches or pull requests

4 participants