Summary: | [zfs] [panic] Panic on 'bectl list' after slog removal | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Jason Unovitch <junovitch> | ||||
Component: | kern | Assignee: | freebsd-fs (Nobody) <fs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | rew | ||||
Priority: | --- | Keywords: | crash | ||||
Version: | CURRENT | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Jason Unovitch
2021-01-04 00:14:39 UTC
Expanding on the comment of "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.", the report in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245649 looks similar to the observation I have after re-adding the slog device. Additional commands that panic on ZFS after step 5, removal of a slog device: zpool scrub zroot zfsbootcfg zfsbootcfg -p bectl create test; zfsbootcfg “zfs:zroot/ROOT/test” NB: manually setting the bootfs property does not panic. This appears consistent with the observations that `bectl create test`/`bectl activate test` still allow changing the bootfs. bectl create test; zpool set bootfs=zroot/ROOT/test zroot Similarly, the current version of sysutils/beadm from ports does NOT panic like bectl(8) will beadm list Created attachment 222658 [details]
fix panix after slog removal
Looks like this was patched by Patrick Mooney in https://www.illumos.org/issues/12981 I've submitted a pull request upstream to openzfs, https://github.com/openzfs/zfs/pull/11623 In the meantime, I've included the patch here. "Tested by:" looks good... I can confirm on a VM and physical hardware running Glen's 13.0-BETA3 commit at 150b4388d3b5 plus the addition of this patch that there are no longer issues running the previous panic inducing commands. I've checked these specific commands below. They are are all running fine on the VM test and aside from not checking the very last one on active physical hardware the first few are no longer inducing a panic. bectl list zpool scrub zroot zfsbootcfg zfsbootcfg -p bectl create test; zfsbootcfg “zfs:zroot/ROOT/test:” Robert thank you for the effort tracking this down. Will this make it in an upcoming 13.0-RC? A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=64649f0285424435634c2dfd39f49536fc2b50dd commit 64649f0285424435634c2dfd39f49536fc2b50dd Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2021-02-22 17:05:07 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2021-02-22 17:26:12 +0000 zfs: fix panic if scrubbing after removing a slog device From openzfs-master 11f2e9a4 commit message: vdev_ops: don't try to call vdev_op_hold or vdev_op_rele when NULL This prevents a panic after a SLOG add/removal on the root pool followed by a zpool scrub. When a SLOG is removed, a hole takes its place - the vdev_ops for a hole is vdev_hole_ops, which defines the handler functions of vdev_op_hold and vdev_op_rele as NULL. Patch Author: Patrick Mooney <pmooney@pfmooney.com> Obtained from: openzfs/zfs@11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1 PR: 252396 MFS after: 3 days (direct commit) sys/contrib/openzfs/module/zfs/vdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) A commit in branch releng/13.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ee0b7e05e72c8820441faff29a9df99b47aed6a0 commit ee0b7e05e72c8820441faff29a9df99b47aed6a0 Author: Martin Matuska <mm@FreeBSD.org> AuthorDate: 2021-02-22 17:05:07 +0000 Commit: Martin Matuska <mm@FreeBSD.org> CommitDate: 2021-02-25 16:19:49 +0000 zfs: fix panic if scrubbing after removing a slog device From openzfs-master 11f2e9a4 commit message: vdev_ops: don't try to call vdev_op_hold or vdev_op_rele when NULL This prevents a panic after a SLOG add/removal on the root pool followed by a zpool scrub. When a SLOG is removed, a hole takes its place - the vdev_ops for a hole is vdev_hole_ops, which defines the handler functions of vdev_op_hold and vdev_op_rele as NULL. Patch Author: Patrick Mooney <pmooney@pfmooney.com> Obtained from: openzfs/zfs@11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1 PR: 252396 Approved by: re (gjb) (cherry picked from commit 64649f0285424435634c2dfd39f49536fc2b50dd) sys/contrib/openzfs/module/zfs/vdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) The pull request was accepted and Martin got it merged in - I'm closing this. Thanks for the report Jason. And thanks to Martin for getting the patch in. |