failed fork with latest 2.4 linux kernel?
Eric Sandeen
sandeen.NO at SPAM.sgi.com
Sat Jan 6 01:21:13 EST 2001
Perhaps I'm way off track, but I seem to be experiencing kernel-related
crashing on a python script.
This is actually Red Hat's anaconda 7.1, modified to install the latest
2.4 kernel by default. (the installer itself also runs under 2.4.0)
Everything worked at -test11, but with -prerelease and 2.4.0, we get
this dump (the execWithCapture function is at the end of this message).
This will fail for any arv. The kernel version seems to be the only
variable here... any ideas?
Traceback (innermost last):
File "/usr/bin/anaconda", line 471, in ?
intf.run(todo, test = test)
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/text.py", line 1054, in
run
rc = apply (step[1](), step[2])
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/textw/timezone_text.py",
line 61, in __call__
timezones = self.getTimezoneList(test)
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/textw/timezone_text.py",
line 25, in getTimezoneList
zones = iutil.execWithCapture(cmd, [ cmd ], stdin = stdin)
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/iutil.py", line 128, in
execWithCapture
os.waitpid(childpid, 0)
OSError: [Errno 10] No child processes
Local variables in innermost frame:
argv: ['/usr/bin/gunzip']
childpid: 72
root: /
stdin: 10
read: 11
...
and the last function called is this:
def execWithCapture(command, argv, searchPath = 0, root = '/', stdin =
0):
if not os.access (root + command, os.X_OK):
if not os.access (command, os.X_OK):
raise RuntimeError, command + " can not be run"
else:
root = ""
(read, write) = os.pipe()
childpid = os.fork()
if (not childpid):
if (root and root != '/'): isys.chroot (root)
os.dup2(write, 1)
if stdin:
os.dup2(stdin, 0)
os.close(stdin)
if (searchPath):
os.execvp(command, argv)
else:
os.execv(command, argv)
sys.exit(1)
os.close(write)
rc = ""
s = "1"
while (s):
select.select([read], [], [])
s = os.read(read, 1000)
rc = rc + s
os.close(read)
os.waitpid(childpid, 0)
return rc
More information about the Python-list
mailing list