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

Re: [BUG] commit fails with 'bus error' when working directory is on an NFS share

From
Jeff King <peff@peff.net>
Date
Dec 5, 2024, 03:22 UTC
Message-ID
<20241205032246.GA2573761@coredump.intra.peff.net>
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
Previous: Dmitriy PanteleyevNext: Dmitriy Panteleyev
Message 10 of 13 in “[BUG] commit fails with 'bus error' when working directory is on an NFS share”
  1. Dmitriy PanteleyevNov 30, 2024
  2. Jeff KingNov 30, 2024
  3. Dmitriy PanteleyevDec 1, 2024
  4. Jeff KingDec 1, 2024
  5. Dmitriy PanteleyevDec 1, 2024
  6. Jeff KingDec 2, 2024
  7. Dmitriy PanteleyevDec 3, 2024
  8. Jeff KingDec 3, 2024
  9. Dmitriy PanteleyevDec 5, 2024
  10. Jeff KingDec 5, 2024
  11. Dmitriy PanteleyevDec 5, 2024
  12. Dmitriy PanteleyevDec 5, 2024
  13. Jeff KingDec 5, 2024

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.