git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [BUG] deadlock in tellme-more extension
Date: Thu, 8 May 2008 00:16:13 -0400	[thread overview]
Message-ID: <20080508041613.GA11768@sigill.intra.peff.net> (raw)

I am getting a reproducible hang in "git push" and I think it is related
to the tellme-more extension in next.

Unfortunately, I am having trouble making it happen with a small test,
but it does work with this:

  git clone git://git.kernel.org/pub/scm/git/git.git parent &&
  mkdir child && (cd child && git init) &&
  cd parent &&
  git push ../child refs/tags/* &&
  git push ../child master

The sender does a "tellme-more" and then waits for a line back. The
receiver gets the tellme-more, but never says anything else, presumably
because he doesn't have that commit (because master is ahead of any
tags).

I think that the problem might be that in main, the tellme_more variable
serves two purposes: it holds the list of things to tell more about, but
it also serves as a flag to start the history exchange (which needs to
end with a packet_flush to alert the other side). So it seems that the
receiver never puts anything on that list (because we don't know
anything about the mentioned commit; see parse_tellme_more), but then we
never remember that tellme-more was mentioned, so we don't proceed with
sending a NULL list.

So the simple fix is to keep a separate "we should do the history
exchange" variable. But I might be missing something more subtle
happening. And obviously my test script sucks, but I'm not quite sure
how to re-create the problematic situation.

-Peff

                 reply	other threads:[~2008-05-08  4:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080508041613.GA11768@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).