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

strings: TestBuilderGrow test flake #24647

Closed
josharian opened this issue Apr 2, 2018 · 2 comments
Closed

strings: TestBuilderGrow test flake #24647

josharian opened this issue Apr 2, 2018 · 2 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@josharian
Copy link
Contributor

https://build.golang.org/log/bc6b2519adffb638dbe8ad1fcd447d1737740e6d

--- FAIL: TestBuilderGrow (0.04s)
	builder_test.go:94: growLen=10000: allocation occurred during write
FAIL
FAIL	strings	5.487s

@aclements commented over in #24631 about alloc measurements in the testing package:

I worry slightly that the random background allocations that aren't coupled to iterations (e.g., when a GC cycle runs) would almost always cause this number to be slightly above a whole number and that that could confuse people.

Perhaps that effect is responsible for this build failure. Note that the strings package has its own handrolled alloc count implementation, one which does no averaging and is thus more susceptible to such flakes.

cc @cespare @bradfitz

@josharian josharian added the Testing An issue that has been verified to require only test changes, not just a test failure. label Apr 2, 2018
@josharian josharian added this to the Go1.11 milestone Apr 2, 2018
@bcmills
Copy link
Contributor

bcmills commented Apr 2, 2018

Seems like the “no allocations” tests could just try that part of the test over again if there are unexpected allocs. (We do need to cut it off eventually, but we could run arbitrarily many iterations — or fall back to testing.AllocsPerRun — before we give up.)

@josharian josharian added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Apr 2, 2018
@bradfitz bradfitz self-assigned this Apr 2, 2018
@gopherbot
Copy link

Change https://golang.org/cl/104235 mentions this issue: strings: fix flaky TestBuilderGrow test

@golang golang locked and limited conversation to collaborators Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. 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

4 participants