ata sema panic: mtx_lock() of destroyed mutex ... sema ...

Robert Watson rwatson at
Wed May 23 16:06:46 UTC 2007

While attempting to debug the vga0 (actually, clocking locking) panic, I 
backed out to a 20070520 kernel, and saw the following:

acd0: WARNING - PREVENT_ALLOW read data overrun 18>0
panic: mtx_lock() of destroyed mutex @ /usr/src/sys/kern/kern_sema.c:79
KDB: enter: panic
[thread pid 17 tid 100012 ]
Stopped at	kdb_enter+0x32: leave
db> bt
Tracing pid 17 tid 100012 td 0xc2703000
kdb_enter(...) at kdb_enter+0x32
panic(...) at panic+0xc5
_mtx_lock_flags(...) at _mtx_lock_flags+0x59
_sema_post(...) at _sema_post+0x2a
ata_completed(...) at ata_completed+0x66d
taskqueue_run(...) at taskqueue_run+0x10b
taskqeueu_swi_run(...) at taskqueue_swi_run+0x13
ithread_loop(...) at ithread_loop+0x1b5

Hand-transcribed, full stack trace here:

No dump, but that's alright, it probably wouldn't have dumped anyway, given 
that ATA was keeling over :-).  ata_completed+0x66d maps to ata-queue.c:481 in 

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-current mailing list