Summary: | sys-apps/sandbox issue with static binaries, pipes and FD_CLOEXEC | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Victor Stinner <victor.stinner> |
Component: | Sandbox | Assignee: | Sandbox Maintainers <sandbox> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | arfrever, chutzpah, dev-portage, kensington, python |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://bugs.python.org/issue11915 | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=278761 https://bugs.gentoo.org/show_bug.cgi?id=493226 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 438070, 438090, 438576, 438578, 438580, 438582 | ||
Attachments: |
Testcase to demonstrate the bug (require static.c)
Dummy static binary writing 1 MB into stdout (used by sandbox_exec_bug.c) |
Description
Victor Stinner
2011-04-25 23:54:08 UTC
Created attachment 271177 [details]
Testcase to demonstrate the bug (require static.c)
Created attachment 271179 [details]
Dummy static binary writing 1 MB into stdout (used by sandbox_exec_bug.c)
this boils down to the forked parent that ptraces the child not closing all of its fd's. so the parent has an open copy of the pipe still. having the parent close all of its fd's fixes this test (nice debugging work btw). i'll need to rework the logic so that sandbox itself doesn't need any fd's (it currently utilizes stderr for logging), and then the parent should be able to detach itself from all fd's. i've got this fixed locally ... just need to iron out the debug fallout (current code writes to stderr), and it should be good to go @python: Arfrever informs me that this bug affects the test suite of python-3.3.0. FEATURES="test -sandbox -usersandbox" is a workaround. (In reply to comment #5) > @python: Arfrever informs me that this bug affects the test suite of > python-3.3.0. FEATURES="test -sandbox -usersandbox" is a workaround. It also affects portage test cases after recent ctypes additions in the master branch. This triggers it: sandbox python3.3 pym/portage/tests/runTests \ pym/portage/tests/emerge/test_simple.py It hands in popen while running ldconfig -p. This is blocking python3.3 from being unmasked, so it would be nice to have a fix for this. *** Bug 452796 has been marked as a duplicate of this bug. *** vapier, can you please move on this? There's a bunch of stuff blocked on this, so it would be nice if you can release your fix. sandbox-2.6-r1 has a backport of the fix |