[Bug 252396] [zfs] [panic] Panic on 'bectl list' after slog removal

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 4 00:14:39 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252396

            Bug ID: 252396
           Summary: [zfs] [panic] Panic on 'bectl list' after slog removal
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: junovitch at freebsd.org

Overview:

Following the removal of a slog the pool is now in a state where 'bectl list'
will panic it. Discovered after removing the slog device from a machine when
the SSD it was on has been acting up.

Steps to Reproduce:

This is on a fresh VM with a minimal reproduction.

1. Create a VM with two disks or suitable partitions for testing.

Assuming ada0 was used as the zfs installation disk during bsdinstall... `gpart
create -s gpt ada1; gpart add -t freebsd-zfs -a 4096 ada1` is sufficient for
the second disk.

2. Baseline -- will run without issues

bectl list

3. Add the slog

zpool add zroot log ada1p1

4. Baseline 2 -- will run without issues

bectl list

5. Remove the slog

zpool remove zroot ada1p1

6. Create a panic

bectl list

Result:

vpanic() at vpanic+0x181/frame 0xfffffe00a80af3b0
panic() at panic+0x43/frame 0xfffffe00a80af410
trap_fatal() at trap_fatal+0x387/frame 0xfffffe00a80af470
trap_pfault() at trap_pfault+0x97/frame 0xfffffe00a80af4d0
trap() at trap+0x2ab/frame 0xfffffe00a80af5e0
--- trap 0xc, rip = 0 = 0xfffffe00a80af56b8, rbp = 0xfffffe00a80af6d0 --- ??()
at 0/frame 0xfffffe00a80af6d0
spa_vdev_state_enter() at spa_vdev_state_enter+0x43/frame 0xfffffe00a80af700
zfs_ioc_get_bootenv() at zfs_ioc_get_bootenv+0x32/frame 0xfffffe00a80af730
zfsdev_ioctl_common() at zfsdev_ioctl_common+0x4e0/frame 0xfffffe00a80af7d0
zfsdev_ioctl() at zfsdev_ioctl+0x146/frame 0xfffffe00a80af800
devfs_ioctl() at devfs_ioctl+0xcc/frame 0xfffffe00a80af850
vn_ioctl() at vn_ioctl+0x131/frame 0xfffffe00a80af960
devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe00a80af980
kern_ioctl() at kern_ioctl+0x289/frame 0xfffffe00a80afbf0
sys_ioctl() at sys_ioctl+0x12a/frame 0xfffffe00a80afbf0
amd64_syscall() at amd64_syscall+0x12a/frame 0xfffffe00a80afbf0
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00a80afbf0
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x8003db45a, rsp =
0x7fffffffc668, rbp = 0x7fffffffc6d0 ---
KDB: enter: panic
[ thread pid 796 tid 100470 ]
Stopped at     kdb_enter+0x37: movq    $0,0x1099396(%rip)

Build Date & Hardware:

In this example this is using the 31 December snapshots ISOs:

FreeBSD test 13.0-CURRENT FreeBSD 13.0-CURRENT #0 main-c255460-g282381aa53a: Th
Dec 31 06:08:47 UTC 2020    
root at releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

Also observed on a hardware with a GENEIRIC-NODEBUG amd64 kernel running:

FreeBSD bsd 13.0-CURRENT FreeBSD 13.0-CURRENT #0 main-c255337-g8d405efd73d: Sat
Dec 26 17:07:08 UTC 2020

Additional Information:

Re-adding the slog device will still results in a panic on 'bectl list'. It
will also panic on boot now and will no longer fully boot to the OS.

As a workaround bectl create, mount, umnount, activate commands all seem to
work from minimal checks.  It looks feasible to use zfs list to verify naming
and use the other commands to do minimal work on boot environments at this
point while ‘bectl list’ is creating a panic.

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


More information about the freebsd-bugs mailing list