armv7 chroot on aarch64 is getting "nfssvc() ERR#78 'Function not implemented'" for "umount /mnt" of a nfs mounted UFS file system

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 27 Jul 2024 04:20:45 UTC
The original mount was:

mount -onoatime 192.168.1.140:/ /mnt

For reference:
192.168.1.140:/ on /usr/obj/DESTDIRs/main-armv7-chroot-ports-official/mnt (nfs, noatime)

gdb reports:

Reading symbols from /sbin/umount...
Reading symbols from /usr/lib/debug//sbin/umount.debug...
[New LWP 100137]
Core was generated by `umount /mnt'.
Program terminated with signal SIGSYS, Bad system call.
Sent by kernel.
#0  nfssvc () at nfssvc.S:4

warning: 4 nfssvc.S: No such file or directory
(gdb) bt
#0  nfssvc () at nfssvc.S:4
#1  0x00021be8 in umountfs (sfs=sfs@entry=0xffffce90) at /home/pkgbuild/worktrees/main/sbin/umount/umount.c:396
#2  0x00022400 in checkname (mntname=0xffffddfb "/mnt", typelist=typelist@entry=0x0) at /home/pkgbuild/worktrees/main/sbin/umount/umount.c:327
#3  0x000218a4 in main (argc=<optimized out>, argv=<optimized out>) at /home/pkgbuild/worktrees/main/sbin/umount/umount.c:195


truss's output ends with:

. . .
mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 537321472 (0x2006e000)
statfs("/mnt",{ fstypename=nfs,mntonname=/usr/obj/DESTDIRs/main-armv7-chroot-ports-official/mnt,mntfromname=192.168.1.140:/,fsid=18ff003a3a000000 }) = 0 (0x0)
fstatat(AT_FDCWD,"/mnt",{ mode=drwxr-xr-x ,inode=2,size=1536,blksize=4096 },0x0) = 0 (0x0)
fstatat(AT_FDCWD,"/mnt/..",{ mode=drwxr-xr-x ,inode=73557804,size=512,blksize=32768 },0x0) = 0 (0x0)
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 537219072 (0x20055000)
mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 537341952 (0x20073000)
nfssvc() ERR#78 'Function not implemented'
SIGNAL 12 (SIGSYS) code=SI_KERNEL
process killed, signal = 12 (core dumped)


For reference:

    if (nfssvc(NFSSVC_DUMPMNTOPTS, &dumpmntopts) >= 0) {


armv7 chroot:

# uname -apKU
FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT main-n271408-4fab5f005482 GENERIC-NODEBUG arm armv7 1500021 1500021

# ls -lodTt /var/cache/pkg/*.snap*.pkg | grep -v "^l" | sed -E 's@^[^/]*(/.*/pkg/([^-]*-)(.*)(\.snap[^~]*)~[^.]*\.pkg)$@\2\4@' | sort -ru
FreeBSD-.snap20240726110821


aarch64 host:

# uname -apKU
FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT main-n271408-4fab5f005482 GENERIC-NODEBUG arm64 aarch64 1500021 1500021

# ls -lodTt /var/cache/pkg/*.snap*.pkg | grep -v "^l" | sed -E 's@^[^/]*(/.*/pkg/([^-]*-)(.*)(\.snap[^~]*)~[^.]*\.pkg)$@\2\4@' | sort -ru
FreeBSD-.snap20240726112037


After exiting the chroot, the aarch64 environment did the unmount /mnt just fine.


===
Mark Millard
marklmi at yahoo.com