NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/55042: Panic when creating a directory on a NFS served ZFS

>Number:         55042
>Category:       misc
>Synopsis:       Panic when creating a directory on a NFS served ZFS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 02 19:20:01 +0000 2020
>Originator:     Chavdar Ivanov
>Release:        9.99.48, amd64
CI4 Consulting Ltd
NetBSD ymir 9.99.48 NetBSD 9.99.48 (GENERIC) #17: Sat Feb 29 19:58:04 GMT 2020  sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC amd64

ZFS file system is exported via an entry in /etc/exports:

/tank/t1 -maproot=0:10 -network 192.168.0/24

It is mounted on another NetBSD-current system; all files and directories are seen from the client. 

When the client attempts to create a directory on the nfs-server zfs filesystem, the server either resets straight away, or panics; as the client is still waiting for the directory to be created, upon restart the same happens in a loop, this time for sure saving a core dump. The trace is as follows:
(gdb) target kvm netbsd.0.core
0xffffffff80224225 in cpu_reboot ()
(gdb) bt
#0  0xffffffff80224225 in cpu_reboot ()
#1  0xffffffff809fdbff in kern_reboot ()
#2  0xffffffff80a3fff9 in vpanic ()
#3  0xffffffff80a400bd in panic ()
#4  0xffffffff8022669d in trap ()
#5  0xffffffff8021ed43 in alltraps ()
#6  0xffffffff827340a1 in zfs_log_create ()
#7  0xffffffff827410aa in zfs_netbsd_mkdir ()
#8  0xffffffff80ab14d9 in VOP_MKDIR ()
#9  0xffffffff8090de71 in nfsrv_mkdir ()
#10 0xffffffff80922172 in do_nfssvc ()
#11 0xffffffff80255cb9 in syscall ()
#12 0xffffffff802096ad in handle_syscall ()

To exit the reboot loop, one has to boot single-user and comment out the line in /etc/exports. 

- enable zfs (zfs=YES >> /etc/rc.conf; reboot)
- create a zpool - even backed up by a file
- create a filesystem in this pool 
- nfs export it as above, copy some files, create som directories etc. 
- mount -t nfs from another host (tested only with NetBSD-current)
- mkdir whatever on the mounted directory

Home | Main Index | Thread Index | Old Index