Panic: "knote ... was already on knlist..." after main-n284826-d9d7b5948649

From: David Wolfskill <david_at_catwhisker.org>
Date: Thu, 02 Apr 2026 12:50:40 UTC
Build machine (kernel GENERIC) did not experience this.  So far, 3 out
of 3 laptops have (the 4th one has yet to finish the build).

I snapped a photo, which is up at
https://www.catwhisker.org/~david/FreeBSD/head/n284826/screen.jpg

The panic occurs during the late(r) part of the transition to multi-user
mode.  I am happy to poke at one of the machines, given suitable clues:
I tend to break stuff.

The machines had previously built and run main-n284804-f3b59bf28504.
All machines are amd64, and I use PORTS_MODULES in /etc/src.conf to
ensure that ports-resident kernel modules get rebuilt whenever the
kernel does./~david/FreeBSD/head/n284826/screen.jpg

The panic occurs during the late(r) part of the transition to multi-user
mode.  I am happy to poke at one of the machines, given suitable clues:
I tend to break stuff.

A quick scan down the backtrace shows:
db_trace_self_wrapper()
vpanic()
panic()
knlist_remove()
kqueue_fork_copy_list()
kqueue_fork()
fdcopy()
do_fork()
fork()
sys_fork()
amd64_syscall()
fast_syscall_common()
--- syscall
KDB: enter: panic
[ thread pid 1891 tld 100578 ]
Stopped at	xffffffffff88c177c3 = kdb_enter+0x33:	movq	$0,0x15f7842(%rip)
db> 

The machines had previously built and run main-n284804-f3b59bf28504.
All machines are amd64, and I use PORTS_MODULES in /etc/src.conf to
ensure that ports-resident kernel modules get rebuilt whenever the
kernel does.

Oh -- the 4th laptop also panicked (apparently similarly).

The older 3 laptops use custom kernels, but the newest one (which uses
ZFS & boot environments; the oolder ones do not) uses a GENERIC kernel
(as the build machine does).

Peace,
david
-- 
David H. Wolfskill                              david@catwhisker.org

See https://www.catwhisker.org/~david/publickey.gpg for my public key.