Issue 15291: test_ast leaks memory a lot (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/59496

classification

Title: test_ast leaks memory a lot
Type: resource usage Stage: resolved
Components: Interpreter Core Versions: Python 3.3

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, georg.brandl, neologix, pitrou, python-dev, skrah
Priority: critical Keywords:

Created on 2012-07-08 10:18 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg164992 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-08 10:18
On the default branch, if you run test_ast in a loop: ./python -E -m test -F test_ast you will see that the process memory use grows very quickly. This doesn't happen on 3.2. I'm not a Valgrind expert so perhaps someone else can take a look. Otherwise I'll try to bisect.
msg164994 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-08 10:26
So, the culprit is: changeset: 75542:3877bf2e3235 user: Benjamin Peterson <benjamin@python.org> date: Mon Mar 12 09:46:44 2012 -0700 summary: give the AST class a __dict__
msg164997 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-08 10:36
Strangely, the reference leak was fixed in: changeset: 75686:9e7f6ddc0d76 user: Benjamin Peterson <benjamin@python.org> date: Wed Mar 14 21:50:29 2012 -0500 summary: free AST's dict But it didn't fix the memory leak.
msg164999 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-08 10:45
New changeset 048d8d9aecf1 by Antoine Pitrou in branch 'default': Issue #15291: Fix a memory leak where AST nodes where not properly deallocated. http://hg.python.org/cpython/rev/048d8d9aecf1
msg165000 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-07-08 10:45
Well, that was easy :)
History
Date User Action Args
2022-04-11 14:57:32 admin set github: 59496
2012-07-08 10:45:48 pitrou set status: open -> closedresolution: fixedmessages: + stage: resolved
2012-07-08 10:45:24 python-dev set nosy: + python-devmessages: +
2012-07-08 10:36:05 pitrou set messages: +
2012-07-08 10:26:43 pitrou set nosy: + georg.brandl, benjamin.petersonmessages: +
2012-07-08 10🔞04 pitrou create