GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-102251: add missing cleanups for `test_import` by sunmy2019 · Pull Request #104796 · python/cpython Conversation
|
|
As I understand, this doesn't solve problem, just "shuts up" the noise from known refleaks on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That is not true. I do think I did resolve all ref leaks on Linux. But I did not test it on Windows. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Oh, seems on Windows problem doesn't solved. I rebuilt intepreter with your changes and got it: ./python -m test -R 3:3 test_import Running Debug|x64 interpreter... 0:00:00 Run tests sequentially 0:00:00 [1/1] test_import beginning 6 repetitions 123456 ...... test_import leaked [41, 43, 40] references, sum=124 test_import leaked [41, 41, 40] memory blocks, sum=122 test_import failed (reference leak) == Tests result: FAILURE == 1 test failed: test_import Total duration: 28.7 sec Tests result: FAILURE |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if '-R' in sys.argv or '--huntrleaks' in sys.argv: | ||
| # https://github.com/python/cpython/issues/102251 | ||
| raise unittest.SkipTest('unresolved refleaks (see gh-102251)') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This trick cannot be used with ./python -m test -j n, thus causing failures on CI.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
All ref leaks on Linux come from on Windows does give ref leaks |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Eclips4 Can you bisect which test leaks ref? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sure! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Also, I tried to found commit which introduce this reference leak ( in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Oh, seems your solution also works on Windows. ( I forgot to add Probably, it should be a another PR (at the current moment I still haven't found a solution). sys.modules.pop('package', None) sys.modules.pop('package.submodule', None) Refleak tests will pass. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The libregrtest modification seems way too hacky for my taste. What happens if you apply my suggestion for _testsinglephase.c, and revert all other changes introduced in this PR?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There are 3 leak points when running in Linux. Applying your suggestions only fixes one of them. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I suggest you turn this PR1 into a fix for this one issue, so we can land that fix. The fix is obvious; I can land that for you today. The rest of the changes are controversial; I think it would be wise to separate them out. Also: please don't tag people with in commit messages. Those commits ends up as noise in the GitHub notifications page. Footnotes
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I will create a new one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Status for buildbot run for commit 20307d0:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GitHub took me straight to "Files changed", so I didn't see the other comments before I gave an approving review. The change looks fine to me, but please be sure to address any other comments before this is merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The second part is split to #105085 I will make this PR focus on the 3rd |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Now this PR only has changes related to the 3rd part.
I think the correct thing to do here is to skip this specific test when hunting ref leaks. However, the previous approach does not work under I am open to any other methods. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit 5934e50 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit 60b4921 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing in favour of gh-106013. Thanks for the effort you've put into this @sunmy2019; highly appreciated! Also, thanks for keeping up with me; sorry for pushing you in different directions, but my opinions changed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.