{"thread":{"id":"33381","subject":"trouble on windows network share","startedAt":"2013-04-04T15:01:36Z","lastAt":"2013-12-03T17:30:11Z","messageCount":17,"participants":["Pyeron, Jason J CTR (US)","Jeff King","deg","Thomas Rast","David Goldfarb","Phil Wiffen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"213098","messageId":"871B6C10EBEFE342A772D1159D1320853F63D205@umechphj.easf.csd.disa.mil","threadId":"33381","inReplyTo":null,"subject":"trouble on windows network share","fromName":"Pyeron, Jason J CTR (US)","fromEmail":"jason.j.pyeron.ctr@mail.mil","sentAt":"2013-04-04T15:01:36Z","receivedAt":"2013-04-04T15:01:36Z","isPatch":false,"sender":{"key":"jason.j.pyeron.ctr@mail.mil","avatar":null},"body":"I am having trouble when the .git folder is on a network share, given the below where should I start on my debugging?\n\n$ git --version\ngit version 1.7.9\n$ uname -a\nCYGWIN_NT-6.1-WOW64 LNDLE642FX7ZTR1 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin\n\n\n\njason.pyeron@localhost //server/share/dir/subdir\n$ git init test\nInitialized empty Git repository in //server/share/dir/subdir/test/.git/\n\njason.pyeron@localhost //server/share/dir/subdir\n$ cd test/\n\njason.pyeron@localhost //server/share/dir/subdir/test\n$ echo the quick brown fox jumped over the lazy dogs > test.txt\n\njason.pyeron@localhost //server/share/dir/subdir/test\n$ git add test.txt\n\njason.pyeron@localhost //server/share/dir/subdir/test\n$ git commit -m test\nerror: unable to find 8b7323820a21ebd1360e27262b3c61283c266c23\nfatal: 8b7323820a21ebd1360e27262b3c61283c266c23 is not a valid object\n\njason.pyeron@localhost //server/share/dir/subdir/test\n$ find .git/\n.git/\n.git/COMMIT_EDITMSG\n.git/config\n.git/description\n.git/HEAD\n.git/hooks\n.git/hooks/applypatch-msg.sample\n.git/hooks/commit-msg.sample\n.git/hooks/post-update.sample\n.git/hooks/pre-applypatch.sample\n.git/hooks/pre-commit.sample\n.git/hooks/pre-rebase.sample\n.git/hooks/prepare-commit-msg.sample\n.git/hooks/update.sample\n.git/index\n.git/info\n.git/info/exclude\n.git/objects\n.git/objects/8b\n.git/objects/8b/7323820a21ebd1360e27262b3c61283c266c23\n.git/objects/ca\n.git/objects/ca/630d704614c35b81d504cb5e87eaec8a78a3b3\n.git/objects/info\n.git/objects/pack\n.git/refs\n.git/refs/heads\n.git/refs/tags\n\n$ stat .git/objects/8b/7323820a21ebd1360e27262b3c61283c266c23\n  File: `.git/objects/8b/7323820a21ebd1360e27262b3c61283c266c23'\n  Size: 53              Blocks: 4          IO Block: 65536  regular file\nDevice: 6e2c3656h/1848391254d   Inode: 1125899911803044  Links: 1\nAccess: (0444/-r--r--r--)  Uid: (2246260/jason.pyeron)   Gid: (10513/Domain Users)\nAccess: 2013-04-04 10:57:43.458720700 -0400\nModify: 2013-04-04 10:57:43.505522500 -0400\nChange: 2013-04-04 10:57:43.536723700 -0400\n Birth: 2013-04-04 10:57:43.458720700 -0400\n\n\n"},{"id":"213121","messageId":"20130404155112.GA11622@sigill.intra.peff.net","threadId":"33381","inReplyTo":"871B6C10EBEFE342A772D1159D1320853F63D205@umechphj.easf.csd.disa.mil","subject":"Re: trouble on windows network share","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-04-04T15:51:12Z","receivedAt":"2013-04-04T15:51:12Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 04, 2013 at 03:01:36PM +0000, Pyeron, Jason J CTR (US) wrote:\n\n> I am having trouble when the .git folder is on a network share, given the below where should I start on my debugging?\n> [...]\n> jason.pyeron@localhost //server/share/dir/subdir/test\n> $ git add test.txt\n> \n> jason.pyeron@localhost //server/share/dir/subdir/test\n> $ git commit -m test\n> error: unable to find 8b7323820a21ebd1360e27262b3c61283c266c23\n> fatal: 8b7323820a21ebd1360e27262b3c61283c266c23 is not a valid object\n\nHmm. That message probably comes from:\n\n  static int sha1_loose_object_info(const unsigned char *sha1, unsigned long *sizep)\n  {\n  [...]\n          map = map_sha1_file(sha1, &mapsize);\n          if (!map)\n                  return error(\"unable to find %s\", sha1_to_hex(sha1));\n\nSo we have found the object and know that it is loose, but then mmap-ing\nit fails. My guess is that your system does not support mmap across\nnetwork shares (whether this is an OS issue or a cygwin limitation, I\ndon't know). You could confirm it by running your \"git commit\" under\nstrace, which I expect would show mmap returning -ENODEV or similar.\n\nYou can work around it by compiling git with NO_MMAP=1.\n\nYou might also try msysgit rather than cygwin, which seems to have its\nown win32 mmap compatibility layer.\n\nFinally, I suspect we could include our emulate-mmap-with-pread\ncompatibility wrapper all the time, and drop back to it automatically at\nrun-time when we see ENODEV or a similar error return from mmap.\n\n-Peff\n"},{"id":"213277","messageId":"871B6C10EBEFE342A772D1159D1320853F63DA3D@umechphj.easf.csd.disa.mil","threadId":"33381","inReplyTo":"20130404155112.GA11622@sigill.intra.peff.net","subject":"RE: trouble on windows network share","fromName":"Pyeron, Jason J CTR (US)","fromEmail":"jason.j.pyeron.ctr@mail.mil","sentAt":"2013-04-05T12:44:48Z","receivedAt":"2013-04-05T12:44:48Z","isPatch":false,"sender":{"key":"jason.j.pyeron.ctr@mail.mil","avatar":null},"body":"[strace attachment has been removed, email being resent]\n\nIt looks like there is a race condition going on, especially since the location and message changes.\n\nCould it be the file creation, file read, apply file security is happening when it should be file create, apply security, file read?\n\nLooking at trace line: 1088001 (full trace attached)\n\n1181 1087049 [main] git 9320 symlink_info::check: 0x0 = NtCreateFile (\\??\\UNC\\server\\share\\dir1\\dir2\\test\\.git\\objects\\68)\n   84 1087133 [main] git 9320 symlink_info::check: not a symlink\n  733 1087866 [main] git 9320 symlink_info::check: 0 = symlink.check(\\\\server\\share\\dir1\\dir2\\test\\.git\\objects\\68, 0x288280) (0x4022)\n   62 1087928 [main] git 9320 path_conv::check: this->path(\\\\server\\share\\dir1\\dir2\\test\\.git\\objects\\68\\38761d549cf76033d2e9faf5954e62839eb25d), has_acls(1)\n   31 1087959 [main] git 9320 build_fh_pc: fh 0x61274CA0, dev 0xC3\n   21 1087980 [main] git 9320 __set_errno: int fhandler_base::fhaccess(int, bool):367 setting errno 2\n   21 1088001 [main] git 9320 fhandler_base::fhaccess: returning -1\n   19 1088020 [main] git 9320 access: returning -1\n  164 1088184 [main] git 9320 fhandler_pty_slave::write: pty0, write(50A474, 7)\n   18 1088202 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex (0xC0): waiting -1 ms\n   20 1088222 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex: acquired\nerror: \n   21 1088243 [main] git 9320 fhandler_pty_slave::write: (672): pty output_mutex(0xC0) released\n   18 1088261 [main] git 9320 write: 7 = write(2, 0x50A474, 7)\n   36 1088297 [main] git 9320 fhandler_pty_slave::write: pty0, write(288680, 102)\n   18 1088315 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex (0xC0): waiting -1 ms\n   18 1088333 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex: acquired\nTrying to write ref refs/heads/master with nonexistent object 6838761d549cf76033d2e9faf5954e62839eb25d\n\n\n\n> -----Original Message-----\n> From: Jeff King\n> Sent: Thursday, April 04, 2013 11:51 AM\n> \n> On Thu, Apr 04, 2013 at 03:01:36PM +0000, Pyeron, Jason J CTR (US)\n> wrote:\n> \n> > I am having trouble when the .git folder is on a network share, given\n> the below where should I start on my debugging?\n> > [...]\n> > jason.pyeron@localhost //server/share/dir/subdir/test\n> > $ git add test.txt\n> >\n> > jason.pyeron@localhost //server/share/dir/subdir/test\n> > $ git commit -m test\n> > error: unable to find 8b7323820a21ebd1360e27262b3c61283c266c23\n> > fatal: 8b7323820a21ebd1360e27262b3c61283c266c23 is not a valid object\n> \n> Hmm. That message probably comes from:\n> \n>   static int sha1_loose_object_info(const unsigned char *sha1, unsigned\n> long *sizep)\n>   {\n>   [...]\n>           map = map_sha1_file(sha1, &mapsize);\n>           if (!map)\n>                   return error(\"unable to find %s\", sha1_to_hex(sha1));\n> \n> So we have found the object and know that it is loose, but then mmap-\n> ing\n> it fails. My guess is that your system does not support mmap across\n> network shares (whether this is an OS issue or a cygwin limitation, I\n> don't know). You could confirm it by running your \"git commit\" under\n> strace, which I expect would show mmap returning -ENODEV or similar.\n> \n> You can work around it by compiling git with NO_MMAP=1.\n> \n> You might also try msysgit rather than cygwin, which seems to have its\n> own win32 mmap compatibility layer.\n> \n> Finally, I suspect we could include our emulate-mmap-with-pread\n> compatibility wrapper all the time, and drop back to it automatically\n> at\n> run-time when we see ENODEV or a similar error return from mmap.\n> \n> -Peff\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"213898","messageId":"20130411045646.GB27795@sigill.intra.peff.net","threadId":"33381","inReplyTo":"871B6C10EBEFE342A772D1159D1320853F63DA3D@umechphj.easf.csd.disa.mil","subject":"Re: trouble on windows network share","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-04-11T04:56:46Z","receivedAt":"2013-04-11T04:56:46Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 05, 2013 at 12:44:48PM +0000, Pyeron, Jason J CTR (US) wrote:\n\n> [strace attachment has been removed, email being resent]\n\nI had trouble finding anything interesting in either this, or in the\nfull strace you sent me off-list, mostly because the syscalls are\nforeign to me (I had hoped to see an strace of the actual Unix-level\nsyscalls, but I guess that is not how cygwin's strace works).\n\nWhat I really wanted to see was the result of the open, fstat, and mmap\ncalls. The patch below adds some debugging statements that might help.\n\n> It looks like there is a race condition going on, especially since the\n> location and message changes.\n\nIf it's a race condition between the write and the subsequent read in\nthe same process, then it would be solved by looking at the object\nlater. Does \"git cat-file -p 6838761d549cf76033d2e9faf5954e62839eb25d\"\nwork, or is the object forever inaccessible?\n\n---\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 0ed2398..d40dd9f 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1331,6 +1331,9 @@ void *map_sha1_file(const unsigned char *sha1, unsigned long *size)\n \tint fd;\n \n \tfd = open_sha1_file(sha1);\n+\tif (fd < 0)\n+\t\terror(\"unable to open sha1 file for %s: %s\",\n+\t\t      sha1_to_hex(sha1), strerror(errno));\n \tmap = NULL;\n \tif (fd >= 0) {\n \t\tstruct stat st;\n@@ -1343,7 +1346,13 @@ void *map_sha1_file(const unsigned char *sha1, unsigned long *size)\n \t\t\t\treturn NULL;\n \t\t\t}\n \t\t\tmap = xmmap(NULL, *size, PROT_READ, MAP_PRIVATE, fd, 0);\n+\t\t\tif (!map)\n+\t\t\t\terror(\"unable to mmap %s: %s\",\n+\t\t\t\t      sha1_to_hex(sha1), strerror(errno));\n \t\t}\n+\t\telse\n+\t\t\terror(\"unable to fstat %s: %s\", sha1_to_hex(sha1),\n+\t\t\t      strerror(errno));\n \t\tclose(fd);\n \t}\n \treturn map;\n"},{"id":"216317","messageId":"1367529968647-7584800.post@n2.nabble.com","threadId":"33381","inReplyTo":"871B6C10EBEFE342A772D1159D1320853F63D205@umechphj.easf.csd.disa.mil","subject":"Re: trouble on windows network share","fromName":"deg","fromEmail":"deg@degel.com","sentAt":"2013-05-02T21:26:08Z","receivedAt":"2013-05-02T21:26:08Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"I'm having this same problem.\n\nHere's one more clue that may help: The problem is dependent on the exact\ntype of NAS drive.\nI moved from a Buffalo LS-X2.0, which worked fine, to a WD \"My Book Live\"\n(MBL), which has this problem.\n\nI don't know much more yet about why the MBL is failing, but am still poking\naround, and am happy to try tests for anyone who wants to debug this.\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/trouble-on-windows-network-share-tp7581547p7584800.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"216349","messageId":"87ppx8o1lj.fsf@linux-k42r.v.cablecom.net","threadId":"33381","inReplyTo":"1367529968647-7584800.post@n2.nabble.com","subject":"Re: trouble on windows network share","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-05-03T09:27:04Z","receivedAt":"2013-05-03T09:27:04Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"deg <deg@degel.com> writes:\n\n> I'm having this same problem.\n>\n> Here's one more clue that may help: The problem is dependent on the exact\n> type of NAS drive.\n> I moved from a Buffalo LS-X2.0, which worked fine, to a WD \"My Book Live\"\n> (MBL), which has this problem.\n>\n> I don't know much more yet about why the MBL is failing, but am still poking\n> around, and am happy to try tests for anyone who wants to debug this.\n\nCan you reproduce the problem under Linux (with the NAS mounted using\nCIFS), or just Windows?\n\nIf it works under Linux, you could record strace logs, e.g.\n\n  echo foo >test.txt\n  strace -f -o trace.1 git add test.txt\n  strace -f -o trace.2 git commit -m test\n\netc.\n\nThis would massively help debugging.  Judging from the OP's log, the\nfilesystem is just broken and can't make up its mind about what files\nexist, but in the strace log we could see exactly where it gives weird\nanswers (or that it doesn't, and thus get clues to any possible git\nbugs).\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216427","messageId":"8B6563E531152E4190313499F193F94214A9C966@mbx500-u1-lo-3.exch500.msoutlookonline.net","threadId":"33381","inReplyTo":"87ppx8o1lj.fsf@linux-k42r.v.cablecom.net","subject":"RE: trouble on windows network share","fromName":"David Goldfarb","fromEmail":"deg@degel.com","sentAt":"2013-05-04T23:23:21Z","receivedAt":"2013-05-04T23:23:21Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've attached the strace outputs. (Note: for reasons that are probably irrelevant, I needed to run the commands sudo'd. Shout back if this is an issue).\n\nUnder Windows 7, Cygwin git 1.7.9, commit fails:\n  U:\\foo>git commit -m \"added foo2\"\n  error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n  fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid object\n\nFor what it's worth, note that the file does exist.\n  U:\\foo>ls -l .git/objects/0b\n  total 1024\n  -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n\n(I'm not sure why the permissions are trashed. Seems to be a Cygwin thing, or maybe my Cygwin config. The \"??????\" also  appears on local files, and I believe also with files on the old Buffalo drive, so I don't think it is relevant to the problem).  Just in case, here's the same dir, as seen from the Ubuntu VM:\n\n  deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n  total 64\n  -rwxr-xr-x 0 root root 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n\nAgain, note that there is some user permissions lossage here. I don't know enough about Linux mount or CIFS, and apparently did the mount in a way that everything seems to appear to be stuck owned by root. (same problem I hinted at above). Hope this is not relevant to the problem.\n\nHere's how the same directory looks, when I'm ssh'd into the NAS box itself:\n\n   CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n  total 64\n  -rwxrw-r-- 1 deg share 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n\nIn any event, the symptoms don't seem to be a permissions problem, so all this extra info is probably just a red herring, I hope.\n\nDavid\n\n-----Original Message-----\nFrom: Thomas Rast [mailto:trast@inf.ethz.ch] \nSent: Friday, May 03, 2013 12:27 PM\nTo: David Goldfarb\nCc: git@vger.kernel.org\nSubject: Re: trouble on windows network share\n\ndeg <deg@degel.com> writes:\n\n> I'm having this same problem.\n>\n> Here's one more clue that may help: The problem is dependent on the \n> exact type of NAS drive.\n> I moved from a Buffalo LS-X2.0, which worked fine, to a WD \"My Book Live\"\n> (MBL), which has this problem.\n>\n> I don't know much more yet about why the MBL is failing, but am still \n> poking around, and am happy to try tests for anyone who wants to debug this.\n\nCan you reproduce the problem under Linux (with the NAS mounted using CIFS), or just Windows?\n\nIf it works under Linux, you could record strace logs, e.g.\n\n  echo foo >test.txt\n  strace -f -o trace.1 git add test.txt\n  strace -f -o trace.2 git commit -m test\n\netc.\n\nThis would massively help debugging.  Judging from the OP's log, the filesystem is just broken and can't make up its mind about what files exist, but in the strace log we could see exactly where it gives weird answers (or that it doesn't, and thus get clues to any possible git bugs).\n\n--\nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216478","messageId":"87ip2wla12.fsf@linux-k42r.v.cablecom.net","threadId":"33381","inReplyTo":"8B6563E531152E4190313499F193F94214A9C966@mbx500-u1-lo-3.exch500.msoutlookonline.net","subject":"Re: trouble on windows network share","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-05-06T09:42:17Z","receivedAt":"2013-05-06T09:42:17Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"David Goldfarb <deg@degel.com> writes:\n\n> Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've attached the strace outputs. (Note: for reasons that are probably irrelevant, I needed to run the commands sudo'd. Shout back if this is an issue).\n>\n> Under Windows 7, Cygwin git 1.7.9, commit fails:\n>   U:\\foo>git commit -m \"added foo2\"\n>   error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>   fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid object\n>\n> For what it's worth, note that the file does exist.\n>   U:\\foo>ls -l .git/objects/0b\n>   total 1024\n>   -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> (I'm not sure why the permissions are trashed. Seems to be a Cygwin thing, or maybe my Cygwin config. The \"??????\" also  appears on local files, and I believe also with files on the old Buffalo drive, so I don't think it is relevant to the problem).  Just in case, here's the same dir, as seen from the Ubuntu VM:\n>\n>   deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n>   total 64\n>   -rwxr-xr-x 0 root root 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> Again, note that there is some user permissions lossage here. I don't know enough about Linux mount or CIFS, and apparently did the mount in a way that everything seems to appear to be stuck owned by root. (same problem I hinted at above). Hope this is not relevant to the problem.\n>\n> Here's how the same directory looks, when I'm ssh'd into the NAS box itself:\n>\n>    CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n>   total 64\n>   -rwxrw-r-- 1 deg share 74 May  5 01:15 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> In any event, the symptoms don't seem to be a permissions problem, so all this extra info is probably just a red herring, I hope.\n\nHrm.  What about what Jeff already asked of the OP (and AFAICS never got\na reply)?\n\n} If it's a race condition between the write and the subsequent read in\n} the same process, then it would be solved by looking at the object\n} later. Does \"git cat-file -p 6838761d549cf76033d2e9faf5954e62839eb25d\"\n} work, or is the object forever inaccessible?\n\nIn your case: git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216480","messageId":"8B6563E531152E4190313499F193F94214AAAB42@mbx500-u1-lo-3.exch500.msoutlookonline.net","threadId":"33381","inReplyTo":"87ip2wla12.fsf@linux-k42r.v.cablecom.net","subject":"RE: trouble on windows network share","fromName":"David Goldfarb","fromEmail":"deg@degel.com","sentAt":"2013-05-06T09:53:51Z","receivedAt":"2013-05-06T09:53:51Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"Looks like it works.\n\n>From the windows machine:\n    U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n    100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n    100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n\n    U:\\foo>\n\n\nDouble-checking that nothing was fixed or changed when I earlier committed the file from Linux, here's a second test:\n\n\n    U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n    100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n    100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n    \n    U:\\foo>git status\n    # On branch master\n    # Untracked files:\n    #   (use \"git add <file>...\" to include in what will be committed)\n    #\n    #       trace1\n    #       trace2\n    nothing added to commit but untracked files present (use \"git add\" to track)\n    \n    U:\\foo>git add trace1\n    \n    U:\\foo>git commit trace1 -m \"testing\"\n    error: unable to find cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n    fatal: cecae5b4c87ea21aef513fcfcd5c27fe87e0536f is not a valid object\n    \n    U:\\foo>git cat-file -p cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n    100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n    100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n    100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    test.txt\n    100644 blob c9009b02950964cf1d5281125e6e2f647dd9dc16    trace1\n\n   U:\\foo>\n\n\nDavid\n\n-----Original Message-----\nFrom: Thomas Rast [mailto:trast@inf.ethz.ch] \nSent: Monday, May 06, 2013 12:42 PM\nTo: David Goldfarb\nCc: git@vger.kernel.org\nSubject: Re: trouble on windows network share\n\nDavid Goldfarb <deg@degel.com> writes:\n\n> Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've attached the strace outputs. (Note: for reasons that are probably irrelevant, I needed to run the commands sudo'd. Shout back if this is an issue).\n>\n> Under Windows 7, Cygwin git 1.7.9, commit fails:\n>   U:\\foo>git commit -m \"added foo2\"\n>   error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>   fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid \n> object\n>\n> For what it's worth, note that the file does exist.\n>   U:\\foo>ls -l .git/objects/0b\n>   total 1024\n>   -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15 \n> 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> (I'm not sure why the permissions are trashed. Seems to be a Cygwin thing, or maybe my Cygwin config. The \"??????\" also  appears on local files, and I believe also with files on the old Buffalo drive, so I don't think it is relevant to the problem).  Just in case, here's the same dir, as seen from the Ubuntu VM:\n>\n>   deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n>   total 64\n>   -rwxr-xr-x 0 root root 74 May  5 01:15 \n> 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> Again, note that there is some user permissions lossage here. I don't know enough about Linux mount or CIFS, and apparently did the mount in a way that everything seems to appear to be stuck owned by root. (same problem I hinted at above). Hope this is not relevant to the problem.\n>\n> Here's how the same directory looks, when I'm ssh'd into the NAS box itself:\n>\n>    CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n>   total 64\n>   -rwxrw-r-- 1 deg share 74 May  5 01:15 \n> 89efdeef245ed6a0a7eacc5c578629a141f856\n>\n> In any event, the symptoms don't seem to be a permissions problem, so all this extra info is probably just a red herring, I hope.\n\nHrm.  What about what Jeff already asked of the OP (and AFAICS never got a reply)?\n\n} If it's a race condition between the write and the subsequent read in } the same process, then it would be solved by looking at the object } later. Does \"git cat-file -p 6838761d549cf76033d2e9faf5954e62839eb25d\"\n} work, or is the object forever inaccessible?\n\nIn your case: git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n\n--\nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216482","messageId":"878v3sh14d.fsf@linux-k42r.v.cablecom.net","threadId":"33381","inReplyTo":"8B6563E531152E4190313499F193F94214AAAB42@mbx500-u1-lo-3.exch500.msoutlookonline.net","subject":"Re: trouble on windows network share","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-05-06T10:08:18Z","receivedAt":"2013-05-06T10:08:18Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"David Goldfarb <deg@degel.com> writes:\n\n> Looks like it works.\n>\n> From the windows machine:\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>\n>     U:\\foo>\n>\n>\n> Double-checking that nothing was fixed or changed when I earlier committed the file from Linux, here's a second test:\n>\n>\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     \n>     U:\\foo>git status\n>     # On branch master\n>     # Untracked files:\n>     #   (use \"git add <file>...\" to include in what will be committed)\n>     #\n>     #       trace1\n>     #       trace2\n>     nothing added to commit but untracked files present (use \"git add\" to track)\n>     \n>     U:\\foo>git add trace1\n>     \n>     U:\\foo>git commit trace1 -m \"testing\"\n\nNote that specifying 'trace1' here is redundant, since you already added\nit and had no other staged changes.  Perhaps you can re-run a test like\nthis without the extra argument for comparison.  That would tell us if\nit matters that the write and read happen in the same process.\n\n>     error: unable to find cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     fatal: cecae5b4c87ea21aef513fcfcd5c27fe87e0536f is not a valid object\n>     \n>     U:\\foo>git cat-file -p cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    test.txt\n>     100644 blob c9009b02950964cf1d5281125e6e2f647dd9dc16    trace1\n\nI'm inclined to just say that your FS is crazy.\n\nWhat's unsatisfactory is that we already have a bunch of crazy FS\nworkarounds in move_temp_to_file(), which is one obvious candidate for\nwhat is going on here.  So this wouldn't be something new; just another\ncraziness to work around.\n\nFor example, you could test the theory that rename() has something to do\nwith it by patching this into move_temp_to_file():\n\ndiff --git i/sha1_file.c w/sha1_file.c\nindex 67e815b..22af015 100644\n--- i/sha1_file.c\n+++ w/sha1_file.c\n@@ -2635,6 +2635,10 @@ int move_temp_to_file(const char *tmpfile, const char *filename)\n \t\t/* FIXME!!! Collision check here ? */\n \t}\n \n+\tif (access(filename, R_OK) < 0)\n+\t\treturn error(\"access(%s, R_OK) failed immediately after rename(): %s\",\n+\t\t\t     filename, strerror(errno));\n+\n out:\n \tif (adjust_shared_perm(filename))\n \t\treturn error(\"unable to set permission to '%s'\", filename);\n\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216483","messageId":"8B6563E531152E4190313499F193F94214AAACCF@mbx500-u1-lo-3.exch500.msoutlookonline.net","threadId":"33381","inReplyTo":"878v3sh14d.fsf@linux-k42r.v.cablecom.net","subject":"RE: trouble on windows network share","fromName":"David Goldfarb","fromEmail":"deg@degel.com","sentAt":"2013-05-06T10:13:42Z","receivedAt":"2013-05-06T10:13:42Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"Ok.  Continuing in the same shell:\n\n    U:\\foo>git status\n    # On branch master\n    # Changes to be committed:\n    #   (use \"git reset HEAD <file>...\" to unstage)\n    #\n    #       new file:   trace1\n    #\n    # Untracked files:\n    #   (use \"git add <file>...\" to include in what will be committed)\n    #\n    #       trace2\n\n    U:\\foo>git commit -m \"test b\"\n    error: Trying to write ref refs/heads/master with nonexistent object 428dafc292b8396fc7b3c7f692dc9dfe1196a40a\n    fatal: cannot update HEAD ref\n\n    U:\\foo>dir /s *a40a\n     Volume in drive U is Users\n     Volume Serial Number is FC97-3DA5\n\n     Directory of U:\\foo\\.git\\objects\\42\n\n    05/06/2013  12:26 PM               152 8dafc292b8396fc7b3c7f692dc9dfe1196a40a\n                   1 File(s)            152 bytes\n\n         Total Files Listed:\n                   1 File(s)            152 bytes\n                   0 Dir(s)  1,594,477,576,192 bytes free\n\n    U:\\foo>date\n    The current date is: Mon 05/06/2013\n    Enter the new date: (mm-dd-yy)\n    U:\\foo>time\n    The current time is: 13:10:49.55\n    Enter the new time:\n    U:\\foo>git cat-file -p 428dafc292b8396fc7b3c7f692dc9dfe1196a40a\n    tree cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n    parent f6a0de35d12a3b58f12bf1af4ff629b8b004ad82\n    author David Goldfarb <deg@degel.com> 1367834997 +0300\n    committer David Goldfarb <deg@degel.com> 1367834997 +0300\n\n    test b\n\n    U:\\foo>U:\\foo>\n\n\n\nDavid\n\n-----Original Message-----\nFrom: Thomas Rast [mailto:trast@inf.ethz.ch] \nSent: Monday, May 06, 2013 1:08 PM\nTo: David Goldfarb\nCc: git@vger.kernel.org\nSubject: Re: trouble on windows network share\n\nDavid Goldfarb <deg@degel.com> writes:\n\n> Looks like it works.\n>\n> From the windows machine:\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>\n>     U:\\foo>\n>\n>\n> Double-checking that nothing was fixed or changed when I earlier committed the file from Linux, here's a second test:\n>\n>\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     \n>     U:\\foo>git status\n>     # On branch master\n>     # Untracked files:\n>     #   (use \"git add <file>...\" to include in what will be committed)\n>     #\n>     #       trace1\n>     #       trace2\n>     nothing added to commit but untracked files present (use \"git add\" \n> to track)\n>     \n>     U:\\foo>git add trace1\n>     \n>     U:\\foo>git commit trace1 -m \"testing\"\n\nNote that specifying 'trace1' here is redundant, since you already added it and had no other staged changes.  Perhaps you can re-run a test like this without the extra argument for comparison.  That would tell us if it matters that the write and read happen in the same process.\n\n>     error: unable to find cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     fatal: cecae5b4c87ea21aef513fcfcd5c27fe87e0536f is not a valid \n> object\n>     \n>     U:\\foo>git cat-file -p cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    test.txt\n>     100644 blob c9009b02950964cf1d5281125e6e2f647dd9dc16    trace1\n\nI'm inclined to just say that your FS is crazy.\n\nWhat's unsatisfactory is that we already have a bunch of crazy FS workarounds in move_temp_to_file(), which is one obvious candidate for what is going on here.  So this wouldn't be something new; just another craziness to work around.\n\nFor example, you could test the theory that rename() has something to do with it by patching this into move_temp_to_file():\n\ndiff --git i/sha1_file.c w/sha1_file.c\nindex 67e815b..22af015 100644\n--- i/sha1_file.c\n+++ w/sha1_file.c\n@@ -2635,6 +2635,10 @@ int move_temp_to_file(const char *tmpfile, const char *filename)\n \t\t/* FIXME!!! Collision check here ? */\n \t}\n \n+\tif (access(filename, R_OK) < 0)\n+\t\treturn error(\"access(%s, R_OK) failed immediately after rename(): %s\",\n+\t\t\t     filename, strerror(errno));\n+\n out:\n \tif (adjust_shared_perm(filename))\n \t\treturn error(\"unable to set permission to '%s'\", filename);\n\n\n--\nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216487","messageId":"8B6563E531152E4190313499F193F94214AAB079@mbx500-u1-lo-3.exch500.msoutlookonline.net","threadId":"33381","inReplyTo":"878v3sh14d.fsf@linux-k42r.v.cablecom.net","subject":"RE: trouble on windows network share","fromName":"David Goldfarb","fromEmail":"deg@degel.com","sentAt":"2013-05-06T10:46:41Z","receivedAt":"2013-05-06T10:46:41Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"Oops, I earlier missed the second half of your message, where you suggested that I patch move_temp_to_file().\nSorry, I don't have the tool-chain or knowledge to recompile git into this win/Cygwin environment.\n\nWhat I can do, realistically, is:\n- Follow exact instructions.\n- (with some obvious hesitation) run executables that you send me.\n- Continue whatever tests you want with my existing git.\n\nNote, too, that:\n- This is occurring on a standard, off-the-shelf, NAS box, the Western Digital \"My Book Live\"\n- I would guess that the \"craziness\" has more to do with the box's network stack than with its FS, since it behaves fine when mounted on Linux, but not on Windows.\n\nDavid\n\n\n\n-----Original Message-----\nFrom: David Goldfarb \nSent: Monday, May 06, 2013 1:13 PM\nTo: 'Thomas Rast'\nCc: git@vger.kernel.org\nSubject: RE: trouble on windows network share\n\nOk.  Continuing in the same shell:\n\n    U:\\foo>git status\n    # On branch master\n    # Changes to be committed:\n    #   (use \"git reset HEAD <file>...\" to unstage)\n    #\n    #       new file:   trace1\n    #\n    # Untracked files:\n    #   (use \"git add <file>...\" to include in what will be committed)\n    #\n    #       trace2\n\n    U:\\foo>git commit -m \"test b\"\n    error: Trying to write ref refs/heads/master with nonexistent object 428dafc292b8396fc7b3c7f692dc9dfe1196a40a\n    fatal: cannot update HEAD ref\n\n    U:\\foo>dir /s *a40a\n     Volume in drive U is Users\n     Volume Serial Number is FC97-3DA5\n\n     Directory of U:\\foo\\.git\\objects\\42\n\n    05/06/2013  12:26 PM               152 8dafc292b8396fc7b3c7f692dc9dfe1196a40a\n                   1 File(s)            152 bytes\n\n         Total Files Listed:\n                   1 File(s)            152 bytes\n                   0 Dir(s)  1,594,477,576,192 bytes free\n\n    U:\\foo>date\n    The current date is: Mon 05/06/2013\n    Enter the new date: (mm-dd-yy)\n    U:\\foo>time\n    The current time is: 13:10:49.55\n    Enter the new time:\n    U:\\foo>git cat-file -p 428dafc292b8396fc7b3c7f692dc9dfe1196a40a\n    tree cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n    parent f6a0de35d12a3b58f12bf1af4ff629b8b004ad82\n    author David Goldfarb <deg@degel.com> 1367834997 +0300\n    committer David Goldfarb <deg@degel.com> 1367834997 +0300\n\n    test b\n\n    U:\\foo>U:\\foo>\n\n\n\nDavid\n\n-----Original Message-----\nFrom: Thomas Rast [mailto:trast@inf.ethz.ch]\nSent: Monday, May 06, 2013 1:08 PM\nTo: David Goldfarb\nCc: git@vger.kernel.org\nSubject: Re: trouble on windows network share\n\nDavid Goldfarb <deg@degel.com> writes:\n\n> Looks like it works.\n>\n> From the windows machine:\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>\n>     U:\\foo>\n>\n>\n> Double-checking that nothing was fixed or changed when I earlier committed the file from Linux, here's a second test:\n>\n>\n>     U:\\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     \n>     U:\\foo>git status\n>     # On branch master\n>     # Untracked files:\n>     #   (use \"git add <file>...\" to include in what will be committed)\n>     #\n>     #       trace1\n>     #       trace2\n>     nothing added to commit but untracked files present (use \"git add\" \n> to track)\n>     \n>     U:\\foo>git add trace1\n>     \n>     U:\\foo>git commit trace1 -m \"testing\"\n\nNote that specifying 'trace1' here is redundant, since you already added it and had no other staged changes.  Perhaps you can re-run a test like this without the extra argument for comparison.  That would tell us if it matters that the write and read happen in the same process.\n\n>     error: unable to find cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     fatal: cecae5b4c87ea21aef513fcfcd5c27fe87e0536f is not a valid \n> object\n>     \n>     U:\\foo>git cat-file -p cecae5b4c87ea21aef513fcfcd5c27fe87e0536f\n>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1\n>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2\n>     100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    test.txt\n>     100644 blob c9009b02950964cf1d5281125e6e2f647dd9dc16    trace1\n\nI'm inclined to just say that your FS is crazy.\n\nWhat's unsatisfactory is that we already have a bunch of crazy FS workarounds in move_temp_to_file(), which is one obvious candidate for what is going on here.  So this wouldn't be something new; just another craziness to work around.\n\nFor example, you could test the theory that rename() has something to do with it by patching this into move_temp_to_file():\n\ndiff --git i/sha1_file.c w/sha1_file.c\nindex 67e815b..22af015 100644\n--- i/sha1_file.c\n+++ w/sha1_file.c\n@@ -2635,6 +2635,10 @@ int move_temp_to_file(const char *tmpfile, const char *filename)\n \t\t/* FIXME!!! Collision check here ? */\n \t}\n \n+\tif (access(filename, R_OK) < 0)\n+\t\treturn error(\"access(%s, R_OK) failed immediately after rename(): %s\",\n+\t\t\t     filename, strerror(errno));\n+\n out:\n \tif (adjust_shared_perm(filename))\n \t\treturn error(\"unable to set permission to '%s'\", filename);\n\n\n--\nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"216494","messageId":"871B6C10EBEFE342A772D1159D1320853F65E5B6@umechphj.easf.csd.disa.mil","threadId":"33381","inReplyTo":"87ip2wla12.fsf@linux-k42r.v.cablecom.net","subject":"RE: trouble on windows network share","fromName":"Pyeron, Jason J CTR (US)","fromEmail":"jason.j.pyeron.ctr@mail.mil","sentAt":"2013-05-06T13:10:34Z","receivedAt":"2013-05-06T13:10:34Z","isPatch":false,"sender":{"key":"jason.j.pyeron.ctr@mail.mil","avatar":null},"body":"> -----Original Message-----\n> From: Thomas Rast\n> Sent: Monday, May 06, 2013 5:42 AM\n> \n> David Goldfarb <deg@degel.com> writes:\n> \n> > Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've\n> attached the strace outputs. (Note: for reasons that are probably\n> irrelevant, I needed to run the commands sudo'd. Shout back if this is\n> an issue).\n> >\n> > Under Windows 7, Cygwin git 1.7.9, commit fails:\n> >   U:\\foo>git commit -m \"added foo2\"\n> >   error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n> >   fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid\n> object\n> >\n> > For what it's worth, note that the file does exist.\n> >   U:\\foo>ls -l .git/objects/0b\n> >   total 1024\n> >   -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > (I'm not sure why the permissions are trashed. Seems to be a Cygwin\n> thing, or maybe my Cygwin config. The \"??????\" also  appears on local\n> files, and I believe also with files on the old Buffalo drive, so I\n> don't think it is relevant to the problem).  Just in case, here's the\n> same dir, as seen from the Ubuntu VM:\n> >\n> >   deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n> >   total 64\n> >   -rwxr-xr-x 0 root root 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > Again, note that there is some user permissions lossage here. I don't\n> know enough about Linux mount or CIFS, and apparently did the mount in\n> a way that everything seems to appear to be stuck owned by root. (same\n> problem I hinted at above). Hope this is not relevant to the problem.\n> >\n> > Here's how the same directory looks, when I'm ssh'd into the NAS box\n> itself:\n> >\n> >    CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n> >   total 64\n> >   -rwxrw-r-- 1 deg share 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > In any event, the symptoms don't seem to be a permissions problem, so\n> all this extra info is probably just a red herring, I hope.\n> \n> Hrm.  What about what Jeff already asked of the OP (and AFAICS never\n> got\n> a reply)?\n\nIf referring to me, then yes but it was too big for the list.\n\n> \n> } If it's a race condition between the write and the subsequent read in\n> } the same process, then it would be solved by looking at the object\n> } later. Does \"git cat-file -p\n> 6838761d549cf76033d2e9faf5954e62839eb25d\"\n> } work, or is the object forever inaccessible?\n> \n> In your case: git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n\n\n"},{"id":"216691","messageId":"8B6563E531152E4190313499F193F94214AB8CED@mbx500-u1-lo-3.exch500.msoutlookonline.net","threadId":"33381","inReplyTo":"871B6C10EBEFE342A772D1159D1320853F65E5B6@umechphj.easf.csd.disa.mil","subject":"RE: trouble on windows network share","fromName":"David Goldfarb","fromEmail":"deg@degel.com","sentAt":"2013-05-08T09:37:57Z","receivedAt":"2013-05-08T09:37:57Z","isPatch":false,"sender":{"key":"deg@degel.com","avatar":"https://gravatar.com/avatar/aa45de6f8c2d6f4f723fb8a956fae3bf7dd0089aba4d345d3f330bfa37495e1b?d=mp&s=160"},"body":"Here's one more data point. It suggests that the problem is due to either Cygwin or possibly Git 1.7.9.\n\n\nMy Ubuntu box is actually a VM, hosted by my windows box in VMWare Player.\n\nSo, I tried using the VMWare shared folder feature, to mount the Windows U: drive (which is physically on the WD NAS box) as /mnt/hgfs/Host-U on Ubuntu.\nThen, I tried linux on the Ubuntu box, fully expecting it to fail as it trampolined through Windows connection to the NAS box).\n\nBut, it worked fine.\n\nSo, at this point, it became likely that the problem is tied to the different version of Git that I have on the two machines:\n- On Ubuntu, git version 1.7.10.4\n- On Windows, Cygwin's git version 1.7.9 (which appears to be the latest version for Cygwin).\n\nSo, I installed Git on Windows from http://git-scm.com/download/win. Git version 1.8.1.msysgit.1\n\nTriumph: Git on windows works with this git but, on the same file and repo, fails with Cygwin git.\n\nSo, either something relevant changed in Git 1.7.10, or (more likely) this is a Cygwin issue.\n\n\nJason, are you also using Cygwin git?  Are you also using a WD NAS?\n\nDavid\n\n-----Original Message-----\nFrom: Pyeron, Jason J CTR (US) [mailto:jason.j.pyeron.ctr@mail.mil] \nSent: Monday, May 06, 2013 4:11 PM\nTo: Thomas Rast; David Goldfarb\nCc: git@vger.kernel.org\nSubject: RE: trouble on windows network share\n\n> -----Original Message-----\n> From: Thomas Rast\n> Sent: Monday, May 06, 2013 5:42 AM\n> \n> David Goldfarb <deg@degel.com> writes:\n> \n> > Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've\n> attached the strace outputs. (Note: for reasons that are probably\n> irrelevant, I needed to run the commands sudo'd. Shout back if this is\n> an issue).\n> >\n> > Under Windows 7, Cygwin git 1.7.9, commit fails:\n> >   U:\\foo>git commit -m \"added foo2\"\n> >   error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n> >   fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid\n> object\n> >\n> > For what it's worth, note that the file does exist.\n> >   U:\\foo>ls -l .git/objects/0b\n> >   total 1024\n> >   -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > (I'm not sure why the permissions are trashed. Seems to be a Cygwin\n> thing, or maybe my Cygwin config. The \"??????\" also  appears on local\n> files, and I believe also with files on the old Buffalo drive, so I\n> don't think it is relevant to the problem).  Just in case, here's the\n> same dir, as seen from the Ubuntu VM:\n> >\n> >   deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n> >   total 64\n> >   -rwxr-xr-x 0 root root 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > Again, note that there is some user permissions lossage here. I don't\n> know enough about Linux mount or CIFS, and apparently did the mount in\n> a way that everything seems to appear to be stuck owned by root. (same\n> problem I hinted at above). Hope this is not relevant to the problem.\n> >\n> > Here's how the same directory looks, when I'm ssh'd into the NAS box\n> itself:\n> >\n> >    CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n> >   total 64\n> >   -rwxrw-r-- 1 deg share 74 May  5 01:15\n> 89efdeef245ed6a0a7eacc5c578629a141f856\n> >\n> > In any event, the symptoms don't seem to be a permissions problem, so\n> all this extra info is probably just a red herring, I hope.\n> \n> Hrm.  What about what Jeff already asked of the OP (and AFAICS never\n> got\n> a reply)?\n\nIf referring to me, then yes but it was too big for the list.\n\n> \n> } If it's a race condition between the write and the subsequent read in\n> } the same process, then it would be solved by looking at the object\n> } later. Does \"git cat-file -p\n> 6838761d549cf76033d2e9faf5954e62839eb25d\"\n> } work, or is the object forever inaccessible?\n> \n> In your case: git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856\n"},{"id":"216769","messageId":"871B6C10EBEFE342A772D1159D1320853F65F7E0@umechphj.easf.csd.disa.mil","threadId":"33381","inReplyTo":"8B6563E531152E4190313499F193F94214AB8CED@mbx500-u1-lo-3.exch500.msoutlookonline.net","subject":"RE: trouble on windows network share","fromName":"Pyeron, Jason J CTR (US)","fromEmail":"jason.j.pyeron.ctr@mail.mil","sentAt":"2013-05-09T13:52:41Z","receivedAt":"2013-05-09T13:52:41Z","isPatch":false,"sender":{"key":"jason.j.pyeron.ctr@mail.mil","avatar":null},"body":"> -----Original Message-----\n> From: David Goldfarb \n> Sent: Wednesday, May 08, 2013 5:38 AM\n> \n> Here's one more data point. It suggests that the problem is due to\n> either Cygwin or possibly Git 1.7.9.\n> \n> \n> My Ubuntu box is actually a VM, hosted by my windows box in VMWare\n> Player.\n> \n> So, I tried using the VMWare shared folder feature, to mount the\n> Windows U: drive (which is physically on the WD NAS box) as\n> /mnt/hgfs/Host-U on Ubuntu.\n> Then, I tried linux on the Ubuntu box, fully expecting it to fail as it\n> trampolined through Windows connection to the NAS box).\n> \n> But, it worked fine.\n> \n> So, at this point, it became likely that the problem is tied to the\n> different version of Git that I have on the two machines:\n> - On Ubuntu, git version 1.7.10.4\n> - On Windows, Cygwin's git version 1.7.9 (which appears to be the\n> latest version for Cygwin).\n> \n> So, I installed Git on Windows from http://git-scm.com/download/win.\n> Git version 1.8.1.msysgit.1\n> \n> Triumph: Git on windows works with this git but, on the same file and\n> repo, fails with Cygwin git.\n> \n> So, either something relevant changed in Git 1.7.10, or (more likely)\n> this is a Cygwin issue.\n\nLikely.\n\n> \n> \n> Jason, are you also using Cygwin git?  Are you also using a WD NAS?\n\nCygwin, yes. I am going to spend some time (likely this weekend) to get the current version to compile on Cygwin.\n\nWD NAS, no. Windows Server 2008 with NTFS file system on internal raid.\n\n> \n> David\n> \n> -----Original Message-----\n> From: Pyeron, Jason J CTR (US) [mailto:jason.j.pyeron.ctr@mail.mil]\n> Sent: Monday, May 06, 2013 4:11 PM\n> To: Thomas Rast; David Goldfarb\n> Cc: git@vger.kernel.org\n> Subject: RE: trouble on windows network share\n> \n> > -----Original Message-----\n> > From: Thomas Rast\n> > Sent: Monday, May 06, 2013 5:42 AM\n> >\n> > David Goldfarb <deg@degel.com> writes:\n> >\n> > > Git works correctly under Linux (Ubuntu 12.04; git 1.7.9.5).  I've\n> > attached the strace outputs. (Note: for reasons that are probably\n> > irrelevant, I needed to run the commands sudo'd. Shout back if this\n> is\n> > an issue).\n> > >\n> > > Under Windows 7, Cygwin git 1.7.9, commit fails:\n> > >   U:\\foo>git commit -m \"added foo2\"\n> > >   error: unable to find 0b89efdeef245ed6a0a7eacc5c578629a141f856\n> > >   fatal: 0b89efdeef245ed6a0a7eacc5c578629a141f856 is not a valid\n> > object\n> > >\n> > > For what it's worth, note that the file does exist.\n> > >   U:\\foo>ls -l .git/objects/0b\n> > >   total 1024\n> > >   -rwxrw-r-- 1 ???????? ???????? 74 May  5 01:15\n> > 89efdeef245ed6a0a7eacc5c578629a141f856\n> > >\n> > > (I'm not sure why the permissions are trashed. Seems to be a Cygwin\n> > thing, or maybe my Cygwin config. The \"??????\" also  appears on local\n> > files, and I believe also with files on the old Buffalo drive, so I\n> > don't think it is relevant to the problem).  Just in case, here's the\n> > same dir, as seen from the Ubuntu VM:\n> > >\n> > >   deg@ubuntu:/mnt/users/foo$ ls -l .git/objects/0b\n> > >   total 64\n> > >   -rwxr-xr-x 0 root root 74 May  5 01:15\n> > 89efdeef245ed6a0a7eacc5c578629a141f856\n> > >\n> > > Again, note that there is some user permissions lossage here. I\n> don't\n> > know enough about Linux mount or CIFS, and apparently did the mount\n> in\n> > a way that everything seems to appear to be stuck owned by root.\n> (same\n> > problem I hinted at above). Hope this is not relevant to the problem.\n> > >\n> > > Here's how the same directory looks, when I'm ssh'd into the NAS\n> box\n> > itself:\n> > >\n> > >    CentralPark:/shares/Users/foo# ls -l .git/objects/0b\n> > >   total 64\n> > >   -rwxrw-r-- 1 deg share 74 May  5 01:15\n> > 89efdeef245ed6a0a7eacc5c578629a141f856\n> > >\n> > > In any event, the symptoms don't seem to be a permissions problem,\n> so\n> > all this extra info is probably just a red herring, I hope.\n> >\n> > Hrm.  What about what Jeff already asked of the OP (and AFAICS never\n> > got\n> > a reply)?\n> \n> If referring to me, then yes but it was too big for the list.\n> \n> >\n> > } If it's a race condition between the write and the subsequent read\n> in\n> > } the same process, then it would be solved by looking at the object\n> > } later. Does \"git cat-file -p\n> > 6838761d549cf76033d2e9faf5954e62839eb25d\"\n> > } work, or is the object forever inaccessible?\n> >\n> > In your case: git cat-file -p\n> 0b89efdeef245ed6a0a7eacc5c578629a141f856\n> \n\n"},{"id":"231435","messageId":"loom.20131203T174155-97@post.gmane.org","threadId":"33381","inReplyTo":"871B6C10EBEFE342A772D1159D1320853F65F7E0@umechphj.easf.csd.disa.mil","subject":"Re: trouble on windows network share","fromName":"Phil Wiffen","fromEmail":"phil.m.wiffen@outlook.com","sentAt":"2013-12-03T16:48:10Z","receivedAt":"2013-12-03T16:48:10Z","isPatch":false,"sender":{"key":"phil.m.wiffen@outlook.com","avatar":null},"body":"Did anyone ever get to the bottom of this? I'm seeing this exact issue on\nboth NetApp storage systems with SMB 2.x enabled and also on Windows 7 and\nServer 2008 R2 shares (which also use SMB 2.x). If we use SMB 1.x (such as\nXP), things work fine.\n"},{"id":"231436","messageId":"871B6C10EBEFE342A772D1159D13208557777F3F@ukelhp6y.easf.csd.disa.mil","threadId":"33381","inReplyTo":"loom.20131203T174155-97@post.gmane.org","subject":"RE: trouble on windows network share","fromName":"Pyeron, Jason J CTR (US)","fromEmail":"jason.j.pyeron.ctr@mail.mil","sentAt":"2013-12-03T17:30:11Z","receivedAt":"2013-12-03T17:30:11Z","isPatch":false,"sender":{"key":"jason.j.pyeron.ctr@mail.mil","avatar":null},"body":"That is a new detail (SMB 1 vs. 2) that can be used to debug this further.\n\n> -----Original Message-----\n> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On\n> Behalf Of Phil Wiffen\n> Sent: Tuesday, December 03, 2013 11:48 AM\n> To: git@vger.kernel.org\n> Subject: Re: trouble on windows network share\n> \n> Did anyone ever get to the bottom of this? I'm seeing this exact issue\n> on\n> both NetApp storage systems with SMB 2.x enabled and also on Windows 7\n> and\n> Server 2008 R2 shares (which also use SMB 2.x). If we use SMB 1.x (such\n> as\n> XP), things work fine.\n> \n> \n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}