{"thread":{"id":"38522","subject":"hang in git-upload-pack","startedAt":"2015-02-07T16:25:45Z","lastAt":"2015-02-07T16:48:50Z","messageCount":2,"participants":["Joachim Schmitz","Randall S. Becker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"255695","messageId":"loom.20150207T171056-519@post.gmane.org","threadId":"38522","inReplyTo":null,"subject":"hang in git-upload-pack","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2015-02-07T16:25:45Z","receivedAt":"2015-02-07T16:25:45Z","isPatch":false,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"Hi there\n\nIn HP-Nonstop we're experiencing hangs in git-upload-pack, which seems to \nbe the result of reads from / writes to pipes don't ever finish or don't \nget interrupted properly (SIGPIPE, SIGCHLD?)\n\nAny idea why that might be and how to fix it?\n\n\nbye, Jojo\n"},{"id":"255698","messageId":"01dd01d042f5$f3a03d10$dae0b730$@nexbridge.com","threadId":"38522","inReplyTo":"loom.20150207T171056-519@post.gmane.org","subject":"RE: hang in git-upload-pack","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2015-02-07T16:48:50Z","receivedAt":"2015-02-07T16:48:50Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"> -----Original Message-----\n>Sent: February 7, 2015 11:26 AM\n>In HP-Nonstop we're experiencing hangs in git-upload-pack, which seems to\nbe the result\n>of reads from / writes to pipes don't ever finish or don't get interrupted\nproperly (SIGPIPE, SIGCHLD?)\n>Any idea why that might be and how to fix it?\n\nMore context on this issue:\nThis is a new port of Git 2.3 to HP NonStop OSS (POSIX-ish). With very\nminimal changes in git_compat-util.h to include floss and wrapper.c (below),\nwe are able to clone remote repositories and work on local repositories\nwithout issue. However, when attempting to fetch from a local bare\nrepository (set up as a remote but on the same server) into a working\nrepository, or when a remote client attempts to clone from any repository on\nthe server over any protocol, we end up with git-upload-pack hanging as the\ncommon point of failure. Note that this function has not worked in prior\nversion of git, so we have no working reference to compare. The team is\nsuspecting differences in how the OS deals with pipes but our primary need\nfrom the community is some guidance on continuing our investigation in\nresolving this.\n\nMost git tests succeed except for: t0025(test 2), t0301(test\n12-expected),t5507(test 4 - suspicious of this),t9001(expected).\n\nA sample trace showing the issue is below. There are no external clients\ninvolved in this sample. This is git to git locally. The condition appears\nto be representative of all of the hangs.\n\nGIT_TRACE=1 /usr/local/bin/git --exec-path=/usr/local/bin fetch\nold_floss_tail\n09:52:01.198401 trace: built-in: git 'fetch' 'old_floss_tail'\n09:52:01.226684 trace: run_command: 'git-upload-pack\n'\\''/home/git/floss.git/.git'\\'''\n09:52:01.229229 trace: exec: '/usr/local/bin/bash' '-c' 'git-upload-pack\n'\\''/home/git/floss.git/.git'\\''' 'git-upload-pack\n'\\''/home/git/floss.git/.git'\\'''\n09:52:01.303638 trace: run_command: 'rev-list' '--objects' '--stdin' '--not'\n'--all' '--quiet'\nwarning: no common commits\n09:52:01.438320 trace: run_command: 'pack-objects' '--revs' '--thin'\n'--stdout' '--progress' '--delta-base-offset' '--include-tag'\nremote: 09:52:01.445274 trace: exec: 'git' 'pack-objects' '--revs' '--thin'\n'--stdout' '--progress' '--delta-base-offset' '--include-tag'\nremote: 09:52:01.463846 trace: built-in: git 'pack-objects' '--revs'\n'--thin' '--stdout' '--progress' '--delta-base-offset' '--include-tag'\nremote: Counting objects: 485, done.\nremote: Compressing objects: 100% (472/472), done.\n<<<< Hangs forever at this point. >>>> \n\nThe git-unpack-load is stopped at (not that the addresses might mean much):\n  xread + 0x130 (UCr)\n  create_pack_file + 0x18F0 (UCr)\n  upload_pack + 0x450 (UCr)\n  .\n\nThere are two git processes at:\n  xread + 0x130 (UCr)\n  read_in_full + 0x130 (UCr)\n  get_packet_data + 0x4A0 (UCr)\n  .\n\nAnd one git is at:\n  xwrite + 0x130 (UCr)\n  flush + 0x530 (UCr)\n  sha1write + 0x600 (UCr)\n  write_no_reuse_object + 0x1390 (UCr)\n  .\n\nWrapper.c change:\n@@ -173,7 +173,12 @@ void *xcalloc(size_t nmemb, size_t size)\n  * the absence of bugs, large chunks can result in bad latencies when\n  * you decide to kill the process.\n  */\n-#define MAX_IO_SIZE (8*1024*1024)\n+#ifdef __TANDEM\n+# include <limits.h> /* SSIZE_MAX == 52k */\n+# define MAX_IO_SIZE SSIZE_MAX\n+#else\n+# define MAX_IO_SIZE (8*1024*1024)\n+#endif\n\nBest Regards,\nRandall\n-- Brief whoami: NonStop&UNIX developer since approximately\nUNIX(421664400)/NonStop(211288444200000000)\n"}]}