Re: ZFS Rename rebooting server

From: <seneca_at_vybenetworks.com>
Date: Tue, 15 Oct 2024 18:31:42 UTC
On 14.10.2024 17:32, D'Arcy Cain wrote:
> I have never seen this before.  I am running bhyve on ZFS and I want to
> rename the VM.  I shut down the server and do "zfs rename old new" and
> BOOM! it reboots.  No wait, just immediate.

In short, that server had a kernel panic that appears to be related to
OpenZFS issue #16274: "Kernel oops (null pointer dereference) when
renaming a zvol, if snapdev=visible AND the zvol has at least one
snapshot".  For reference, it currently runs 14.1-RELEASE-p5.

> Anyone know how to debug something like this?

I started by connecting to the server's built-in remote KVM.  From it, I
saw, and photographed, the rather distinctive output generated by a
kernel panic (a page fault) resulting from a zfs rename attempt.

A quick search online using more general terms was not useful, so I then
went to OpenZFS' Github repository and searched for issues that included
the term 'z_zvol', the name of the panic's current process.  Issue 
#16274
was near the top of the returned list, and the conditions mentioned in
the title matched the conditions on the server and zfs rename in
question.

 From the longer comment thread in the issue, I saw a rather similar 
stack
trace to the one from the server (although Linux, not FreeBSD), using 
the
same version of OpenZFS as FreeBSD 14.1, and a confirmation that the
issue affected FreeBSD 15.  This issue is triggered specifically by
trying to rename zvols with snapshots and snapdev=visible.

I then set snapdev=hidden on the zvol to be renamed and watched another
attempt at renaming it.  This time, the zfs rename succeeded with no
panic.

-- 
Seneca Cunningham