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

time: TestTicker flaky with a short Duration on darwin-arm64-corellium builder #35692

Closed
bcmills opened this issue Nov 19, 2019 · 6 comments
Closed
Labels
help wanted mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Nov 19, 2019

#!watchflakes
post <- pkg == "time" && test == "TestTicker" && `\d+ .+ ticks took .+, expected`

time.TestTicker is consistently failing on the darwin-arm64-corellium builder (https://build.golang.org/log/ae40104c94a528ac4e0295ddf4d3fb34620250df):

--- FAIL: TestTicker (2.39s)
    tick_test.go:63: saw 5 errors
    tick_test.go:25: 10 20ms ticks took 535.802667ms, expected [160ms,240ms]
    tick_test.go:25: 10 20ms ticks took 388.628375ms, expected [160ms,240ms]
    tick_test.go:25: 10 20ms ticks took 461.014083ms, expected [160ms,240ms]
    tick_test.go:25: 10 20ms ticks took 459.991375ms, expected [160ms,240ms]
    tick_test.go:25: 10 20ms ticks took 539.964292ms, expected [160ms,240ms]
FAIL
FAIL	time	6.615s

It's not obvious to me whether that's due to a bug in TestTicker, a bug in the timer support on that platform, or just a really overloaded builder.

CC @ianlancetaylor @bradfitz

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 19, 2019
@ianlancetaylor
Copy link
Contributor

CC @eliasnaur in case there is something known about this.

@ianlancetaylor ianlancetaylor added this to the Go1.14 milestone Nov 19, 2019
@bcmills
Copy link
Contributor Author

bcmills commented Nov 19, 2019

(And @steeve.)

@bcmills bcmills added Builders x/build issues (builders, bots, dashboards) mobile Android, iOS, and x/mobile labels Nov 19, 2019
@gopherbot
Copy link

Change https://golang.org/cl/207839 mentions this issue: time: give TestTicker more time on darwin-arm64

gopherbot pushed a commit that referenced this issue Nov 19, 2019
The darwin-arm64-correlium builder was failing the test consistently
at the old values. Give the ticks more time to let the test pass.

Updates #35692

Change-Id: Ibc636cd4db2595c82f4e8c6c822c3df4c2b7e0a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/207839
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@ianlancetaylor
Copy link
Contributor

I committed a workaround to make the test pass by increasing the timeouts.

It would be nice if someone could figure out why that is necessary, though.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.14, Backlog Nov 19, 2019
@ianlancetaylor ianlancetaylor added help wanted and removed Builders x/build issues (builders, bots, dashboards) labels Nov 19, 2019
@bcmills bcmills changed the title time: TestTicker consistently failing on darwin-arm64-corellium builder time: TestTicker flaky with a short Duration on darwin-arm64-corellium builder Nov 19, 2019
@gopherbot
Copy link

Change https://golang.org/cl/339892 mentions this issue: time: fallback to slower TestTicker test after one failure

gopherbot pushed a commit that referenced this issue Oct 6, 2021
TestTicker is sensitive to overloaded or slow systems, where a 20ms
ticker running for 10 ticks has a total run time out of the range
[110ms, 290ms]. To counter this flakiness, it tries five times to
get a successful result. This is insufficient--an overloaded test
machine can introduce more than 100ms of delay across the test.

Reduce the five attempts to two, but use a 1s ticker for 8 ticks
in the second attempt.

Updates #46474.
Updates #35692.

Change-Id: Ibd5187b00ccceeb981b652f2af9a1c3766357b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/339892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
rcrozean pushed a commit to rcrozean/go that referenced this issue Oct 5, 2022
TestTicker is sensitive to overloaded or slow systems, where a 20ms
ticker running for 10 ticks has a total run time out of the range
[110ms, 290ms]. To counter this flakiness, it tries five times to
get a successful result. This is insufficient--an overloaded test
machine can introduce more than 100ms of delay across the test.

Reduce the five attempts to two, but use a 1s ticker for 8 ticks
in the second attempt.

Updates golang#46474.
Updates golang#35692.

Change-Id: Ibd5187b00ccceeb981b652f2af9a1c3766357b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/339892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
rcrozean pushed a commit to rcrozean/go that referenced this issue Oct 12, 2022
TestTicker is sensitive to overloaded or slow systems, where a 20ms
ticker running for 10 ticks has a total run time out of the range
[110ms, 290ms]. To counter this flakiness, it tries five times to
get a successful result. This is insufficient--an overloaded test
machine can introduce more than 100ms of delay across the test.

Reduce the five attempts to two, but use a 1s ticker for 8 ticks
in the second attempt.

Updates golang#46474.
Updates golang#35692.

Change-Id: Ibd5187b00ccceeb981b652f2af9a1c3766357b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/339892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
rcrozean pushed a commit to rcrozean/go that referenced this issue Oct 12, 2022
TestTicker is sensitive to overloaded or slow systems, where a 20ms
ticker running for 10 ticks has a total run time out of the range
[110ms, 290ms]. To counter this flakiness, it tries five times to
get a successful result. This is insufficient--an overloaded test
machine can introduce more than 100ms of delay across the test.

Reduce the five attempts to two, but use a 1s ticker for 8 ticks
in the second attempt.

Updates golang#46474.
Updates golang#35692.

Change-Id: Ibd5187b00ccceeb981b652f2af9a1c3766357b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/339892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 6, 2023
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
Status: Done
Development

No branches or pull requests

3 participants