-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
test.libregrtest race condition in runtest_mp leads to 30 second delay in free-threaded build #117293
Closed
Tracked by
#108219
Labels
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 27, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 27, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 27, 2024
The worker thread may still be alive after it enqueues it's last result, which can lead to a delay of 30 seconds after the test finishes. This happens much more frequently in the free-threaded build with the GIL disabled. This changes run_workers.py to track of live workers by enqueueing a `WorkerExited()` instance before the worker exits.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 27, 2024
The worker thread may still be alive after it enqueues it's last result, which can lead to a delay of 30 seconds after the test finishes. This happens much more frequently in the free-threaded build with the GIL disabled. This changes run_workers.py to track of live workers by enqueueing a `WorkerExited()` instance before the worker exits.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 27, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 28, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Apr 1, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Apr 2, 2024
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Apr 4, 2024
colesbury
added a commit
that referenced
this issue
Apr 8, 2024
The worker thread may still be alive after it enqueues it's last result, which can lead to a delay of 30 seconds after the test finishes. This happens much more frequently in the free-threaded build with the GIL disabled. This changes run_workers.py to track of live workers by enqueueing a `WorkerExited()` instance before the worker exits.
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
The worker thread may still be alive after it enqueues it's last result, which can lead to a delay of 30 seconds after the test finishes. This happens much more frequently in the free-threaded build with the GIL disabled. This changes run_workers.py to track of live workers by enqueueing a `WorkerExited()` instance before the worker exits.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is related to #90363.
In #30470, the (partial) fix for that issue I wrote:
We are now seeing that 30 second delay when running some tests with the GIL disabled, such as
test_regrtest
.I think it's worth pursuing the approach used here, which avoids the race condition by tracking exiting workers by passing a sentinel value through the queue:
colesbury/nogil@406e5d7
Linked PRs
The text was updated successfully, but these errors were encountered: