Message6561
Code that repeatedly calls subprocess.Popen() will crash with
'Too many files open' error.
Attached files reproduce it. Crash is reproducable also with default
ulimit (1024).
Python code contains several patterns of Popen usage, all leaky.
Excpected: .communicate() and code that closes fds excplicitly
should be safe.
test script:
--------------------------
#! /bin/sh
# crash faster
ulimit -n 32
jython ./proctest.py
# jython leaves tty messed up
stty sane
--------------------------
Output:
$ ./test.sh
0
1
2
3
4
5
Traceback (most recent call last):
File "./proctest.py", line 9, in <module>
p = Popen(['true'])
File "/opt/apps/jython/Lib/subprocess.py", line 751, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/apps/jython/Lib/subprocess.py", line 1265, in _execute_child
raise OSError(e.getMessage() or e)
OSError: Cannot run program "true" (in directory "/home/marko/src/niisama/rarfile/jxx"): java.io.IOException: error=24, Too many open files |
|
Date |
User |
Action |
Args |
2011-07-03 06:00:35 | mkz | set | recipients:
+ mkz |
2011-07-03 06:00:35 | mkz | set | messageid: <1309672835.65.0.025648019176.issue1765@psf.upfronthosting.co.za> |
2011-07-03 06:00:35 | mkz | link | issue1765 messages |
2011-07-03 06:00:35 | mkz | create | |
|