[issue20866] segfailt with os.popen and SIGPIPE

2014-12-10 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed stage: test needed - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866 ___

[issue20866] segfailt with os.popen and SIGPIPE

2014-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does anyone disagree with closing this as Won't fix'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866 ___

[issue20866] segfailt with os.popen and SIGPIPE

2014-12-07 Thread R. David Murray
R. David Murray added the comment: I agree it should be closed. Rewrite the IO system was done, and it was even backported to 2.x...it just isn't the default there. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-05 Thread akira
akira added the comment: Victor, where can you reproduce it (OS, python version, what C lib)? I don't receive segfault, only sigpipe (see msg217818 ). Here's gdb backtrace after the signal: Program received signal SIGPIPE, Broken pipe. 0x771e1040 in __write_nocancel () at

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-03 Thread akira
akira added the comment: I can't reproduce it on Ubuntu 12.04 with Python 2.7.3, 2.7.6, 3.2, tip -- no segfault. It prints the expected output on both Python 2 and 3: (standard input) io-error (standard input) is printed by grep due to --files-with-match option io-error (Broken pipe) is

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-03 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the crash. It occurs at the line fd.write(data). It looks like the crash occurs in the C function fwrite() which doesn't handle EPIPE / SIGPIPE correctly. Top of the gdb traceback: #0 0x0033d0a8968b in __mempcpy_sse2 () from

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-03 Thread Charles-François Natali
Charles-François Natali added the comment: I can reproduce the crash. It occurs at the line fd.write(data). It looks like the crash occurs in the C function fwrite() which doesn't handle EPIPE / SIGPIPE correctly. Wouldn't be the first time. Note that in Python 3, we don't fopen/fwrite

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I was thinking the same thing. This appears to be one of the 2.x bugs that have been fixed in 3.x but not 2.x because backporting the fix might break working code. If there another sensible fix that would be acceptable in 2.x? --

[issue20866] segfailt with os.popen and SIGPIPE

2014-05-03 Thread Charles-François Natali
Charles-François Natali added the comment: It's segfaulting inside fwrite(), so apart from completely rewriting the IO layer in 2.x, I don't see. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866

[issue20866] segfailt with os.popen and SIGPIPE

2014-03-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your example is ambiguous at to which of two pipings causes the problem. First you cat a large file into the script, which reads it in its entirety with data = sys.stdin.read(). If that causes the segfault, they everything that follows is irrelevant. If that

[issue20866] segfailt with os.popen and SIGPIPE

2014-03-07 Thread Hanno Boeck
New submission from Hanno Boeck: I experience a segmentation fault with python 2.7 (both 2.7.5 and 2.7.6 tested on Ubuntu and Gentoo) when a large file is piped, the pipe is passed to os.popen and the process sends a SIGPIPE signal. To create an easy to reproduce testcase grep can be used.