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: TestCgoLockOSThreadExit failures with sub thread still running #58247

Closed
bcmills opened this issue Feb 2, 2023 · 2 comments
Closed
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge 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

@bcmills
Copy link
Contributor

bcmills commented Feb 2, 2023

#!watchflakes
post <- pkg == "runtime" && test == "TestCgoLockOSThreadExit" && `sub thread still running`

(Pulled out from #57083 (comment).)

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. compiler/runtime Issues related to the Go compiler and/or runtime. labels Feb 2, 2023
@bcmills bcmills added this to the Backlog milestone Feb 2, 2023
@gopherbot
Copy link

Change https://go.dev/cl/464735 mentions this issue: runtime: eliminate arbitrary timeout in TestCgoLockOSThreadExit

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "runtime" && test == "TestCgoLockOSThreadExit" && `sub thread still running`
2023-01-24 19:18 dragonfly-amd64-622 go@27500d88 runtime.TestCgoLockOSThreadExit (log)
--- FAIL: TestCgoLockOSThreadExit (1.61s)
    crash_test.go:58: /tmp/workdir/tmp/go-build3735151313/testprogcgo.exe LockOSThreadMain (61.642428ms): ok
    crash_test.go:58: /tmp/workdir/tmp/go-build3735151313/testprogcgo.exe LockOSThreadAlt: exit status 1
    proc_test.go:988: want "OK\n", got "sub thread still running\n"

watchflakes

johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
This test previously failed if running a new pthread took longer than
a hard-coded 100ms. On some slow or heavily-loaded builders, that
scheduling latency is too short.

Since the point of this test is to verify that the background thread
is not reused after it terminates (see golang#20395), the arbitrary time
limit does not seem helpful: if the background thread fails to
terminate the test will time out on its own, and if the main goroutine
is scheduled on the background thread the test will fail regardless of
how long it takes.

Fixes golang#58247.

Change-Id: I626af52aac55af7a4c0e7829798573c479750c20
Reviewed-on: https://go-review.googlesource.com/c/go/+/464735
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge 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
Status: Done
Development

No branches or pull requests

2 participants