This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年04月17日 18:56 by rfs, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg158565 - (view) | Author: Roland (rfs) | Date: 2012年04月17日 18:59 | |
subprocess leaks memory on win 7 64bit (Python 2.7.3 32bit).
The following code snippet will fill up memory slowly but completely after running it multiple times. When python exits the memory is not freed.
>>>>>>>>>>
import subprocess
import shlex
for i in range(0, 10000):
p = subprocess.Popen(shlex.split("ipconfig", posix=False))
result = p.communicate()
print "end"
<<<<<<<<<<
|
|||
| msg158602 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年04月18日 11:16 | |
I don't see any leak on Linux with Python 2.7 or Python 3.3. How much KB does subprocess leak per process? |
|||
| msg158604 - (view) | Author: Roland (rfs) | Date: 2012年04月18日 11:41 | |
20kb exactly, I can confirm it is only on Windows. I'm currently running some tests to make sure it isn't a general Windows problem. I'll post an update as soon as done. |
|||
| msg158605 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年04月18日 11:48 | |
> 20kb exactly, I can confirm it is only on Windows. I'm currently running some tests to make sure it isn't a general Windows problem. I'll post an update as soon as done. Oh, that's a lot. Can you please also try with Python 3.2? |
|||
| msg158627 - (view) | Author: Roland (rfs) | Date: 2012年04月18日 14:44 | |
Yes, ok, my sincere apologies, I should've tested more thoroughly before filing a report here. It seems to be a Windows problem. I could replicate the issue using a batch script (and Python 3.2 for that matter). I'm still in the dark about what it causes, but here's a more detailed problem description for those interested. http://tinyurl.com/cgbf4u2 |
|||
| msg158870 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年04月20日 18:39 | |
Does your last message mean that this issue should be closed here? |
|||
| msg158914 - (view) | Author: Roland (rfs) | Date: 2012年04月21日 10:41 | |
yes, thank you. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58811 |
| 2012年04月21日 10:48:08 | neologix | set | status: open -> closed resolution: not a bug stage: resolved |
| 2012年04月21日 10:41:32 | rfs | set | messages: + msg158914 |
| 2012年04月20日 18:39:50 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg158870 |
| 2012年04月18日 14:44:46 | rfs | set | messages: + msg158627 |
| 2012年04月18日 11:48:49 | vstinner | set | messages: + msg158605 |
| 2012年04月18日 11:41:47 | rfs | set | messages: + msg158604 |
| 2012年04月18日 11:16:14 | vstinner | set | nosy:
+ vstinner messages: + msg158602 title: Memory leak subprocess -> Memory leak subprocess on Windows |
| 2012年04月17日 23:37:28 | pitrou | set | components: + Library (Lib), Windows |
| 2012年04月17日 23:37:20 | pitrou | set | nosy:
+ tim.golden, brian.curtin |
| 2012年04月17日 18:59:41 | rfs | set | messages: + msg158565 |
| 2012年04月17日 18:56:01 | rfs | create | |