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_concurrent_futures/test_shutdown.py: test_cancel_futures_wait_false flaky #116682
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 12, 2024
If the shutdown() call happens before the worker thread starts executing the task then nothing will be printed to stdout.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 12, 2024
If the shutdown() call happens before the worker thread starts executing the task then nothing will be printed to stdout.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 12, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 13, 2024
pythonGH-116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout. (cherry picked from commit 7d1abe9) Co-authored-by: Sam Gross <colesbury@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 13, 2024
pythonGH-116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout. (cherry picked from commit 7d1abe9) Co-authored-by: Sam Gross <colesbury@gmail.com>
This was referenced Mar 13, 2024
tekicat
pushed a commit
to python-base/cpython
that referenced
this issue
Mar 13, 2024
python#116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout.
This might be related? https://github.com/python/cpython/actions/runs/8261299493/job/22598342550
|
@sobolevn I think the underlying cause is different:
They are similar in that sometimes the output is empty and the tests results are inconsistent. |
Let's open a separate issue for |
vstinner
pushed a commit
to vstinner/cpython
that referenced
this issue
Mar 20, 2024
python#116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout.
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
python#116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout.
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
python#116683) If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The test looks like:
cpython/Lib/test/test_concurrent_futures/test_shutdown.py
Lines 243 to 250 in bb66600
The problem is that if the worker thread starts executing after the
shutdown()
call, then the task will be canceled (becausecancel_futures=True
) and nothing will be printed. This happens sometimes with the GIL and more frequently in the free-threaded build with the GIL disabled.You can reliably trigger the problematic behavior by adding a short sleep at the beginning of the worker thread:
cpython/Lib/concurrent/futures/thread.py
Lines 69 to 70 in bb66600
i.e., add a
time.sleep(0.2)
before theif
statement.This test has been reported failing previously, but those issues were closed:
Linked PRs
The text was updated successfully, but these errors were encountered: