Thread (12 messages) 12 messages, 2 authors, 2024-12-05

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

From: Jeff King <hidden>
Date: 2024-12-05 03:22:48

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help