You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
subprocess with preexec_fn when fork() fails could corrupt PyErr state #78839
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/gpshead'closed_at=<Date2018-09-14.05:24:27.467>created_at=<Date2018-09-13.10:57:27.885>labels= ['extension-modules', '3.8', 'type-bug', '3.7']
title='subprocess with preexec_fn when fork() fails could corrupt PyErr state'updated_at=<Date2018-09-14.05:24:27.465>user='https://github.com/gpshead'
Found in the stdlib test suite while testing the fix for bpo-6721: When subprocess is called with a preexec_fn and os.register_at_fork has been used and the fork() system call fails, the Python error state is set before the "after fork in parent process" function calls that were registered were called. So they'd call back into Python code with a pending unreturned exception set.
boom. SystemError (or assertion failure in pydebug builds).
New changeset a20b6ad by Miss Islington (bot) (Gregory P. Smith) in branch 'master': bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255) a20b6ad
Activity
gpshead commentedon Sep 13, 2018
Found in the stdlib test suite while testing the fix for bpo-6721: When subprocess is called with a preexec_fn and os.register_at_fork has been used and the fork() system call fails, the Python error state is set before the "after fork in parent process" function calls that were registered were called. So they'd call back into Python code with a pending unreturned exception set.
boom. SystemError (or assertion failure in pydebug builds).
miss-islington commentedon Sep 13, 2018
New changeset a20b6ad by Miss Islington (bot) (Gregory P. Smith) in branch 'master':
bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255)
a20b6ad
miss-islington commentedon Sep 13, 2018
New changeset b2ff9a9 by Miss Islington (bot) in branch '3.7':
bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255)
b2ff9a9