-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Numerous refleaks on main #103879
Comments
The failure on
|
Given that refleak buildbots passed on #103882, it seems this is fixed now. |
Thanks @JelleZijlstra for fixing! |
No problem! https://buildbot.python.org/all/#/release_status is still red but I assume the buildbots are running now. Given that the refleak buildbots were green on my PR, we probably did fix the issue. |
I wasn't able to reproduce the new leak locally (tried both MacOS and Linux). It seems to happen only on one buildbot. |
The leak of Visible at Usually, rerunning the tests will let it pass. (Warning, no errors) I suspect something changed in the test environment. |
This is not true. https://buildbot.python.org/all/#/builders/766/builds/770 ... |
@JelleZijlstra I can reproduce it with
Single processing will not cause leakage. |
Good catch, that reproduces it for me too. |
Current status: Found most leakage is from
I took a quick look, state->error = PyErr_NewException("_testsinglephase.error", NULL, NULL);
cpython/Modules/_testsinglephase.c Lines 125 to 148 in 738c226
At least, I found @ericsnowcurrently Can you please take a look since the last change is yours? |
@ericvsmith I tracked down the problem. Hope you can fix it and add me as a co-author. 1
2
When I manually add and call the clean-up function. Ref leaks are gone. 3cpython/Lib/test/test_import/__init__.py Lines 2458 to 2462 in 738c226
No cleanup was made against Most of the ref leaks in |
@sunmy2019, there are known refleaks in test_import. See gh-102251. Are you talking about more than that? Also, your analysis is helpful. Thanks! |
Yes, I am talking about The ref leak in and still visible and reproducible on ./python -m test -j1 -R 3:3 test_import The above guide should help you clear major ref leaks in |
The tests in question were moved from test_imp to test_import. |
I think the main refleaks are fixed now, closing this as the |
https://buildbot.python.org/all/#/release_status shows that the refleak buildbots are failing on current main. Example output on https://buildbot.python.org/all/#/builders/75/builds/745/steps/5/logs/warnings__111_.
Failing tests:
I saw similar leaks triggering the refleak buildbots on #103866 and #103764, before I realized the issue was probably on main.
Based on @sunmy2019's work in #103764 (comment), we're likely leaking references to the
object.__setattr__
wrapper descriptor.Linked PRs
The text was updated successfully, but these errors were encountered: