selftest --parallel=subprocess ignores child stderr pipes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
When running selftest with --parallel=
# stderr=
# noise on stderr it can interrupt the subunit protocol.
process = subprocess.
This is particularly bad as only stdout is ever read from before calling wait on the process, so if a child writes more than the OS pipe buffer size to stderr the process will hang.
I don't quite understand the comment on the code above, as while subunit is used, it will always be impossible to write arbitrary stuff to stdout without breaking things.
It appears that --parallel=fork leaves stderr on the same fd as the parent, so similarly removing the stderr argument above may be sifficent for now. It at least makes problems visible (though possibly intermingled) and prevents wedging.
Changed in bzr: | |
importance: | Undecided → Low |
status: | New → Confirmed |
tags: | added: check-for-breezy |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8/27/2010 4:14 PM, Martin [gz] wrote: subprocess (and actually having subprocess. STDOUT would be ideal, but until we prevent Popen(argv, stdin=subproces s.PIPE, subprocess. PIPE, subprocess. PIPE,
> Public bug reported:
>
> When running selftest with --parallel=
> more than one CPU or BZR_CONCURRENCY set to > 1) Bazaar creates the
> child processes for running the tests with a stderr pipe, but then never
> does anything with with the process.stderr argument.
>
> # stderr=
> # noise on stderr it can interrupt the subunit protocol.
> process = subprocess.
> stdout=
> stderr=
> bufsize=1)
>
> This is particularly bad as only stdout is ever read from before calling
> wait on the process, so if a child writes more than the OS pipe buffer
> size to stderr the process will hang.
>
> I don't quite understand the comment on the code above, as while subunit
> is used, it will always be impossible to write arbitrary stuff to stdout
> without breaking things.
>
> It appears that --parallel=fork leaves stderr on the same fd as the
> parent, so similarly removing the stderr argument above may be sifficent
> for now. It at least makes problems visible (though possibly
> intermingled) and prevents wedging.
>
> ** Affects: bzr
> Importance: Low
> Status: Confirmed
>
>
Seems reasonable to me. The other option is to use '.communicate' close() child.wait() since
instead of .wait(). Or possibly child.stderr.
that will avoid blocking at least.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
6mNoACgkQJdeBCY SNAAMHsACeMzJTd F2SyX8pU6nRd1S6 8M6S 4C2f+HlHblJP8wm 3/
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkx
+1MAoJjxg8VrbL8
=o9jV
-----END PGP SIGNATURE-----