zfs related panic
- Reply: Konstantin Belousov : "Re: zfs related panic"
 - Go to: [ bottom of page ] [ top of archives ] [ this month ]
 
Date: Fri, 15 Aug 2025 18:19:55 UTC
Is this a known bug or may be something specific on my machine?
If the latter, any way to "fsck" it? FYI, the zpool is a mirror
(two files on the host via nvme). built from c992ac621327 commit hash
(which has other issues but they seem to be separate from this).
I saw the same panic when I booted from a day old snapshot.
Note that "ls /.zfs" panics but "ls /.zfs/snapshot" doesn't!
This is on a -current VM:
root@:/ # ls .zfs
VNASSERT failed: oresid == 0 || nresid != oresid || *(a)->a_eofflag == 1 not true at vnode_if.c:1824 (VOP_READDIR_APV)
0xfffff800058b0528: type VDIR state VSTATE_CONSTRUCTED op 0xffffffff82734fd0
    usecount 1, writecount 0, refcount 1 seqc users 0 mountedhere 0
    hold count flags ()
    flags ()
    lock type zfs: SHARED (count 1)
        name = .zfs
        parent_id = 0
        id = 1
panic: VOP_READDIR: eofflag not set
cpuid = 0
time = 1755218355
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0053f83af0
vpanic() at vpanic+0x136/frame 0xfffffe0053f83c20
panic() at panic+0x43/frame 0xfffffe0053f83c80
VOP_READDIR_APV() at VOP_READDIR_APV+0x205/frame 0xfffffe0053f83cd0
kern_getdirentries() at kern_getdirentries+0x228/frame 0xfffffe0053f83dd0
sys_getdirentries() at sys_getdirentries+0x29/frame 0xfffffe0053f83e00
amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe0053f83f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0053f83f30
--- syscall (554, FreeBSD ELF64, getdirentries), rip = 0x2a1c933af6aa, rsp = 0x2a1c8f0bf838, rbp = 0x2a1c8f0bf870 ---
KDB: enter: panic
[ thread pid 51 tid 100211 ]
Stopped at      kdb_enter+0x33: movq    $0,0x1231602(%rip)
zpool scrub finishes without  trouble. Same problem when I boot a day old kernel.
gdb shows:
#15 0xffffffff80b7970b in vpanic (
    fmt=0xffffffff812ddf30 "VOP_READDIR: eofflag not set",
    ap=ap@entry=0xfffffe0053f83c60)
    at /home/FreeBSD/current/sys/kern/kern_shutdown.c:962
#16 0xffffffff80b79573 in panic (
    fmt=0xffffffff81d9eab0 <cnputs_mtx> "\304\372\032\201\377\377\377\377")
    at /home/FreeBSD/current/sys/kern/kern_shutdown.c:887
#17 0xffffffff81195fd5 in VOP_READDIR_APV (vop=<optimized out>,
    a=a@entry=0xfffffe0053f83d30) at vnode_if.c:1824
#18 0xffffffff80c95c38 in VOP_READDIR (vp=0xfffff800058b0528,
    uio=0xfffffe0053f83d00, cred=<optimized out>, eofflag=0xfffffe0053f83d6c,
    ncookies=0x0, cookies=0x0) at ./vnode_if.h:972
#19 kern_getdirentries (td=0xfffff8007e7c3780, fd=<optimized out>,
    buf=0x3009ffe20000 "\001", count=4096,
    basep=basep@entry=0xfffffe0053f83df0, residp=residp@entry=0x0,
    bufseg=UIO_USERSPACE) at /home/FreeBSD/current/sys/kern/vfs_syscalls.c:4353
#20 0xffffffff80c96069 in sys_getdirentries (
    td=0xffffffff81d9eab0 <cnputs_mtx>, uap=0xfffff8007e7c3ba8)
    at /home/FreeBSD/current/sys/kern/vfs_syscalls.c:4287
#21 0xffffffff810ca8b9 in syscallenter (td=0xfffff8007e7c3780)
    at /home/FreeBSD/current/sys/amd64/amd64/../../kern/subr_syscall.c:193
#22 amd64_syscall (td=0xfffff8007e7c3780, traced=0)
    at /home/FreeBSD/current/sys/amd64/amd64/trap.c:1208