git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] deadlock in tellme-more extension
@ 2008-05-08  4:16 Jeff King
  0 siblings, 0 replies; only message in thread
From: Jeff King @ 2008-05-08  4:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-08  4:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-08  4:16 [BUG] deadlock in tellme-more extension Jeff King

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).