Re: git: 716fd348e01c - main - zfs: merge openzfs/zfs@c0cf6ed67

From: Shawn Webb <shawn.webb_at_hardenedbsd.org>
Date: Fri, 20 May 2022 19:04:37 UTC
On Wed, May 18, 2022 at 11:05:54PM +0000, Martin Matuska wrote:
> The branch main has been updated by mm:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=716fd348e01c5f2ba125f878a634a753436c2994
> 
> commit 716fd348e01c5f2ba125f878a634a753436c2994
> Merge: 4e2d3f26bd12 c0cf6ed6792e
> Author:     Martin Matuska <mm@FreeBSD.org>
> AuthorDate: 2022-05-18 22:54:40 +0000
> Commit:     Martin Matuska <mm@FreeBSD.org>
> CommitDate: 2022-05-18 22:55:59 +0000
> 
>     zfs: merge openzfs/zfs@c0cf6ed67
>     
>     Notable upstream pull request merges:
>       #10662 zvol_wait: Ignore locked zvols
>       #12789 Improve log spacemap load time
>       #12812 Improved zpool status output, list all affected datasets
>       #13277 FreeBSD: Use NDFREE_PNBUF if available
>       #13302 Make zfs_max_recordsize default to 16M
>       #13311 Fix error handling in FreeBSD's get/putpages VOPs
>       #13345 FreeBSD: Fix translation from ABD to physical pages
>       #13373 zfs: holds: dequadratify
>       #13375 Corrected edge case in uncompressed ARC->L2ARC handling
>       #13388 Improve mg_aliquot math
>       #13405 Reduce dbuf_find() lock contention
>       #13406 FreeBSD: use zero_region instead of allocating a dedicated page
>     
>     Obtained from:  OpenZFS
>     OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8

Hey Martin,

This may be the cause of recent ZFS-related kernel panics on the
HardenedBSD 14-CURRENT/amd64 package build server. I've uploaded the
core.txt file at [0].

[0]: https://hardenedbsd.org/~shawn/2022-05-20_core.txt.3.txt

[6710] panic: VERIFY(e->lse_mscount != 0) failed
[6710] 
[6710] cpuid = 17
[6710] time = 1653073004
[6710] __HardenedBSD_version = 1400002 __FreeBSD_version = 1400059
[6710] version = FreeBSD 14.0-CURRENT-HBSD #0  hardened/current/master-n191754-4b315ecbae7: Fri May 20 12:50:12 EDT 2022
[6710]     shawn@ci-08:/usr/obj/usr/src/amd64.amd64/sys/HARDENEDBSD
[6710] KDB: stack backtrace:
[6710] db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe03aa3a89e0
[6710] vpanic() at vpanic+0x184/frame 0xfffffe03aa3a8a30
[6710] spl_panic() at spl_panic+0x3a/frame 0xfffffe03aa3a8a90
[6710] spa_log_summary_decrement_blkcount() at spa_log_summary_decrement_blkcount+0x11d/frame 0xfffffe03aa3a8ac0
[6710] spa_cleanup_old_sm_logs() at spa_cleanup_old_sm_logs+0x128/frame 0xfffffe03aa3a8b10
[6710] metaslab_flush() at metaslab_flush+0x3da/frame 0xfffffe03aa3a8b70
[6710] spa_flush_metaslabs() at spa_flush_metaslabs+0x1ec/frame 0xfffffe03aa3a8bf0
[6710] spa_sync() at spa_sync+0x127d/frame 0xfffffe03aa3a8e20
[6710] txg_sync_thread() at txg_sync_thread+0x35b/frame 0xfffffe03aa3a8ef0
[6710] fork_exit() at fork_exit+0x85/frame 0xfffffe03aa3a8f30
[6710] fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe03aa3a8f30
[6710] --- trap 0, rip = 0, rsp = 0, rbp = 0 ---
[6710] Uptime: 1h51m50s
[6710] Dumping 11299 out of 262101 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
55              __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu,
(kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  dump_savectx () at /usr/src/sys/kern/kern_shutdown.c:403
#2  0xffffffff80bf68e5 in dumpsys (di=0x0)
    at /usr/src/sys/x86/include/dump.h:87
#3  doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:432
#4  kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:539
#5  0xffffffff80bf6d63 in vpanic (fmt=0xffffffff82422025 "%s", 
    ap=<optimized out>) at /usr/src/sys/kern/kern_shutdown.c:980
#6  0xffffffff82185caa in spl_panic (file=<optimized out>, 
    func=<optimized out>, line=<unavailable>, fmt=<unavailable>)
    at /usr/src/sys/contrib/openzfs/module/os/freebsd/spl/spl_misc.c:103
#7  0xffffffff822a42cd in spa_log_summary_decrement_blkcount (
    spa=spa@entry=0xfffffe03920b2000, blocks_gone=1)
    at /usr/src/sys/contrib/openzfs/module/zfs/spa_log_spacemap.c:518
#8  0xffffffff822a54f8 in spa_cleanup_old_sm_logs (spa=0xfffffe03920b2000, 
    spa@entry=0xc618, tx=tx@entry=0xfffff81835f62400)
    at /usr/src/sys/contrib/openzfs/module/zfs/spa_log_spacemap.c:939
#9  0xffffffff8227197f in metaslab_unflushed_bump (msp=<optimized out>, 
    msp@entry=0x0, tx=0x0, tx@entry=0xfffff81835f62400, dirty=dirty@entry=0)
    at /usr/src/sys/contrib/openzfs/module/zfs/metaslab.c:3785
#10 0xffffffff822732b7 in metaslab_flush_update (msp=<unavailable>, 
    msp@entry=0xfffff80121b6a000, tx=<unavailable>, 
    tx@entry=0xfffff81835f62400)
    at /usr/src/sys/contrib/openzfs/module/zfs/metaslab.c:3819
#11 0xffffffff8227206a in metaslab_flush (msp=msp@entry=0xfffff80121b6a000, 
    tx=tx@entry=0xfffff81835f62400)
    at /usr/src/sys/contrib/openzfs/module/zfs/metaslab.c:3938
#12 0xffffffff822a491c in spa_flush_metaslabs (
    spa=spa@entry=0xfffffe03920b2000, tx=<unavailable>, 
    tx@entry=0xfffff81835f62400)
    at /usr/src/sys/contrib/openzfs/module/zfs/spa_log_spacemap.c:856
#13 0xffffffff8229877d in spa_sync_iterate_to_convergence (
    spa=0xfffffe03920b2000, tx=0xfffff81835f62400)
    at /usr/src/sys/contrib/openzfs/module/zfs/spa.c:9117
#14 spa_sync (spa=spa@entry=0xfffffe03920b2000, txg=txg@entry=2819333)
    at /usr/src/sys/contrib/openzfs/module/zfs/spa.c:9309
#15 0xffffffff822b0f3b in txg_sync_thread (arg=0xfffff80121887000)
    at /usr/src/sys/contrib/openzfs/module/zfs/txg.c:591
#16 0xffffffff80baf625 in fork_exit (
    callout=0xffffffff822b0be0 <txg_sync_thread>, arg=0xfffff80121887000, 
    frame=0xfffffe03aa3a8f40) at /usr/src/sys/kern/kern_fork.c:1118
#17 <signal handler called>
(kgdb) 

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc