[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-09 Thread STINNER Victor
STINNER Victor added the comment: The bug should now be fixed. EINVAL is now also ignored even if the process is still running, same behaviour than UNIX with EPIPE. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset b319d09ee4427aac1ee8f298692127d34ef57dc0 by Victor Stinner in branch '3.6': bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004) https://github.com/python/cpython/commit/b319d09ee4427aac1ee8f298692127d34ef57dc0 --

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset e5bdad2201de45c203037e59491e4fea56def56d by Victor Stinner in branch '2.7': bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2006) https://github.com/python/cpython/commit/e5bdad2201de45c203037e59491e4fea56def56d --

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset df04c088493bdbc2defea5e225a94e9bdd8e759f by Victor Stinner in branch '3.5': bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2005) https://github.com/python/cpython/commit/df04c088493bdbc2defea5e225a94e9bdd8e759f --

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2073 ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2072 ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2071 ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset d52aa31378ae43e044a300edfe8285954c167216 by Victor Stinner in branch 'master': bpo-30418: Popen.communicate() always ignore EINVAL (#2002) https://github.com/python/cpython/commit/d52aa31378ae43e044a300edfe8285954c167216 --

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-06-08 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2069 ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-21 Thread STINNER Victor
STINNER Victor added the comment: So, would you mind to write such PR? -- ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-21 Thread STINNER Victor
STINNER Victor added the comment: Basically, Windows EINVAL here looks like UNIX EPIPE. I agree to always ignore it (remove the check on poll()). I added the poll() check when I added the EINVAL test because I don't know well Windows and I didn't know that write () can also fail with EINVAL if

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun
Eryk Sun added the comment: Addressing the underlying problem would require rewriting _Py_read and _Py_write_impl to directly call ReadFile and WriteFile instead of the CRT read and write functions. Barring that, on Windows _stdin_write would have to always ignore EINVAL. --

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor
STINNER Victor added the comment: Would you like to work on a PR Eryk? It seems like you understand the bug better than me ;-) -- ___ Python tracker ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun
Eryk Sun added the comment: > but the error is only ignored when the child process is still alive. This should instead be the error is only ignored when child process is *no longer* alive. -- ___ Python tracker

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread Eryk Sun
Eryk Sun added the comment: Seeing EINVAL here while the child process is alive could mean the read end of the pipe was closed. For example: >>> import time, subprocess >>> cmd = 'python -c "import os, time; os.close(0); time.sleep(15)"' >>> p = subprocess.Popen(cmd,

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests ___ Python tracker ___ ___

[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-20 Thread STINNER Victor
New submission from STINNER Victor: Hum, the following failing looks like bpo-19612, but it seems like the code took the "raise" path instead of the "pass" fails. try: self.stdin.write(input) < HERE except BrokenPipeError: pass #