-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-40115: Fix refleak in test_asyncio #19282
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
bpo-40115: Fix refleak in test_asyncio #19282
Conversation
🤖 New build scheduled with the buildbot fleet by @aeros for commit 13fa9a966ccf1a9c996085483a3ea1d351dee409 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Prior to merging, we should wait for the refleak tests to pass. |
The Ubuntu PR test in Azure Pipelines seems to be failing because the following URL is dead: https://www.openssl.org/source/openssl-1.1.1d.tar.gz. See line 184 of the build log. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Edit: I confirmed the refleak in I redid the tests locally directly on top of b61b818, and it was passing for
|
@vstinner From carefully looking over all of the buildbot logs and my own local testing, I believe the refleaks showing in the tests are entirely separate from both this PR and #19149. I strongly suspect they were introduced in-between b61b818 and the latest commit to master. With that in mind, is it okay to merge this PR instead of reverting b61b818? |
Without this change, With this change, it no longer leaks. So I confirm that this PR fix https://bugs.python.org/issue40115 |
I fixed it with commit 224e1c3: you need to rebase your PR on top of it. |
13fa9a9
to
93fde8c
Compare
On "buildbot/AMD64 Fedora Stable Refleaks PR", I see:
That's an unrelated regression: I created https://bugs.python.org/issue40149 I used test.bisect_cmd to identify one leaking test and then I used git bisect to identify which commit introduced the regression.
Sure. |
@vstinner Thanks for the clarification. It's my first time addressing a regression that I introduced, so I just wanted to double check. Also, I was unaware of (Note: the GitHub Actions Ubuntu test seems to be intermittently failing in the "Install dependencies" stage across several PRs. If someone hasn't already, I'll likely open a python-dev thread tomorrow to bring attention to it.) |
Oh crap, did that just revert the commit in a single click @vstinner? I saw something in the UI with the post-commit checks and wanted to check up on it; I accidentally misclicked "revert commit" instead of "view details". Edit: Never mind, fortunately it looks like that just created a separate branch in the cpython repository titled Edit2: Ned helped to clean up the branch after my email to python-committers, so there is no issue now. I'll try to be more careful w/ that in the future and keep in mind the active branches page for future reference. |
You cannot push a commit directly. Changes must go through a PR. I don't think that a single click is enough to revert a change :-) |
Yeah, I figured that out after I realized that it just created a branch; it's good to know for sure though. Thanks for clarifying, I'm still very new to having commit privileges. :-) (It gave me quite a bit of anxiety in the moment, but after Ned's response I realized that it was a much bigger deal in my mind than it actually was.) |
My change to remove daemon threads in concurrent.futures (#19149) revealed a subtle issue in
test_events.test_run_in_executor_cancel
: it does not properly clean up the executor's resources. This should be done by callingloop.shutdown_default_executor()
prior toloop.close()
, as is done inasyncio.run()
.Before:
After:
/cc @vstinner @pitrou @1st1
https://bugs.python.org/issue40115