git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: trouble on windows network share

From
PUPyeron, Jason J CTR (US) <jason.j.pyeron.ctr@mail.mil>
Date
Apr 5, 2013, 12:44 UTC
Message-ID
<871B6C10EBEFE342A772D1159D1320853F63DA3D@umechphj.easf.csd.disa.mil>
In-Reply-To
<20130404155112.GA11622@sigill.intra.peff.net>
[strace attachment has been removed, email being resent]
It looks like there is a race condition going on, especially since the location and message changes.
Could it be the file creation, file read, apply file security is happening when it should be file create, apply security, file read?
Looking at trace line: 1088001 (full trace attached)
1181 1087049 [main] git 9320 symlink_info::check: 0x0 = NtCreateFile (\??\UNC\server\share\dir1\dir2\test\.git\objects\68)
   84 1087133 [main] git 9320 symlink_info::check: not a symlink
  733 1087866 [main] git 9320 symlink_info::check: 0 = symlink.check(\\server\share\dir1\dir2\test\.git\objects\68, 0x288280) (0x4022)
   62 1087928 [main] git 9320 path_conv::check: this->path(\\server\share\dir1\dir2\test\.git\objects\68\38761d549cf76033d2e9faf5954e62839eb25d), has_acls(1)
   31 1087959 [main] git 9320 build_fh_pc: fh 0x61274CA0, dev 0xC3
   21 1087980 [main] git 9320 __set_errno: int fhandler_base::fhaccess(int, bool):367 setting errno 2
   21 1088001 [main] git 9320 fhandler_base::fhaccess: returning -1
   19 1088020 [main] git 9320 access: returning -1
  164 1088184 [main] git 9320 fhandler_pty_slave::write: pty0, write(50A474, 7)
   18 1088202 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex (0xC0): waiting -1 ms
   20 1088222 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex: acquired
error: 
   21 1088243 [main] git 9320 fhandler_pty_slave::write: (672): pty output_mutex(0xC0) released
   18 1088261 [main] git 9320 write: 7 = write(2, 0x50A474, 7)
   36 1088297 [main] git 9320 fhandler_pty_slave::write: pty0, write(288680, 102)
   18 1088315 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex (0xC0): waiting -1 ms
   18 1088333 [main] git 9320 fhandler_pty_slave::write: (657): pty output_mutex: acquired
Trying to write ref refs/heads/master with nonexistent object 6838761d549cf76033d2e9faf5954e62839eb25d
Show 50 quoted lines
> -----Original Message-----
> From: Jeff King
> Sent: Thursday, April 04, 2013 11:51 AM
> 
> On Thu, Apr 04, 2013 at 03:01:36PM +0000, Pyeron, Jason J CTR (US)
> wrote:
> 
> > I am having trouble when the .git folder is on a network share, given
> the below where should I start on my debugging?
> > [...]
> > jason.pyeron@localhost //server/share/dir/subdir/test
> > $ git add test.txt
> >
> > jason.pyeron@localhost //server/share/dir/subdir/test
> > $ git commit -m test
> > error: unable to find 8b7323820a21ebd1360e27262b3c61283c266c23
> > fatal: 8b7323820a21ebd1360e27262b3c61283c266c23 is not a valid object
> 
> Hmm. That message probably comes from:
> 
>   static int sha1_loose_object_info(const unsigned char *sha1, unsigned
> long *sizep)
>   {
>   [...]
>           map = map_sha1_file(sha1, &mapsize);
>           if (!map)
>                   return error("unable to find %s", sha1_to_hex(sha1));
> 
> So we have found the object and know that it is loose, but then mmap-
> ing
> it fails. My guess is that your system does not support mmap across
> network shares (whether this is an OS issue or a cygwin limitation, I
> don't know). You could confirm it by running your "git commit" under
> strace, which I expect would show mmap returning -ENODEV or similar.
> 
> You can work around it by compiling git with NO_MMAP=1.
> 
> You might also try msysgit rather than cygwin, which seems to have its
> own win32 mmap compatibility layer.
> 
> Finally, I suspect we could include our emulate-mmap-with-pread
> compatibility wrapper all the time, and drop back to it automatically
> at
> run-time when we see ENODEV or a similar error return from mmap.
> 
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Jeff KingNext: Jeff King
Message 3 of 17 in “trouble on windows network share”
  1. Pyeron, Jason J CTR (US)Apr 4, 2013
  2. Jeff KingApr 4, 2013
  3. Pyeron, Jason J CTR (US)Apr 5, 2013
  4. Jeff KingApr 11, 2013
  5. degMay 2, 2013
  6. Thomas RastMay 3, 2013
  7. David GoldfarbMay 4, 2013
  8. Thomas RastMay 6, 2013
  9. David GoldfarbMay 6, 2013
  10. Thomas RastMay 6, 2013
  11. David GoldfarbMay 6, 2013
  12. David GoldfarbMay 6, 2013
  13. Pyeron, Jason J CTR (US)May 6, 2013
  14. David GoldfarbMay 8, 2013
  15. Pyeron, Jason J CTR (US)May 9, 2013
  16. Phil WiffenDec 3, 2013
  17. Pyeron, Jason J CTR (US)Dec 3, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.