git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BUG] deadlock in tellme-more extension

From
Jeff King <peff@peff.net>
Date
May 8, 2008, 04:16 UTC
Message-ID
<20080508041613.GA11768@sigill.intra.peff.net>

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
Message 1 of 1 in “[BUG] deadlock in tellme-more extension”
  1. Jeff KingMay 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.