Date: Fri, 7 Aug 2009 13:59:42 +0300 From: Shteryana Shopova <syrinx@FreeBSD.org> To: freebsd-current@freebsd.org Subject: kernel crash while loading snd_hda - _sx_xlock_hard: recursed on non-recursive sx Message-ID: <61b573980908070359h2b79d507t4661bea162378ab0@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
I am getting a kernel crash every time I try to load the snd_hda
module - backtrace in the attachment - this is on a current as of
August 6th, ~17pm. Making the newbus lock recursable fixed the issue
for me (patch attached) but I am not familiar with the newbus
subsystem & locking so I am not sure that this is the appropriate
solution.
cheers,
Shteryana
[-- Attachment #2 --]
#9 0xc087fce6 in panic (
fmt=0xc0c70429 "_sx_xlock_hard: recursed on non-recursive sx %s @ %s:%d\n")
at /usr/src/sys/kern/kern_shutdown.c:558
#10 0xc0887554 in _sx_xlock_hard (sx=0xc0dd4740, tid=3320844864, opts=0,
file=0xc0c724c0 "/usr/src/sys/kern/subr_bus.c", line=219)
at /usr/src/sys/kern/kern_sx.c:484
#11 0xc0887cb0 in _sx_xlock (sx=0xc0dd4740, opts=0,
file=0xc0c724c0 "/usr/src/sys/kern/subr_bus.c", line=219) at sx.h:155
#12 0xc08a752a in newbus_xlock () at /usr/src/sys/kern/subr_bus.c:219
#13 0xc63a0124 in hdac_attach2 (arg=0xc5ac6800)
---Type <return> to continue, or q <return> to quit---
at /usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:7438
#14 0xc63a89e5 in hdac_attach (dev=0xc5b07e80)
at /usr/src/sys/modules/sound/driver/hda/../../../../dev/sound/pci/hda/hdac.c:4193
#15 0xc08a8817 in device_attach (dev=0xc5b07e80) at device_if.h:178
#16 0xc08a954c in device_probe_and_attach (dev=0xc5b07e80)
at /usr/src/sys/kern/subr_bus.c:2602
#17 0xc070d9b5 in pci_driver_added (dev=0xc5b09380, driver=0xc63ad320)
at /usr/src/sys/dev/pci/pci.c:2839
#18 0xc08a6488 in devclass_driver_added (dc=0xc5955b00, driver=0xc63ad320)
at bus_if.h:183
#19 0xc08a8163 in driver_module_handler (mod=0xc5e8bb40, what=0,
arg=0xc63ad2f0) at /usr/src/sys/kern/subr_bus.c:1084
#20 0xc086f557 in module_register_init (arg=0xc63ad250)
at /usr/src/sys/kern/kern_module.c:124
#21 0xc0866d2a in linker_load_module (kldname=Variable "kldname" is not available.
)
at /usr/src/sys/kern/kern_linker.c:234
#22 0xc08671ea in kern_kldload (td=0xc5f01240, file=0xc5e0f800 "snd_hda",
fileid=0xe81e4c70) at /usr/src/sys/kern/kern_linker.c:1016
#23 0xc0867324 in kldload (td=0xc5f01240, uap=0xe81e4cf8)
at /usr/src/sys/kern/kern_linker.c:1044
[-- Attachment #3 --]
--- /usr/src/sys/kern/subr_bus.c 2009-08-07 12:05:40.000000000 +0300
+++ kern/subr_bus.c 2009-08-07 11:40:21.000000000 +0300
@@ -197,7 +197,7 @@
*/
static struct sx newbus_lock;
-#define NBL_LOCK_INIT() sx_init_flags(&newbus_lock, "newbus", SX_RECURSE)
+#define NBL_LOCK_INIT() sx_init(&newbus_lock, "newbus")
#define NBL_LOCK_DESTROY() sx_destroy(&newbus_lock)
#define NBL_XLOCK() sx_xlock(&newbus_lock)
#define NBL_SLOCK() sx_slock(&newbus_lock)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61b573980908070359h2b79d507t4661bea162378ab0>
