On 8/27/2010 4:14 PM, Martin [gz] wrote:
> Public bug reported:
>
> When running selftest with --parallel=subprocess (and actually having
> 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=subprocess.STDOUT would be ideal, but until we prevent
> # noise on stderr it can interrupt the subunit protocol.
> process = subprocess.Popen(argv, stdin=subprocess.PIPE,
> stdout=subprocess.PIPE,
> stderr=subprocess.PIPE,
> 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'
instead of .wait(). Or possibly child.stderr.close() child.wait() since
that will avoid blocking at least.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----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-----