Message357150
I reopen the issue, the change introduced a reference leak :-( Example:
$ ./python -m test -R 3:3 test_atexit -m test.test_atexit.SubinterpreterTest.test_callbacks_leak
0:00:00 load avg: 1.12 Run tests sequentially
0:00:00 load avg: 1.12 [1/1] test_atexit
beginning 6 repetitions
123456
......
test_atexit leaked [3988, 3986, 3988] references, sum=11962
test_atexit leaked [940, 939, 940] memory blocks, sum=2819
test_atexit failed
== Tests result: FAILURE ==
1 test failed:
test_atexit
Total duration: 466 ms
Tests result: FAILURE
It seems like each _testcapi.run_in_subinterp("pass") call leaks 3988 references.
I tried tracemalloc to see where the memory allocation are done, but tracemalloc reports a single Python line: the _testcapi.run_in_subinterp() call...
I tried to follow the increase of references using a watchpoint in gdb on _Py_RefTotal, but it takes a lot of time to follow each Py_INCREF/Py_DECREF knowning that we are talking aobut around 4,000 references. |
|
Date |
User |
Action |
Args |
2019-11-21 10:15:44 | vstinner | set | recipients:
+ vstinner, phsilva, eric.snow, pablogsal |
2019-11-21 10:15:44 | vstinner | set | messageid: <1574331344.57.0.351133659581.issue36854@roundup.psfhosted.org> |
2019-11-21 10:15:44 | vstinner | link | issue36854 messages |
2019-11-21 10:15:44 | vstinner | create | |
|