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

misc/cgo/test: TestParallelSleep is still flaky #45586

Closed
bcmills opened this issue Apr 15, 2021 · 8 comments
Closed

misc/cgo/test: TestParallelSleep is still flaky #45586

bcmills opened this issue Apr 15, 2021 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 15, 2021

2021-04-15T12:38:13-7ad496b/windows-amd64-2012
2021-04-14T00:25:33-8dcc071/linux-ppc64le-buildlet
2020-04-19T03:12:32-a32262d/netbsd-amd64-9_0

--- FAIL: TestParallelSleep (1.57s)
    testx.go:225: difference in start time for two sleep(1) is 562ms
    testx.go:229: parallel 1-second sleeps slept for 0.562000 seconds
FAIL

See previously #6636, #5638, #5480, #4008, #3964.

CC @ianlancetaylor

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 15, 2021
@bcmills bcmills added this to the Backlog milestone Apr 15, 2021
@ianlancetaylor
Copy link
Contributor

Very odd that this would have suddenly occurred on three different platforms. Assuming that the original bug was not recurred, this is basically testing how long it takes to start a new goroutine. Very hard to believe that it would take half a second when nothing else should be going on.

CC @mknyszek @prattmic

@bcmills
Copy link
Contributor Author

bcmills commented Nov 4, 2021

@bcmills
Copy link
Contributor Author

bcmills commented Jan 28, 2022

One more today. This test failure seems potentially relevant to #44343, too.

greplogs --dashboard -md -l -e 'FAIL: TestParallelSleep' --since=2021-11-05

2022-01-27T21:11:21-f5fe5a4/windows-amd64-2016

@bcmills
Copy link
Contributor Author

bcmills commented Mar 10, 2022

greplogs --dashboard -md -l -e 'FAIL: TestParallelSleep' --since=2022-01-29

2022-03-09T21:31:58-a987aaf/windows-amd64-2016

@bcmills
Copy link
Contributor Author

bcmills commented Mar 10, 2022

Marking as release-blocker for Go 1.19.

(If this isn't a priority to fix for 1.19, we should skip the test so that it doesn't continue to add noise to the builders.)

@bcmills bcmills modified the milestones: Backlog, Go1.19 Mar 10, 2022
@jeremyfaller jeremyfaller removed their assignment Mar 23, 2022
@aclements
Copy link
Member

For reference, this test was added for issue #1560. It starts two parallel 1 second sleeps and checks that they overlap by at least 500 ms.

I'm not surprised this is flaky because it's fundamentally sensitive to timing and scheduling. It also takes a second to run.

I'm inclined to just delete this test. I think it's doing more harm than good.

@ianlancetaylor
Copy link
Contributor

I'll replace with a test for the same problem that is not timing dependent.

@ianlancetaylor ianlancetaylor self-assigned this Apr 13, 2022
@gopherbot
Copy link

Change https://go.dev/cl/400194 mentions this issue: misc/cgo/test: remove timing dependency from TestParallelSleep

@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker 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