I'm slimming down a GENERIC i386 kernel[1] for an embedded board[2], when i discovered that turning off MULTIPROCESSOR, leads to:
[ 12.3802131] Mutex error: mutex_spin_retry,979: locking against myself ... [ 12.3802131] panic: lock error: Mutex: mutex_spin_retry,979: locking against myself: lock 0xc1052b08 cpu 0 lwp 0xc0df7300 ... here the full trace: https://dpaste.org/ZsVvf $ gdb ../obj.i386/sys/arch/i386/compile/ALIX/netbsd.gdb (gdb) info line *(knote+0x34) Line 2937 of "/home/flag/bsd/netbsd/src/sys/kern/kern_event.c" starts at address 0xc03bec0c <knote+52> and ends at 0xc03bec13 <knote+59>. so, if i'm reading it correctly: static void knote_activate(struct knote *kn) { struct kqueue *kq = kn->kn_kq; mutex_spin_enter(&kq->kq_lock); <--- is it this one??? knote_activate_locked(kn); <--- 2937 is actually this line, though mutex_spin_exit(&kq->kq_lock); } the annoying part is that adding any debug option (e.g. LOCKDEBUG, etc) makes the panic disappear. Any idea how can i debug it further? 1: https://dpaste.com//GM8KQV74X 2: https://www.pcengines.ch/alix.htm -- bye, p.