This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-05-20.22:32:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hum, the following failing looks like bpo-19612, but it seems like the code took the "raise" path instead of the "pass" fails.

                self.stdin.write(input)   <~~~~ HERE
            except BrokenPipeError:
                pass  # communicate() must ignore broken pipe errors.
            except OSError as e:
                if e.errno == errno.EINVAL and self.poll() is not None:
                    # Issue #19612: On Windows, stdin.write() fails with EINVAL
                    # if the process already exited before the write

On AMD64 Windows7 SP1 3.x:

test_communicate (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_eintr (test.test_subprocess.ProcessTestCase) ... skipped 'Requires signal.SIGUSR1'
test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ERROR
C:\\3.x.kloth-win64\build\lib\ ResourceWarning: subprocess 1780 is still running
  ResourceWarning, source=self)
test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_errors (test.test_subprocess.ProcessTestCase) ... ok
test_communicate_pipe_buf (test.test_subprocess.ProcessTestCase) ... ok
ERROR: test_communicate_epipe (test.test_subprocess.ProcessTestCase)
Traceback (most recent call last):
  File "C:\\3.x.kloth-win64\build\lib\test\", line 1219, in test_communicate_epipe
    p.communicate(b"x" * 2**20)
  File "C:\\3.x.kloth-win64\build\lib\", line 838, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:\\3.x.kloth-win64\build\lib\", line 1072, in _communicate
  File "C:\\3.x.kloth-win64\build\lib\", line 778, in _stdin_write
OSError: [Errno 22] Invalid argument

Ran 261 tests in 43.540s

FAILED (errors=1, skipped=150)
test test_subprocess failed
Date User Action Args
2017-05-20 22:32:01vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower
2017-05-20 22:32:01vstinnersetmessageid: <>
2017-05-20 22:32:01vstinnerlinkissue30418 messages
2017-05-20 22:32:00vstinnercreate