[BUG] deadlock in tellme-more extension

From: Jeff King <hidden>
Date: 2016-06-15 22:44:35

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help