Re: panic: assertion failed in iflib_txq_drain()

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sat, 18 Apr 2026 13:53:33 UTC
> On 18. Apr 2026, at 14:06, David Wolfskill <david@catwhisker.org> wrote:
> 
> On Sat, Apr 18, 2026 at 11:47:14AM +0200, Ricardo Branco wrote:
>> I'm getting this on FreeBSD-kernel-generic 16.snap20260416224424
>> 
>> This is happening as soon as I try to ssh to a GMKTec NucBox G3 Plus with
>> Ethernet Controller I226-V.
>> 
>> It also happens when trying to do any TCP connection.  Attached gzipped
>> /var/crash/core.txt
>> 
>> panic: Assertion mp != NULL && *mp != NULL failed at
>> /home/pkgbuild/worktrees/main/sys/net/iflib.c:3922 cpuid= 3 time 1776500574
>> KDB: stack backtrace:
>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
>> 0xfffff81078b7450 vpanic at vpanic+0x136/frame 0xfffffe01078b7580
>> panic
>> at panic+0x43/frame 0xfffffe01078b75e0
>> iflib_txq_drain at iflib_txq_drain+0x429/frame 0xfffffe81078b7660
>> drain_ring_lockless() at drain_ring_lockless+0x8a/frame 0xfffffe01078b76b0
>> ifmp_ring_enqueue() at ifmp_ring_enqueue+0x332/frame 0xfffffe81078b7700
>> ....
> 
> So... one of the machines on which I track head got this, as well -- my
> (mostly-)headless build machine.  (2 laptops, updated in sync with the
> build machine, did not panic.  One of those also uses a wired NIC.)
Do the network drivers of the machines not being affected use iflib?

I do see the problem also on one of my machines and local testing shows that
https://cgit.FreeBSD.org/src/commit/?id=3fade68cfdf95ee0b517b5d69b270bd8da633404 <https://cgit.freebsd.org/src/commit/?id=3fade68cfdf95ee0b517b5d69b270bd8da633404>
is the problem. At least reverting it locally resolves the problem.
Can you confirm this?

Best regards
Michael
> 
> In my case, the failure occurred after updating from 
> 
> FreeBSD 16.0-CURRENT #547 main-n285122-3b373d484046: Fri Apr 17 13:15:23 UTC 2026     root@freebeast.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1600015 1600015
> 
> to main-n285179-7e9d974bc023.  (As noted, 2 other machines (so far)
> updated to main-n285179-7e9d974bc023 without issue.)
> 
> For now, I will reboot the machine to stable/15 (so it can build
> packages for tomorrow's weekly update), but once that's done, I'm
> happy to poke at it a bit or try out a patch or three, given suitable
> clues.
> 
> The panic appears "quite reproducible." :-}
> 
> Peace,
> david
> -- 
> David H. Wolfskill                              david@catwhisker.org
> 
> See https://www.catwhisker.org/~david/publickey.gpg for my public key.