Re: Panic testing ZFS raidz expansion feature.

From: Maurizio Vairani <maurizio1018_at_gmail.com>
Date: Tue, 14 Jan 2025 08:10:01 UTC
Hi Alexander,
thank you very much, with your patch it works.
--
Maurizio

Il giorno ven 10 gen 2025 alle ore 16:08 Alexander Motin <mav@freebsd.org>
ha scritto:

> Hi Maurizio,
>
> I was able to reproduce it on a real hardware.  The critical points are
> that vdev should have ashift > 9 and it should be a debug build.  This
> patch fixes it for me: https://github.com/openzfs/zfs/pull/16942 .
>
> On 10.01.2025 03:33, Maurizio Vairani wrote:
> > I'm using vm-bhyve-1.5.0_1. The vm-byve package is configured correctly.
> >
> > # vm iso
> >
> https://download.freebsd.org/snapshots/amd64/amd64/ISO-IMAGES/15.0/FreeBSD-15.0-CURRENT-amd64-20250109-4c89d59e0cda-274641-bootonly.iso
> <
> https://download.freebsd.org/snapshots/amd64/amd64/ISO-IMAGES/15.0/FreeBSD-15.0-CURRENT-amd64-20250109-4c89d59e0cda-274641-bootonly.iso
> >
> > # vm create fbsd15-13
> > # cd /mnt/pool2tb/vm/fbsd15-13
> > In fbsd15-13.conf:
> > memory=2G
> > # vm install fbsd15-13
> > FreeBSD-15.0-CURRENT-amd64-20250109-4c89d59e0cda-274641-bootonly.iso
> > # vm console fbsd15-13
> > Install the OS and switch off the VM.
> > # truncate -s 10G disk1.img
> > # truncate -s 10G disk2.img
> > # truncate -s 10G disk3.img
> > # truncate -s 10G disk4.img
> > lines added in fbsd15-13.conf:
> > disk1_type="virtio-blk"
> > disk1_name="disk1.img"
> > disk2_type="virtio-blk"
> > disk2_name="disk2.img"
> > disk3_type="virtio-blk"
> > disk3_name="disk3.img"
> > disk4_type="virtio-blk"
> > disk4_name="disk4.img"
> > # vm start fbsd15-13
> > # vm console fbsd15-13
> > In the VM:
> > # zpool create tank raidz1 vtbd1 vtbd2 vtbd3
> > # zpool attach tank raidz1-0 vtbd4
> > panic: VERIFY(vd == vd->vdev_top) failed
> >
> > cpuid = 0
> > time = 1736497428
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
> > 0xfffffe005469f820
> > vpanic() at vpanic+0x136/frame 0xfffffe005469f950
> > spl_panic() at spl_panic+0x3a/frame 0xfffffe005469f9b0
> > zio_vdev_io_start() at zio_vdev_io_start+0x63a/frame 0xfffffe005469fa00
> > zio_nowait() at zio_nowait+0x10c/frame 0xfffffe005469fa40
> > vdev_check_boot_reserve() at vdev_check_boot_reserve+0x7a/frame
> > 0xfffffe005469fa70
> > spa_vdev_attach() at spa_vdev_attach+0x712/frame 0xfffffe005469faf0
> > zfs_ioc_vdev_attach() at zfs_ioc_vdev_attach+0x75/frame
> 0xfffffe005469fb30
> > zfsdev_ioctl_common() at zfsdev_ioctl_common+0x49a/frame
> 0xfffffe005469fbd0
> > zfsdev_ioctl() at zfsdev_ioctl+0xfb/frame 0xfffffe005469fc00
> > devfs_ioctl() at devfs_ioctl+0xd1/frame 0xfffffe005469fc50
> > vn_ioctl() at vn_ioctl+0xb6/frame 0xfffffe005469fcc0
> > devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe005469fce0
> > kern_ioctl() at kern_ioctl+0x286/frame 0xfffffe005469fd40
> > sys_ioctl() at sys_ioctl+0x12f/frame 0xfffffe005469fe00
> > amd64_syscall() at amd64_syscall+0x158/frame 0xfffffe005469ff30
> > fast_syscall_common() at fast_syscall_common+0xf8/frame
> 0xfffffe005469ff30
> > --- syscall (54, FreeBSD ELF64, ioctl), rip = 0x2f2054f58cca, rsp =
> > 0x2f2048e41cf8, rbp = 0x2f2048e41d60 ---
> > KDB: enter: panic
> > [ thread pid 999 tid 100184 ]
> > Stopped at      kdb_enter+0x33: movq    $0,0x10538d2(%rip)
> > db>
>
> --
> Alexander Motin
>