[Bug 261520] panic: VERIFY3(0 == dmu_bonus_hold_by_dnode(dn, FTAG, &db, flags)) failed (0 == 5)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 27 Jan 2022 17:10:04 UTC

            Bug ID: 261520
           Summary: panic: VERIFY3(0 == dmu_bonus_hold_by_dnode(dn, FTAG,
                    &db, flags)) failed (0 == 5)
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: gldisater@gmail.com

Panic when zfs sending to an encrypted dataset.

FreeBSD 13.0-RELEASE-p4

tar zcvf panic.tar.gz /boot/kernel /var/crash/*.1 /usr/lib/debug/boot/kernel


zpool history data | grep -e "zpool import" -B 4
2021-12-22.01:10:20 zfs receive -s -F data/encrypted/zroot/var/audit
2021-12-22.01:10:20 zfs rollback -R
2021-12-22.01:10:32 zfs receive -s -F data/encrypted/zroot/var/crash
2021-12-22.01:10:32 zfs rollback -R
2021-12-22.01:13:41 zpool import -c /etc/zfs/zpool.cache -a -N
2022-01-18.23:09:32 zfs receive -s -F data/encrypted/zroot/var/audit
2022-01-18.23:09:33 zfs rollback -R
2022-01-18.23:09:42 zfs receive -s -F data/encrypted/zroot/var/crash
2022-01-18.23:09:43 zfs rollback -R
2022-01-18.23:13:13 zpool import -c /etc/zfs/zpool.cache -a -N

The only remaining data sets to be sent were very small, so they may not have
been successfully received and the history may not reflect that:
zroot/var/log                      9.47M  1.36T      664K  /var/log
zroot/var/mail                     16.3M  1.36T     12.5M  /var/mail
zroot/var/tmp                       512K  1.36T       96K  /var/tmp

Unread portion of the kernel message buffer:
panic: VERIFY3(0 == dmu_bonus_hold_by_dnode(dn, FTAG, &db, flags)) failed (0 ==

cpuid = 12
time = 1642565383
KDB: stack backtrace:
#0 0xffffffff80c574c5 at kdb_backtrace+0x65
#1 0xffffffff80c09ea1 at vpanic+0x181
#2 0xffffffff8215e07a at spl_panic+0x3a
#3 0xffffffff821cd7f1 at receive_object+0x971
#4 0xffffffff821cb9a5 at receive_writer_thread+0x115
#5 0xffffffff80bc7dde at fork_exit+0x7e
#6 0xffffffff810629de at fork_trampoline+0xe
Uptime: 27d21h56m23s
Dumping 6349 out of 65091 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
warning: Source file is more recent than executable.
55              __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=<optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff80c09a96 in kern_reboot (howto=260)
    at /usr/src/sys/kern/kern_shutdown.c:486
#3  0xffffffff80c09f10 in vpanic (fmt=<optimized out>, ap=<optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:919
#4  0xffffffff8215e07a in spl_panic (file=<optimized out>,
    func=<optimized out>, line=<unavailable>, fmt=<unavailable>)
    at /usr/src/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c:107
#5  0xffffffff821cd7f1 in receive_object (rwa=rwa@entry=0xfffff80729ea1900,
    drro=drro@entry=0xfffff8086864a488, data=0xfffff8082a2a1200)
    at /usr/src/sys/contrib/openzfs/module/zfs/dmu_recv.c:1799
#6  0xffffffff821cb9a5 in receive_process_record (rwa=0xfffff80729ea1900,
    at /usr/src/sys/contrib/openzfs/module/zfs/dmu_recv.c:2711
#7  receive_writer_thread (arg=arg@entry=0xfffff80729ea1900)
    at /usr/src/sys/contrib/openzfs/module/zfs/dmu_recv.c:2806
#8  0xffffffff80bc7dde in fork_exit (
    callout=0xffffffff821cb890 <receive_writer_thread>,
    arg=0xfffff80729ea1900, frame=0xfffffe020ae5abc0)
    at /usr/src/sys/kern/kern_fork.c:1069
#9  <signal handler called>
#10 0x00000008007b888a in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffffff5088

You are receiving this mail because:
You are the assignee for the bug.