{"thread":{"id":"27175","subject":"\"git clone --depth=2 git://git.sv.gnu.org/gnulib\" hangs","startedAt":"2011-04-25T20:28:10Z","lastAt":"2011-04-26T16:02:12Z","messageCount":4,"participants":["Jim Meyering","Andreas Schwab","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"166327","messageId":"87aafedqjp.fsf@rho.meyering.net","threadId":"27175","inReplyTo":null,"subject":"\"git clone --depth=2 git://git.sv.gnu.org/gnulib\" hangs","fromName":"Jim Meyering","fromEmail":"jim@meyering.net","sentAt":"2011-04-25T20:28:10Z","receivedAt":"2011-04-25T20:28:10Z","isPatch":false,"sender":{"key":"jim@meyering.net","avatar":"https://avatars.githubusercontent.com/u/710630?v=4"},"body":"Hello,\n\nWe've had a report that this command is hanging:\n\n    git clone --depth=2 git://git.sv.gnu.org/gnulib\n\ncloning without --depth=N works, as well as when using an ssh:// URL,\nbut most people can use ssh:// URLs.\n\nNormally it wouldn't be much of a problem, but many projects\nuse gnulib as a submodule, and one of the recommended (scripted)\nways to get a copy is via a shallow clone.\n\nsavannah's server is running git-1.7.2.5.\nI've confirmed it using these client versions:\n\n    1.7.5.rc3.316.gd1ff9\n    1.7.4.4\n\nGIT_TRACE didn't give much info:\n\n    xx$ GIT_TRACE=1 git clone --depth 2 git://git.sv.gnu.org/gnulib\n    trace: built-in: git 'clone' '--depth' '2' 'git://git.sv.gnu.org/gnulib'\n    Cloning into gnulib...\n    trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' \\\n      '--keep=fetch-pack 645 on xx.meyering.net'\n    trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' \\\n      '--keep=fetch-pack 645 on xx.meyering.net'\n    trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' \\\n      '--keep=fetch-pack 645 on xx.meyering.net'\n\nIt appears to be something specific to the gnulib repository,\nsince I can do a shallow clone of e.g., this one just fine:\n\n    git://git.savannah.gnu.org/parallel.git\n\nAny hints?\n\nAt worst I'll set up a git server on a private system and debug it --\neventually.\n\nRegards,\n\nJim\n"},{"id":"166333","messageId":"m2ipu2f2wc.fsf@igel.home","threadId":"27175","inReplyTo":"87aafedqjp.fsf@rho.meyering.net","subject":"Re: \"git clone --depth=2 git://git.sv.gnu.org/gnulib\" hangs","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-04-25T21:16:03Z","receivedAt":"2011-04-25T21:16:03Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Jim Meyering <jim@meyering.net> writes:\n\n> We've had a report that this command is hanging:\n>\n>     git clone --depth=2 git://git.sv.gnu.org/gnulib\n>\n> cloning without --depth=N works, as well as when using an ssh:// URL,\n> but most people can use ssh:// URLs.\n\nWhen cloing without --depth I see the resolving deltas phase busy for a\nminute at 50%.  Perhaps related?\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"166359","messageId":"20110426075917.GA26874@sigill.intra.peff.net","threadId":"27175","inReplyTo":"87aafedqjp.fsf@rho.meyering.net","subject":"Re: \"git clone --depth=2 git://git.sv.gnu.org/gnulib\" hangs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-04-26T07:59:17Z","receivedAt":"2011-04-26T07:59:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 25, 2011 at 10:28:10PM +0200, Jim Meyering wrote:\n\n> We've had a report that this command is hanging:\n> \n>     git clone --depth=2 git://git.sv.gnu.org/gnulib\n\nIt might be related to this deadlock which impacts upload-pack on a\nserver with pthreads serving a shallow clone:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/170789\n\nUnfortunately the fix I posted is not yet in any released version of\ngit. It is in the current 'next'.\n\n> It appears to be something specific to the gnulib repository,\n> since I can do a shallow clone of e.g., this one just fine:\n> \n>     git://git.savannah.gnu.org/parallel.git\n\nIt's a race condition on filling up a rev-list buffer, so certain repos\nmay be more prone to triggering the race than others.\n\n-Peff\n"},{"id":"166388","messageId":"87bozt9f23.fsf@rho.meyering.net","threadId":"27175","inReplyTo":"20110426075917.GA26874@sigill.intra.peff.net","subject":"Re: \"git clone --depth=2 git://git.sv.gnu.org/gnulib\" hangs","fromName":"Jim Meyering","fromEmail":"jim@meyering.net","sentAt":"2011-04-26T16:02:12Z","receivedAt":"2011-04-26T16:02:12Z","isPatch":false,"sender":{"key":"jim@meyering.net","avatar":"https://avatars.githubusercontent.com/u/710630?v=4"},"body":"Jeff King wrote:\n> On Mon, Apr 25, 2011 at 10:28:10PM +0200, Jim Meyering wrote:\n>> We've had a report that this command is hanging:\n>>\n>>     git clone --depth=2 git://git.sv.gnu.org/gnulib\n>\n> It might be related to this deadlock which impacts upload-pack on a\n> server with pthreads serving a shallow clone:\n>\n>   http://thread.gmane.org/gmane.comp.version-control.git/170789\n\nThanks for the pointer.  That looks very promising.\n\nHoping to be able to test your fix, I rsync'd the offending repository to\na system on which I can experiment safely, but so far have been unable\nto reproduce the failure there.  Of course, if my problem is indeed due\nto the race condition bug that your patch fixes, it's not surprising\nthat it is unreproducible in a different environment.\n\n> Unfortunately the fix I posted is not yet in any released version of\n> git. It is in the current 'next'.\n"}]}