I believe it's this change that's made my vbox image panic at the drop of a hat; while it occasionally panics before it even hits single user, it also consistently panics when starting syslogd (even from single-user):
panic: kqueue_scan,1491: kq=0xffffc779aeff6dc0 kq->kq_count(1) != count(0), nmarker=1 and the call chain is syscall -> sys___kevent50 -> kevent1 -> kqueue_check it also causes a panic while trying to dump more than half the time, but I have managed to get an image or two. ("panic: atastart: channel 0 busy, xfer not possible", if you're curious.) On Wed, Jan 20, 2021 at 09:39:09PM +0000, Jaromir Dolecek wrote: > Module Name: src > Committed By: jdolecek > Date: Wed Jan 20 21:39:09 UTC 2021 > > Modified Files: > src/sys/kern: kern_event.c > > Log Message: > fix a race in kqueue_scan() - when multiple threads check the same > kqueue, it could happen other thread seen empty kqueue while kevent > was being checked for re-firing and re-queued > > make sure to keep retrying if there are outstanding kevents even > if no kevent is found on first pass through the queue, and only > drop the KN_QUEUED flag and kq_count when actually completely done > with the kevent > > change is inspired by the FreeBSD in-flux handling, but without > introducing the reference counting > > PR kern/50094 by Christof Meerwald > > > To generate a diff of this commit: > cvs rdiff -u -r1.110 -r1.111 src/sys/kern/kern_event.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. >