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

Re: [RFC] upload-pack deadlock

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 18, 2011, 05:34 UTC
Message-ID
<20110418053406.GA5256@elie>
In-Reply-To
<20110406213333.GA18481@sigill.intra.peff.net>
Jeff King wrote:
> Subject: [PATCH] upload-pack: start pack-objects before async rev-list
>
> In a pthread-enabled version of upload-pack, there's a race condition
> that can cause a deadlock on the fflush(NULL) we call from run-command.
[...]
Show 8 quoted lines
> To fix this, we swap the start order: we start the
> pack-objects reader first, and then the rev-list writer
> after. Thus the problematic fflush(NULL) happens before we
> even open the new file descriptor (and even if it didn't,
> flushing should no longer block, as the reader at the end of
> the pipe is now active).
>
> Signed-off-by: Jeff King <peff@peff.net>

t5500.12 "fetch same depth in shallow repo" reproducibly hangs[1] on the HURD without this patch and passes with it. I had just assumed it was some weird hurd thing. Thanks for figuring it out.

Tested-by: Jonathan Nieder <jrnieder@gmail.com>
[1] http://bugs.debian.org/607346
Previous: Jeff KingNext: Jonathan Nieder
Message 7 of 10 in “[RFC] upload-pack deadlock”
  1. Jeff KingApr 4, 2011
  2. Junio C HamanoApr 6, 2011
  3. Jeff KingApr 6, 2011
  4. Erik Faye-LundApr 6, 2011
  5. Jeff KingApr 6, 2011
  6. Jeff KingApr 6, 2011
  7. Jonathan NiederApr 18, 2011
  8. [1.7.2] Please cherry-pick "upload-pack: start pack-objects before async rev-list"Jonathan Nieder, May 26, 2011
  9. Junio C HamanoMay 26, 2011
  10. Jonathan NiederMay 26, 2011

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.