[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-16 Thread Xavion

Changes by Xavion :


Removed file: http://bugs.python.org/file44672/Output.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-15 Thread ppperry

Changes by ppperry :


--
type:  -> resource usage

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-15 Thread Antti Haapala

Antti Haapala added the comment:

Ahhah, the title should say: subprocess module leaks 4kiB memory **per thread**.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-15 Thread Florian Bruhin

Changes by Florian Bruhin :


--
nosy: +The Compiler

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-15 Thread Xavion

Xavion added the comment:

It's easier to reproduce the issue if you use a timer (rather than a loop).  
The newly attached logfile was generated with the following code fragment.

def fTest() :
check_output("true")
threading.Timer(1, fTest, ()).start()

--
Added file: http://bugs.python.org/file44672/Output.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-15 Thread Xavion

Changes by Xavion :


Removed file: http://bugs.python.org/file44671/Output.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-14 Thread Xavion

Xavion added the comment:

I wouldn't have reported this if it was only happening *once*.  I already have 
it in a loop; a new shell command is fired every second.

The memory footprint increases by roughly 4 KiB *each* time.  I monitor it via 
the following Bash script:
while true; do
ps -C "python3 ./Program.pyw" -o pid=,%mem=,rss= >> ./Output.log
sleep 1
done &

I have attached the logfile for your convenience.  Let me know if you'd like me 
to run any other tests.

--
Added file: http://bugs.python.org/file44671/Output.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-14 Thread Antti Haapala

Antti Haapala added the comment:

3.5.1+ ubuntu; I run the Popen case in while True, and watch `top` - not a 
single digit changes in the memory usage (the last digit being the kilobytes). 
That the memory footprint increases *once* by 4KiB is nothing; please run this 
in a loop.

--
nosy: +ztane

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28165] The 'subprocess' module leaks roughly 4 KiB of memory per call

2016-09-14 Thread Xavion

New submission from Xavion:

Each time I run a shell command via the 'subprocess' module, I notice that the 
memory footprint of my program increases by roughly 4 KiB.

I've tested the problem with two different slices of code; the result is the 
same in either case (long after the function finishes).

Code slice 1:
check_output("true")

Code slice 2:
pTest = Popen("true", stdout=PIPE, stderr=PIPE)
pTest.wait()
pTest.stdout.close()
pTest.stderr.close()
del pTest
gc.collect()

I'm using Python v3.5.2-1 on Arch Linux; it was installed via the [extra] 
repository.  Let me know if you need any further information.

--
components: Library (Lib)
messages: 276514
nosy: Xavion
priority: normal
severity: normal
status: open
title: The 'subprocess' module leaks roughly 4 KiB of memory per call
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com