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_zipfile leaks references on Python 3.5 on the wo Refleaks buildbots (Gentoo, Windows) #74860
Comments
[336/398/5] test_zipfile [135/398/3] test_zipfile |
I tried "./python -m test -R 3:3 test_zipfile" on Linux and my Windows VM, but I'm unable to reproduce the issue. Maybe I passed the wrong options to regrtest (-m test)? |
$ git checkout upstream/3.5
$ make -j8
$ ./python.exe -m test -R 3:3 test_zipfile
[1/1] test_zipfile
beginning 6 repetitions
123456
......
1 test OK. That is a pass on my macOS with upstream/3.5 |
I succeeded to reproduce the bug, but only when running the -jN option, like: ./python -m test -j2 -R 3:3 test_zipfile I reduced the test to: ./python -m test -j2 -R 3:3 test_zipfile -m test_random_open This test heavily use random.randint(). In fact, the bug doesn't come from test_zipfile, but it's an issue Python singleton objects. There is a bug in regrtest which doesn't call warmup_caches() in worker processes when using the -jN option (multiprocessing mode). My PR #2220 should fix the bug. Sadly, I didn't backport test_regrtest functional tests from master to 3.5 yet: see bpo-30383. |
It seems like Python 3.6 and master (3.7) are not impacted by this bug, thanks to my rework on regrtest (now libregrtest) in Python 3.6. It's unclear to me if Python 2.7 has the bug: I don't see the warm_caches() function. |
Ok, using attached test_x.py, I'm able to reproduce this bug on Python 2.7. |
I tested: "./python -m test -j2 -R 3:3 -m test_random_open test_zipfile" now pass on 2.7, 3.5, 3.6 and master branches. So this issue is now fixed. By the way, bpo-30776 should reduce even further false positive when hunting reference leaks. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: