login
Header Space

 
 

[BUG] deadlock in tellme-more extension

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: <git@...>
Date: Thursday, May 8, 2008 - 12:16 am

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] deadlock in tellme-more extension, Jeff King, (Thu May 8, 12:16 am)
speck-geostationary