Bug 279038

Summary: zfs panic: VERIFY3(dev->l2ad_hand + distance < dev->l2ad_end) failed
Product: Base System Reporter: John F. Carr <jfc>
Component: kernAssignee: freebsd-fs (Nobody) <fs>
Status: New ---    
Severity: Affects Only Me Keywords: crash
Priority: ---    
Version: 13.2-STABLE   
Hardware: Any   
OS: Any   
See Also: https://github.com/openzfs/zfs/issues/16202

Description John F. Carr 2024-05-16 15:33:04 UTC
While receiving incremental rsync data over the network my server crashed with message

panic: VERIFY3(dev->l2ad_hand + distance < dev->l2ad_end) failed (161060749312 < 161060749312)

Looking at arc.c, end of function l2arc_evict, I wonder if < should be <=.

The relevant variables are

 l2ad_hand = 161051246592
 l2ad_start = 4198400
 l2ad_end = 161060749312
 l2ad_first = 0
 l2ad_writing = 0

 distance = 9502720

# zfs version
zfs-2.1.15-FreeBSD_gfb6d53206
zfs-kmod-2.1.15-FreeBSD_gd99134be8

The server has a raidz2 pool on 3.5 inch hard drives with a cache on SSD.  RAM is 24 GB and there is no other pressure on memory or CPU.
Comment 1 John F. Carr 2024-05-25 13:53:27 UTC
A fix for this bug has been committed upstream.  See ZFS bug report 16202 in "See Also" field.