panic upon kldunload snd_ich (lor # 159)
Pyun YongHyeon
pyunyh at gmail.com
Tue Sep 13 18:48:15 PDT 2005
On Tue, Sep 13, 2005 at 07:35:50PM +0000, Ben Kaduk wrote:
[...]
> Pyun,
>
> I was able to try your patch -- it did not apply cleanly, but was simple to
> manually enter.
> After building a new kernel, the panic is gone, but the LOR remains -- it
Thanks for testing. Fix committed to HEAD(sndstat.c rev. 1.21)
> does seem that they were unrelated.
> For the records, the backtrace of the LOR (#159) is:
> lock order reversal
> 1st 0xc1716bc0 pcm0 (sound cdev) @
> /usr/src/sys/modules/sound/sound/../../../de
> v/sound/pcm/sound.c:761
> 2nd 0xc196b540 sndstat (sndstat) @
> /usr/src/sys/modules/sound/sound/../../../de
> v/sound/pcm/sndstat.c:256
> KDB: stack backtrace:
> kdb_backtrace(c06ef80d,c196b540,c1965a62,c1965a62,c1965a6a) at
> kdb_backtrace+0x2
> f
> witness_checkorder(c196b540,9,c1965a6a,100,c0725260) at
> witness_checkorder+0x68f
> _sx_xlock(c196b540,c1965a6a,100,c197a380,c18fca00) at _sx_xlock+0x7f
> sndstat_unregister(c171eb00,c197a380,c1965b77,2f9,c171eb00) at
> sndstat_unregiste
> r+0x27
> pcm_unregister(c171eb00,c761bbfc,c0557f32,c1943820,c171eb00) at
> pcm_unregister+0
> x112
> ich_pci_detach(c171eb00,c18e0050,c0721ba8,961,c1909ab0) at
> ich_pci_detach+0x13
> device_detach(c171eb00,c1942428,c171eb00,c1683400,c194380c) at
> device_detach+0x8
> f
> devclass_delete_driver(c1683400,c1943820,1,c1716280,c1716280) at
> devclass_delete
> _driver+0x8e
> driver_module_handler(c1716280,1,c194380c) at driver_module_handler+0xe7
> module_unload(c1716280,0,1fb,0,0) at module_unload+0x61
> linker_file_unload(c193ca00,0,c06e9d40,327,0) at linker_file_unload+0x89
> kern_kldunload(c16ebaf0,5,0,c761bd30,c06afce5) at kern_kldunload+0x96
> kldunloadf(c16ebaf0,c761bd04,8,422,2) at kldunloadf+0x2c
> syscall(3b,3b,3b,5,bfbfef12) at syscall+0x295
> Xint0x80_syscall() at Xint0x80_syscall+0x1f
> --- syscall (444, FreeBSD ELF32, kldunloadf), eip = 0x280b700b, esp =
> 0xbfbfe9dc
> , ebp = 0xbfbfee48 ---
> pcm0: detached
>
>
AFAIK, the LOR is well known to sound developers. Though it's not real
LOR(grabbing sx lock while holding mutex) it's difficult to fix.
--
Regards,
Pyun YongHyeon
More information about the freebsd-current
mailing list