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

Re: t0008 hang on streaming test (OS X)

From
Jeff King <peff@peff.net>
Date
Jul 11, 2013, 13:34 UTC
Message-ID
<20130711133414.GF6015@sigill.intra.peff.net>
In-Reply-To
<6050FACA-CAD4-4E41-B7DC-D7A2036AA233@gernhardtsoftware.com>
On Wed, Jul 10, 2013 at 12:36:40PM -0400, Brian Gernhardt wrote:
Show 7 quoted lines
> 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

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: Brian GernhardtNext: Junio C Hamano
Message 4 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.