{"thread":{"id":"13427","subject":"[BUG] deadlock in tellme-more extension","startedAt":"2008-05-08T04:16:13Z","lastAt":"2008-05-08T04:16:13Z","messageCount":1,"participants":["Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"76348","messageId":"20080508041613.GA11768@sigill.intra.peff.net","threadId":"13427","inReplyTo":null,"subject":"[BUG] deadlock in tellme-more extension","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-05-08T04:16:13Z","receivedAt":"2008-05-08T04:16:13Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"I am getting a reproducible hang in \"git push\" and I think it is related\nto the tellme-more extension in next.\n\nUnfortunately, I am having trouble making it happen with a small test,\nbut it does work with this:\n\n  git clone git://git.kernel.org/pub/scm/git/git.git parent &&\n  mkdir child && (cd child && git init) &&\n  cd parent &&\n  git push ../child refs/tags/* &&\n  git push ../child master\n\nThe sender does a \"tellme-more\" and then waits for a line back. The\nreceiver gets the tellme-more, but never says anything else, presumably\nbecause he doesn't have that commit (because master is ahead of any\ntags).\n\nI think that the problem might be that in main, the tellme_more variable\nserves two purposes: it holds the list of things to tell more about, but\nit also serves as a flag to start the history exchange (which needs to\nend with a packet_flush to alert the other side). So it seems that the\nreceiver never puts anything on that list (because we don't know\nanything about the mentioned commit; see parse_tellme_more), but then we\nnever remember that tellme-more was mentioned, so we don't proceed with\nsending a NULL list.\n\nSo the simple fix is to keep a separate \"we should do the history\nexchange\" variable. But I might be missing something more subtle\nhappening. And obviously my test script sucks, but I'm not quite sure\nhow to re-create the problematic situation.\n\n-Peff\n"}]}