-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_asyncio environment changed during test execution due to empty threading._dangling
without MainThread before some tests
#91676
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
Comments
threading._dangling
without MainThread before some teststhreading._dangling
without MainThread before some tests
I've also seen this one:
|
notice the specific weakref instance to the same address
|
The code in |
the irony of code that is supposed to help buildbot instability also being one probable cause of buildbot instability... |
The excess threads running on occasion after a test ends are asyncio concurrent.futures threadpool _worker threads named asyncio_0 or asyncio_1... The change that exacerbated this race condition notably no longer does a |
… no longer leaks its executor (pythonGH-91680) For things like test_asyncio.test_thread this was causing frequent "environment modified by test" errors as the executor threads had not always stopped running after the test was over. (cherry picked from commit 61570ae) Co-authored-by: Gregory P. Smith <[email protected]>
…eaks its executor (GH-91680) For things like test_asyncio.test_thread this was causing frequent "environment modified by test" errors as the executor threads had not always stopped running after the test was over. (cherry picked from commit 61570ae) Co-authored-by: Gregory P. Smith <[email protected]>
Thanks for the fix ;-) |
… no longer leaks its executor (pythonGH-91680) For things like test_asyncio.test_thread this was causing frequent "environment modified by test" errors as the executor threads had not always stopped running after the test was over. (cherry picked from commit 61570ae) Co-authored-by: Gregory P. Smith <[email protected]>
We're seeing frequent flakiness on CI and buildbots (heavily loaded systems, triggering more race conditions?) with test_asyncio of late. #91260 has some discussion as that seems to have surfaced it more frequently, at least in the stable 3.10 branch.
from a 3.10 branch with #91674 patched in.
from https://github.com/python/cpython/runs/6069450575?check_suite_focus=true CI and from many stable buildbots such as https://buildbot.python.org/all/#/builders/608/builds/700/steps/6/logs/stdio
While "interesting" for
_MainThread
to wind up inthreading._dangling
... code wise it should always be in there. Yet somehow it is not before execution?!?after a fork() from the non-main thread or from C, it won't be. danger - something is using fork with threads running, a guaranteed source of problems. Fixing it to always exist in _dangling beforehand would not be a bad thing, but only if we can figure out how it happens to not be in the first place.
The text was updated successfully, but these errors were encountered: