The variable qid in the fuunction _taskqgroup_adjust in sys/kern/subr_gtaskqueue.c is used uninitialized in some instances. On my Purism Librem 15, this variable is always unitialized. I wrote a little patch to detect when it hasn't been set, but is being used here: https://github.com/HardenedBSD/hardenedBSD-playground/commit/7c3b5f7624459e8108873861442be5ce9f497ad7 100% of the time on the Librem 15 at bootup, qid will end up hitting the KASSERT. I haven't studied the code to figure out a fix, yet. Without the patch, though, the code in question will cause a write to an arbitrary location, occasionally causing a kernel panic at bootup. With the patch, the system is unbootable since qid is always -1.
The problematic code exists in releng/11.0 as well.
(In reply to Shawn Webb from comment #1) For what it's worth, taskqgroup is only used by iflib, which won't have any consumer drivers in 11.0.
https://reviews.freebsd.org/D7799
(In reply to Mark Johnston from comment #2) Yes, but iflib triggers this even without drivers, via SYSINIT.
via iflib.c:483 TASKQGROUP_DEFINE(if_io_tqg, mp_ncpus, 1); gtaskqueue.h:115 taskqgroup_adjust(qgroup_##name, (cnt), (stride)); Although it still looks like iflib_irq_alloc_generic is deadcode and shouldn't be causing this.
Maybe Nathan didn't fix every !sparse CPU assumption in gtaskqueue.
Adding Nathan Whitehorn to the bug to see if he has any input.
Probably addressed in r307560, r307561, r307566, r307567.
Shawn can you confirm?
(In reply to Ed Maste from comment #9) Not anymore. The Purism Librem 15 didn't survive even four months of being around my wife. I now use a Dell Precision 7510. We could probably close this nearly-three-year-old ticket with OVERCOMEBYEVENTS.
Presumed fixed by one of the commits identified by cem@