Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2024 21:58:52 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD ARM List <freebsd-arm@freebsd.org>, Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: armv7 chroot [and lib32] on aarch64 is getting "nfssvc() ERR#78 'Function not implemented'" for "umount /mnt" of a nfs mounted UFS file system
Message-ID:  <AC219EDA-9F80-4F75-87C9-2520B516B855@yahoo.com>
In-Reply-To: <87D92513-97C9-4CFC-8A11-9819375FACAF@yahoo.com>
References:  <87D92513-97C9-4CFC-8A11-9819375FACAF@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 26, 2024, at 21:20, Mark Millard <marklmi@yahoo.com> wrote:

> The original mount was:
>=20
> mount -onoatime 192.168.1.140:/ /mnt
>=20
> For reference:
> 192.168.1.140:/ on =
/usr/obj/DESTDIRs/main-armv7-chroot-ports-official/mnt (nfs, noatime)
>=20
> gdb reports:
>=20
> 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
>=20
> warning: 4 nfssvc.S: No such file or directory
> (gdb) bt
> #0  nfssvc () at nfssvc.S:4
> #1  0x00021be8 in umountfs (sfs=3Dsfs@entry=3D0xffffce90) at =
/home/pkgbuild/worktrees/main/sbin/umount/umount.c:396
> #2  0x00022400 in checkname (mntname=3D0xffffddfb "/mnt", =
typelist=3Dtypelist@entry=3D0x0) at =
/home/pkgbuild/worktrees/main/sbin/umount/umount.c:327
> #3  0x000218a4 in main (argc=3D<optimized out>, argv=3D<optimized =
out>) at /home/pkgbuild/worktrees/main/sbin/umount/umount.c:195
>=20
>=20
> truss's output ends with:
>=20
> . . .
> =
mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-=
1,0x0) =3D 537321472 (0x2006e000)
> statfs("/mnt",{ =
fstypename=3Dnfs,mntonname=3D/usr/obj/DESTDIRs/main-armv7-chroot-ports-off=
icial/mnt,mntfromname=3D192.168.1.140:/,fsid=3D18ff003a3a000000 }) =3D 0 =
(0x0)
> fstatat(AT_FDCWD,"/mnt",{ mode=3Ddrwxr-xr-x =
,inode=3D2,size=3D1536,blksize=3D4096 },0x0) =3D 0 (0x0)
> fstatat(AT_FDCWD,"/mnt/..",{ mode=3Ddrwxr-xr-x =
,inode=3D73557804,size=3D512,blksize=3D32768 },0x0) =3D 0 (0x0)
> =
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1=
,0x0) =3D 537219072 (0x20055000)
> =
mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-=
1,0x0) =3D 537341952 (0x20073000)
> nfssvc() ERR#78 'Function not implemented'
> SIGNAL 12 (SIGSYS) code=3DSI_KERNEL
> process killed, signal =3D 12 (core dumped)
>=20
>=20
> For reference:
>=20
>    if (nfssvc(NFSSVC_DUMPMNTOPTS, &dumpmntopts) >=3D 0) {
>=20
>=20
> armv7 chroot:
>=20
> # uname -apKU
> FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT =
main-n271408-4fab5f005482 GENERIC-NODEBUG arm armv7 1500021 1500021
>=20
> # ls -lodTt /var/cache/pkg/*.snap*.pkg | grep -v "^l" | sed -E =
's@^[^/]*(/.*/pkg/([^-]*-)(.*)(\.snap[^~]*)~[^.]*\.pkg)$@\2\4@' | sort =
-ru
> FreeBSD-.snap20240726110821
>=20
>=20
> aarch64 host:
>=20
> # uname -apKU
> FreeBSD aarch64-main-pbase 15.0-CURRENT FreeBSD 15.0-CURRENT =
main-n271408-4fab5f005482 GENERIC-NODEBUG arm64 aarch64 1500021 1500021
>=20
> # ls -lodTt /var/cache/pkg/*.snap*.pkg | grep -v "^l" | sed -E =
's@^[^/]*(/.*/pkg/([^-]*-)(.*)(\.snap[^~]*)~[^.]*\.pkg)$@\2\4@' | sort =
-ru
> FreeBSD-.snap20240726112037
>=20
>=20
> After exiting the chroot, the aarch64 environment did the unmount /mnt =
just fine.


I set up a context where aarch64 ends up seeing (after chroot
exit):

# df -m
Filesystem        1M-blocks   Used  Avail Capacity  Mounted on
/dev/gpt/PBaseUFS   1114846 184896 840761    18%    /
devfs                     0      0      0     0%    /dev
/dev/gpt/PBaseEFI       244     26    218    11%    /boot/efi
192.168.1.140:/      823229  74755 682616    10%    =
/usr/obj/DESTDIRs/main-armv7-chroot-ports-official/mnt

I then used the armv7 umount:

# /usr/obj/DESTDIRs/main-armv7-chroot-ports-official/sbin/umount =
/usr/obj/DESTDIRs/main-armv7-chroot-ports-official/mnt
Bad system call (core dumped)

The truss output for such shows:

. . .
freebsd32_getfsstat(0x2004e000,11720,MNT_NOWAIT) =3D 4 (0x4)
=
freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALI=
GNED(12),-1,0x0) =3D 537411584 (0x20084000)
=
freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIG=
NED(12),-1,0x0) =3D 537423872 (0x20087000)
=
freebsd32_mmap(0x0,12288,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALI=
GNED(12),-1,0x0) =3D 537427968 (0x20088000)
#155() ERR#78 'Function not implemented'
SIGNAL 12 (SIGSYS) code=3DSI_KERNEL
process killed, signal =3D 12 (core dumped)


Side note:

# more ~/pkgbase-snapshot-list.sh=20
#! /bin/sh
ls -lodTt /var/cache/pkg/*.snap*.pkg | grep -v "^l" | sed -E =
's@^[^/]*(/.*/pkg/([^-]*-)(.*)(-[0-9][0-9]\.snap[^~]*)~[^.]*\.pkg)$@\2*\4@=
' | sort -ru

results in the likes of:

# ~/pkgbase-snapshot-list.sh
FreeBSD-*-15.snap20240726112037

that reads a little better.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC219EDA-9F80-4F75-87C9-2520B516B855>