[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44763/Test-3a-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44762/Test-3a-no-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-20 Thread Xavion
Xavion added the comment: Firstly, you've misquoted me. The quote you attributed to me in your latest post was actually made by 'ztane'. Secondly, your extra thread/event code makes no difference here. I will attach the memory usage logs in subsequent posts. For consistency, I have removed

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread STINNER Victor
STINNER Victor added the comment: If tracemalloc doesn't show any leak but the RSS memory increases, it can be memory fragmentation or memory alloctions not traced by tracemalloc. -- ___ Python tracker

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread Xavion
Xavion added the comment: What about when you test it using the files I provided? I didn't want you guys to have to write your own code. Note that I was monitoring the memory externally (via good old 'ps'). This could make a difference to the outcome. --

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread STINNER Victor
STINNER Victor added the comment: No memory leak if subprocess is spawned in a thread neither: --- import tracemalloc; tracemalloc.start() import subprocess, threading, time, gc def spawn(event) : subprocess.check_output("true") gc.collect(), gc.collect(), gc.collect() event.set()

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce any memory leak on subprocess itself: --- import tracemalloc; tracemalloc.start() import subprocess, gc def func(loops) : for x in range(loops): proc = subprocess.Popen(['true']) with proc: proc.wait() #

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread R. David Murray
R. David Murray added the comment: I only ran the second one. I didn't bother with the first one :) -- ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread Xavion
Xavion added the comment: Wow, that is surprising (given how simple it is)! Did you try both tests? Remember that only the second one produces the bug here. Let's leave this sit for a while. If no-one else can reproduce it on their OSs/distributions, I'll seek advice from the Arch

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-19 Thread R. David Murray
R. David Murray added the comment: I can't reproduce this with either python3.4.3 or 3.5 or 3.6 tip running it on gentoo linux. For me it bumps up initially but then remains constant even if I let it run for many more probes than in your example. I'm not sure what to suggest to you for

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44730/Test-2-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44729/Test-2-no-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44727/Test-1-no-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44726/Test-2.py ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44728/Test-1-gc.log ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44724/Test.sh ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Added file: http://bugs.python.org/file44725/Test-1.py ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Xavion added the comment: I put them into an archive so that the folder hierarchy would be preserved. Doing it that way makes it faster for you guys to run the tests at your end. Nonetheless, I will post the seven (7) files individually as well. It doesn't look like I can upload more than

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Changes by Xavion : Removed file: http://bugs.python.org/file44708/Memory-Leak-Test.zip ___ Python tracker ___

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread R. David Murray
R. David Murray added the comment: Could you post files instead of a zip, please? It will be easier to review. -- nosy: +r.david.murray ___ Python tracker

[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion
Xavion added the comment: Okay, I've modified the title to match what I've written below. I've just run some further tests on this problem. The attached archive contains code samples and the output generated (both with and without garbage collection). As you can see, the memory stays