This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, rhettinger, vstinner, xiang.zhang
Date 2017-08-31.20:18:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za>
In-reply-to
Content
Copy attached test_leak.py to Lib/test/ and run:

haypo@selma$ ./python -m test -R 3:30 test_leak

Run tests in parallel using 1 child processes
0:00:00 load avg: 0.67 [1/1/1] test_leak failed
beginning 33 repetitions
123456789012345678901234567890123
.................................
test_leak leaked [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] memory blocks, sum=30

1 test failed:
    test_leak

Total duration: 682 ms
Tests result: FAILURE


It seems like Thread2 constructor creates a dictionary on "self.hashvalue = (...)". It's a dictionary sharing keys, but it seems like the dict table memory is not released whne the bug occurs.


Sadly, I'm only able to reproduce the bug on a 32-bit build. Since the bug depends on exact hash values, maybe the bug exists in 64-bit builds, but is less likely?


I'm not 100% sure if the bug is related to dict or set.


The bug comes from bpo-31217.
History
Date User Action Args
2017-08-31 20:18:12vstinnersetrecipients: + vstinner, rhettinger, methane, xiang.zhang
2017-08-31 20:18:11vstinnersetmessageid: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za>
2017-08-31 20:18:11vstinnerlinkissue31317 messages
2017-08-31 20:18:11vstinnercreate