{"thread":{"id":"40947","subject":"Git 2.3.7 hangs on fetch but not clone","startedAt":"2015-12-06T22:12:12Z","lastAt":"2015-12-07T20:21:34Z","messageCount":2,"participants":["Randall S. Becker","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"274084","messageId":"001f01d13073$28d428a0$7a7c79e0$@nexbridge.com","threadId":"40947","inReplyTo":null,"subject":"Git 2.3.7 hangs on fetch but not clone","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2015-12-06T22:12:12Z","receivedAt":"2015-12-06T22:12:12Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"I have some strange behaviour I am trying to diagnose on the NonStop port of\ngit 2.3.7. The situation is we have a *LARGE* cloned repository with some\nlocal modifications of openssl, which we are trying to clone again for a\nJenkins build. The command:\n\tgit clone /local/openssl openssl\nworks fine and rapidly (well under 30 seconds), but with a newly created\nempty repo, simulating what the Jenkins Git plugin does:\n\tmkdir /local/test/openssl\n\tcd /local/test/openssl\n\tgit init /local/test/openssl\n\tgit -c core.askpass=true fetch --verbose --progress\n/local/git/openssl +refs/heads/*:refs/remotes/origin/*\ndoes the usual:\n\tremote: Counting objects: 113436, done.\n\tremote: Compressing objects: 100% (23462/23462), done.\nthen hangs forever without creating any files in the working directory.\nThere are also no files or directories modified since the init operation.\nProcesses left around, and without consuming resources, are:\n1493172290 2030043151 - 15:58:29       00:15 git pack-objects --revs --thin\n--stdout --progress --delta-base-offset --include-tag\n452984908  402653262 - 15:58:29       00:00 git -c core.askpass=true fetch\n--verbose --progress /local/git/openssl +refs/heads/*:refs/remotes/origin/*\n402653262 1694498903 - 15:58:28       00:00 git -c core.askpass=true fetch\n--verbose --progress /local/git/openssl +refs/heads/*:refs/remotes/origin/*\n2030043151  402653262 - 15:58:29       00:00 git-upload-pack\n/local/git/openssl\n\nThis does not happen for our smaller repositories. Any pointers on where to\nlook would be appreciated.\n\nKindly,\nRandall\n\n-- Brief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)/NonStop(211288444200000000)\n-- In my real life, I talk too much.\n"},{"id":"274133","messageId":"20151207202134.GA30203@sigill.intra.peff.net","threadId":"40947","inReplyTo":"001f01d13073$28d428a0$7a7c79e0$@nexbridge.com","subject":"Re: Git 2.3.7 hangs on fetch but not clone","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-12-07T20:21:34Z","receivedAt":"2015-12-07T20:21:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 06, 2015 at 05:12:12PM -0500, Randall S. Becker wrote:\n\n> I have some strange behaviour I am trying to diagnose on the NonStop port of\n> git 2.3.7. The situation is we have a *LARGE* cloned repository with some\n> local modifications of openssl, which we are trying to clone again for a\n> Jenkins build. The command:\n> \tgit clone /local/openssl openssl\n\nBecause the two repositories are on the same local filesystem, git will\nskip the usual pack transfer and just copy or hardlink the object files.\n\nYou can add \"--no-local\" to make it more like the fetch that is failing\n(I suspect it will then fail, too, but if it doesn't, that would be an\ninteresting data point).\n\n> \tremote: Counting objects: 113436, done.\n> \tremote: Compressing objects: 100% (23462/23462), done.\n> then hangs forever without creating any files in the working directory.\n> There are also no files or directories modified since the init operation.\n> Processes left around, and without consuming resources, are:\n> 1493172290 2030043151 - 15:58:29       00:15 git pack-objects --revs --thin\n> --stdout --progress --delta-base-offset --include-tag\n> 452984908  402653262 - 15:58:29       00:00 git -c core.askpass=true fetch\n> --verbose --progress /local/git/openssl +refs/heads/*:refs/remotes/origin/*\n> 402653262 1694498903 - 15:58:28       00:00 git -c core.askpass=true fetch\n> --verbose --progress /local/git/openssl +refs/heads/*:refs/remotes/origin/*\n> 2030043151  402653262 - 15:58:29       00:00 git-upload-pack\n> /local/git/openssl\n\nWhat are the processes doing?\n\nUpload-pack on the \"server\" side spawns pack-objects, writes the set of\nwanted objects to its stdin, and then waits for it to produce pack data\nto stdout (which it then multiplexes back to the client). You clearly\ngot past the write (since pack-objects finished \"Counting objects...\").\nI'd expect it to be waiting for input in poll() for input from the\nstdout or stderr of pack-objects. It may also be blocking on write()\nback to the client.\n\nPack-objects clearly completed delta compression, and so should be\nwriting out the final pack.  It doesn't look like it ever wrote the\n\"writing objects...\" progress line (or perhaps upload-pack got stuck and\nfailed to relay it). It's probably blocking on write() to upload-pack.\n\nYou have two fetch processes. Presumably you build with NO_PTHREADS and\none of them is a fork()ed copy to demux the data from upload-pack. It\nclearly runs at least a little while (it relays the \"Counting\" message).\nIt should either be blocking on read() from upload-pack, or perhaps\nblocking on write() back to main fetch.\n\nThe main fetch hasn't yet spawned index-pack or unpack-objects, which\nmeans it hasn't gotten enough of the pack header to do so. So it's\nprobably blocking on read() from the sideband demuxer process.\n\nDo you have some equivalent of strace on your system? Or better yet, a\ndebugger?\n\n> This does not happen for our smaller repositories. Any pointers on where to\n> look would be appreciated.\n\nMy wild guess would be some pipe deadlock between the processes, but I\ndon't think we've had any of those lately. And v2.3.7 is not _too_ old\n(there are some fixes for http deadlocks in v2.3.7..v2.6.3, but that\nshould not affect you here).\n\n-Peff\n"}]}