[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > out of curiosity, did you actually diagnose a process deadlocked due to this > or was it noted via code inspection? The latter. I noted it while working on another issue. While it was easy to trigger a malloc() in child_exec() by e.g.

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Extension Modules resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset b90c68586e1f2c45c736dd38880f182be267e2ef by Gregory P. Smith (Miss Islington (bot)) in branch '3.6': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 2bb0bfafb0beb819b7c60d9004382ce6867847c0 by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5562)

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +5385 ___ Python tracker ___

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +5386 ___ Python tracker ___

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset c1e46e94de38a92f98736af9a42d89c3975a9919 by Gregory P. Smith (Alexey Izbyshev) in branch 'master': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560)

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: out of curiosity, did you actually diagnose a process deadlocked due to this or was it noted via code inspection? this issue has been around since 3.4 and the file descriptor inheritance changes from the looks of things. --

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +5382 stage: -> patch review ___ Python tracker ___

[issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe

2018-02-05 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : _Py_set_inheritable() raises a Python-level exception on error and thus is not async-signal-safe, but child_exec() must use only async-signal-safe functions because it's executed between fork() and exec(). Since a non-raising version