git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Pyeron, Jason J CTR (US)" <jason.j.pyeron.ctr@mail.mil>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: trouble on windows network share
Date: Thu, 4 Apr 2013 11:51:12 -0400	[thread overview]
Message-ID: <20130404155112.GA11622@sigill.intra.peff.net> (raw)
In-Reply-To: <871B6C10EBEFE342A772D1159D1320853F63D205@umechphj.easf.csd.disa.mil>

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

  reply	other threads:[~2013-04-04 15:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 15:01 trouble on windows network share Pyeron, Jason J CTR (US)
2013-04-04 15:51 ` Jeff King [this message]
2013-04-05 12:44   ` Pyeron, Jason J CTR (US)
2013-04-11  4:56     ` Jeff King
2013-05-02 21:26 ` deg
2013-05-03  9:27   ` Thomas Rast
2013-05-04 23:23     ` David Goldfarb
2013-05-06  9:42       ` Thomas Rast
2013-05-06  9:53         ` David Goldfarb
2013-05-06 10:08           ` Thomas Rast
2013-05-06 10:13             ` David Goldfarb
2013-05-06 10:46             ` David Goldfarb
2013-05-06 13:10         ` Pyeron, Jason J CTR (US)
2013-05-08  9:37           ` David Goldfarb
2013-05-09 13:52             ` Pyeron, Jason J CTR (US)
2013-12-03 16:48               ` Phil Wiffen
2013-12-03 17:30                 ` Pyeron, Jason J CTR (US)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130404155112.GA11622@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jason.j.pyeron.ctr@mail.mil \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).