git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t0008 hang on streaming test (OS X)

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 11, 2013, 16:09 UTC
Message-ID
<7vli5drsbw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130711133414.GF6015@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> On Wed, Jul 10, 2013 at 12:36:40PM -0400, Brian Gernhardt wrote:
>
>> The newest test in t0008 "streaming support for --stdin", seems to
>> hang sporadically on my MacBook Pro (running 10.8.4).  The hang seems
>> to be related to running it in parallel with other tests, as I can
>> only reliably cause it by running with prove  and -j 3.  However, once
>> that has hung I am able to semi-reliably have it occur by running the
>> test separately (with the test hung in the background, using separate
>> trash directories via the --root option).
>
> I can't replicate the hang here (on Linux) doing:
>
>   for i in `seq 1 30`; do
>       ./t0008-ignores.sh --root=/tmp/foo/$i &
>   done
It seems to hang on me with bash, but not dash, here.
Show 29 quoted lines
> Do you know which test it is hanging on? You mentioned that you can
> replicate it outside of "prove"; what does running with "-v" say?
>
> The last test in t0008, with the fifos, would make me the most
> suspicious. The way we do it _should_ be fine, but I'm wondering if the
> shell is blocking in exec here:
>
>   mkfifo in out &&
>   (git check-ignore -n -v --stdin <in >out &) &&
>   exec 9>in &&
>
> That is, if the fifo is not opened for some reason by the backgrounded
> process (there's a race, of course, but the outer shell should just
> block until the sub-shell actually opens it). I wonder if the
> descriptor-opening behavior of:
>
>   cmd <in >out &
>
> is different between shells (that is, if it backgrounds the opening of
> in and out on some shells, but not on others). But then I would expect
> it to fail consistently.
>
> Just for fun, does switching the middle line there to:
>
>   (sh -c "git check-ignore -n -v --stdin <in >out" &) &&
>
> have any effect?
>
> -Peff
Previous: Jeff KingNext: Jeff King
Message 5 of 10 in “t0008 hang on streaming test (OS X)”
  1. Brian GernhardtJul 10, 2013
  2. Antoine PelisseJul 10, 2013
  3. Brian GernhardtJul 11, 2013
  4. Jeff KingJul 11, 2013
  5. Junio C HamanoJul 11, 2013
  6. t0008: avoid SIGPIPE race condition on fifoJeff King, Jul 12, 2013
  7. Junio C HamanoJul 12, 2013
  8. Jeff KingJul 12, 2013
  9. Brian GernhardtJul 12, 2013
  10. Brian GernhardtJul 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.