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

[1.7.2] Please cherry-pick "upload-pack: start pack-objects before async rev-list"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 26, 2011, 06:45 UTC
Message-ID
<20110526064547.GA18777@elie>
In-Reply-To
<20110406213333.GA18481@sigill.intra.peff.net>
Hi Junio,
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.

This server-side deadlock started being triggered by shallow clones when sv.gnu.org upgraded to v1.7.2.5 a couple of months ago[1]. So it might be worth thinking about how to help upgrade-averse server admins to fix it.

Luckily, Jeff's patch (v1.7.5.1~4^2, upload-pack: start pack-objects before async rev-list, 2011-04-06) applies cleanly on top of the oldest commit with the problem that I can find (v1.7.2-rc0~31^2~3, Reimplement async procedures using pthreads, 2010-03-06). Could you queue it for inclusion in maint-1.7.2?

If I understand correctly, Windows with threaded async rev-list before then would not have suffered from this deadlock because it did not fflush(NULL) in start_command until v1.7.4.1~18 (start_command: flush buffers in the WIN32 code path as well, 2011-02-04).

[1] http://thread.gmane.org/gmane.comp.version-control.git/172042
Previous: Jonathan NiederNext: Junio C Hamano
Message 8 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.