[issue29335] Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD

2017-01-22 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD

2017-01-22 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD

2017-01-21 Thread Zach Riggle

Zach Riggle added the comment:

To further clarify the report:

When the attached proof-of-concept is executed, a RuntimeException is raised, 
which has a comment "Should never happen".

The issue isn't due to SIGCHLD, but rather following a waitpid() call.  The 
code attempts to suss the exit code / reason for waitpid() returning, but does 
not check for WIFSTOPPED in its handler.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD

2017-01-20 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29335] Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD

2017-01-20 Thread Zach Riggle

New submission from Zach Riggle:

The attached script hits some "This should never happen" code in the subprocess 
module.

These lines here:
https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L1036-L1038

The root cause is a lack of checking WIFSTOPPED and WSTOPSIG in the handler.

When a process elects into being ptraced via PTRACE_TRACEME, it is stopped on 
the SIGSEGV instead of terminating, allowing the user to attach a debugger 
before the kernel destroys the process.

This bug makes it impossible to wait on any process which crashes, which is set 
up to wait for a debugger.

--
components: Library (Lib)
files: bug.py
messages: 285921
nosy: Zach Riggle
priority: normal
severity: normal
status: open
title: Python 2.7 subprocess module does not check WIFSTOPPED on SIGCHLD
versions: Python 2.7
Added file: http://bugs.python.org/file46363/bug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com