Bug 257012

Summary: panic in sys/contrib/openzfs/module/zfs/arc.c arc_release() due to faulty ASSERT
Product: Base System Reporter: Dennis Clarke <dclarke>
Component: kernAssignee: freebsd-fs (Nobody) <fs>
Status: New ---    
Severity: Affects Some People CC: emaste, grahamperrin, lwhsu, pen
Priority: --- Keywords: crash
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
console image after a repeatable panic
none
console image of panic none

Description Dennis Clarke 2021-07-06 06:30:01 UTC
Created attachment 226260 [details]
console image after a repeatable panic

Per the discussion in the upstream OpenZFS project : 

    arc: Drop an incorrect assert 
    https://github.com/openzfs/zfs/pull/12246

We see the ASSERT(HDR_EMPTY(hdr)) here : 

    https://github.com/freebsd/freebsd-src/blob/main/sys/contrib/openzfs/module/zfs/arc.c#L6531

Trivial to comment that out. Which I did and then the system runs fine
without a strange panic. Otherwise I get a very reliable and even a
repeatable panic. See attached console images. 


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
Comment 1 Dennis Clarke 2021-07-06 06:30:34 UTC
Created attachment 226261 [details]
console image of panic
Comment 2 Dennis Clarke 2021-07-06 06:31:27 UTC
I have other images taken of the console but they all look the exact
same other than a timestamp.
Comment 3 Peter Eriksson 2021-07-06 09:46:30 UTC
Hmm...

Could this affect the old FreeBSD-ZFS code in FreeBSD 12.2? I notice that the same assert is there at line 6268.

Haven't seen that crash on our servers though but I'd prefer to be proactive :-)

(And upgrading to FreeBSD 13/CURRENT is not an option yet)

- Peter
Comment 4 Dennis Clarke 2021-07-06 20:29:41 UTC
(In reply to Peter Eriksson from comment #3)

My understanding is that any 13.0-RELEASE machine "works" simply because
INVARIANTS, ie assertions, is off by default for stable kernels but they
are enabled by default for -CURRENT.  So they bug is still in there and
being silently ignored. Which bothers me somewhat.