Message301058
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. |
|
Date |
User |
Action |
Args |
2017-08-31 20:18:12 | vstinner | set | recipients:
+ vstinner, rhettinger, methane, xiang.zhang |
2017-08-31 20:18:11 | vstinner | set | messageid: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> |
2017-08-31 20:18:11 | vstinner | link | issue31317 messages |
2017-08-31 20:18:11 | vstinner | create | |
|