git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Dmitriy Panteleyev <dpantel@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] commit fails with 'bus error' when working directory is on an NFS share
Date: Wed, 4 Dec 2024 22:22:46 -0500	[thread overview]
Message-ID: <20241205032246.GA2573761@coredump.intra.peff.net> (raw)
In-Reply-To: <CAJ-DG_AU8cFdLqfAnEE8N2KSqnQgJ47YJszyXWOvXuuKreAbCw@mail.gmail.com>

On Wed, Dec 04, 2024 at 07:21:16PM -0700, Dmitriy Panteleyev wrote:

> NFS server is on a linux bot on LAN. nfs-kernel-server 2.6.1. Client
> mounts shares as vers=3.

My setup was a little different, but I tried the same thing doing an
actual cross-network mount of an older box with 2.6.2, and making sure
to use vers=3. Still can't reproduce.

> After trying NO_MMAP=1 with and without SANITIZE, I get:
> "fatal: mmap failed: Permission denied"

Hmm, that's odd. If you run it under strace, which syscall fails? That
message should be reporting errno from mmap(), which in NO_MMAP mode
should be a pread() call. I'm not sure why that would get EACCES if the
open() call succeeded, but that might explain why the mmap'd version
gets SIGBUS (I don't know much about NFS, but I imagine that under the
hood the client is probably issuing reads for individual pages to
fault in the map).

Does your system have AppArmor enabled?

This issue sounds similar to yours:

  https://unix.stackexchange.com/questions/633389/man-cannot-read-manpage-from-nfs-although-the-file-is-readable

especially the bit where reading the metadata once makes it magically
work for a brief period (which is the only thing I'd expect the commit
you found via bisection to have an effect on).

-Peff

  reply	other threads:[~2024-12-05  3:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-30  4:58 [BUG] commit fails with 'bus error' when working directory is on an NFS share Dmitriy Panteleyev
2024-11-30 16:38 ` Jeff King
2024-12-01 17:17   ` Dmitriy Panteleyev
2024-12-01 21:36     ` Jeff King
2024-12-01 22:24       ` Dmitriy Panteleyev
2024-12-02 20:34         ` Jeff King
2024-12-03  2:48           ` Dmitriy Panteleyev
2024-12-03 21:18             ` Jeff King
2024-12-05  2:21               ` Dmitriy Panteleyev
2024-12-05  3:22                 ` Jeff King [this message]
2024-12-05  3:59                   ` Dmitriy Panteleyev
2024-12-05  4:58                     ` Dmitriy Panteleyev
2024-12-05 19:13                     ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2025-05-18 22:56 Evaldas Svidras

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=20241205032246.GA2573761@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=dpantel@gmail.com \
    --cc=git@vger.kernel.org \
    /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).