msg340861 - (view) |
Author: Kay Hayen (kayhayen) |
Date: 2019-04-25 20:28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Much like #9366 the same file can be used. This reference leaks according to Nuitka comparative testing: simpleFunction59: FAILED 129511 129512 leaked 1 def simpleFunction59(): a = 3 b = 5 try: a = a * 2 return a finally: return a / b I would be guessing, that you are leaking the return value when returning again. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340876 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-04-26 02:09 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
New changeset 4d29983185bc12ca685a1eb3873bacb8a7b67416 by Victor Stinner in branch 'master': bpo-36725: regrtest: add TestResult type (GH-12960) https://github.com/python/cpython/commit/4d29983185bc12ca685a1eb3873bacb8a7b67416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340883 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-04-26 06:40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
New changeset 3cde440f20a9db75fb2c4e65e8e4d04a53216a2d by Victor Stinner in branch 'master': bpo-36725: Refactor regrtest multiprocessing code (GH-12961) https://github.com/python/cpython/commit/3cde440f20a9db75fb2c4e65e8e4d04a53216a2d |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340888 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-04-26 07:33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sorry, the two commits are related to bpo-36719 not to this issue. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340890 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-04-26 07:40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I wrote an unit test to be able to re-use regrtest memory leak hunter: import unittest def simpleFunction59(): a = 1 try: return a finally: return a class Tests(unittest.TestCase): def test_bug(self): for _ in range(10): simpleFunction59() I confirm that there is a leak: $ ./python -m test -R 3:3 test_bug ... test_bug leaked [10, 10, 10] references, sum=30 ... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340901 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-04-26 10:16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
New changeset 1069d38fa18f3a4f97c2e358bcb3b82cab1c051b by Victor Stinner in branch '3.7': [3.7] bpo-36719: sync regrtest with master branch (GH-12967) https://github.com/python/cpython/commit/1069d38fa18f3a4f97c2e358bcb3b82cab1c051b |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340917 - (view) |
Author: Joannah Nanjekye (nanjekyejoannah) *  |
Date: 2019-04-26 14:01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Let me work on this. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg340920 - (view) |
Author: Joannah Nanjekye (nanjekyejoannah) *  |
Date: 2019-04-26 14:47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ victor, I have tried your example but I can not reproduce the leak as you did above. May be am missing something? I used some other tool and got this summary when I was investigating this: types | # objects |
total size ================================= |
=========== |
============ <class 'str |
3916 |
361.40 KB <class 'list |
2513 |
237.41 KB <class 'dict |
197 |
120.28 KB <class 'code |
617 |
86.79 KB <class 'type |
81 |
80.71 KB <class 'int |
497 |
13.60 KB <class 'tuple |
199 |
12.80 KB function (__init__) |
61 |
8.10 KB <class 'weakref |
87 |
6.80 KB <class 'getset_descriptor |
67 |
4.71 KB <class 'collections.OrderedDict |
3 |
4.22 KB <class 'enum.EnumMeta |
3 |
2.98 KB function (__call__) |
14 |
1.86 KB <class 'cell |
37 |
1.73 KB <enum 'Signals |
32 |
1.62 KB Am still investigating though. |
msg340921 - (view) |
Author: Joannah Nanjekye (nanjekyejoannah) *  |
Date: 2019-04-26 15:12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I am able to reproduce it finally. Run tests sequentially 0:00:00 load avg: 0.21 [1/1] test_bug beginning 6 repetitions 123456 ...... test_bug leaked [10, 10, 10] references, sum=30 test_bug failed == Tests result: FAILURE == 1 test failed: test_bug Total duration: 220 ms Tests result: FAILURE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg342340 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2019-05-13 15:31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This leak has been fixed by: commit f00828a742d2e88c910bdfd00f08fcd998554ba5 (refs/bisect/bad) Author: Pablo Galindo <Pablogsal@gmail.com> Date: Thu May 9 16:52:02 2019 +0100 bpo-36851: Clean the frame stack if the execution ends with a return and the stack is not empty (GH-13191) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|