git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Jeff King <peff@github.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Erik Faye-Lund <kusmabite@gmail.com>,
	Aman Gupta <aman@github.com>, Ryan Tomayko <ryan@github.com>
Subject: Re: [RFC] upload-pack deadlock
Date: Mon, 18 Apr 2011 00:34:06 -0500	[thread overview]
Message-ID: <20110418053406.GA5256@elie> (raw)
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.
[...]
> 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

  reply	other threads:[~2011-04-18  5:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04  5:36 [RFC] upload-pack deadlock Jeff King
2011-04-06 17:20 ` Junio C Hamano
2011-04-06 17:54   ` Jeff King
2011-04-06 19:15     ` Erik Faye-Lund
2011-04-06 21:38       ` Jeff King
2011-04-06 21:33     ` Jeff King
2011-04-18  5:34       ` Jonathan Nieder [this message]
2011-05-26  6:45       ` [1.7.2] Please cherry-pick "upload-pack: start pack-objects before async rev-list" Jonathan Nieder
2011-05-26 16:58         ` Junio C Hamano
2011-05-26 17:11           ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110418053406.GA5256@elie \
    --to=jrnieder@gmail.com \
    --cc=aman@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kusmabite@gmail.com \
    --cc=peff@github.com \
    --cc=ryan@github.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).