[issue11915] test_ctypes hangs in sandbox

STINNER Victor report at bugs.python.org
Mon Apr 25 03:08:16 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

This issue comes from sandbox, not from ctypes.

Using sandbox, execv() C function doesn't close files with FD_CLOEXEC flag if the child program is a static program.

test_ctypes hangs on find_library() in subprocess.Popen._execute_child():
 - create a pipe for the child exception (if any)
 - fork
 - the parent reads this pipe
 - the child calls exec()
 - exec() closes the pipe and the parent continues its work
 - etc.

find_library() runs "ldconfig -p" in a subprocess, and so everything hangs on "the parent reads this pipe" because "exec() closes the pipe and the parent continues its work" doesn't occur.

----------
Added file: http://bugs.python.org/file21767/sandbox_exec_bug.c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11915>
_______________________________________


More information about the Python-bugs-list mailing list