kern/139847: [geom_mbr] load/unload causes system to hang
Gavin Atkinson
gavin at FreeBSD.org
Sat Oct 31 15:30:05 UTC 2009
The following reply was made to PR kern/139847; it has been noted by GNATS.
From: Gavin Atkinson <gavin at FreeBSD.org>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/139847: [geom_mbr] load/unload causes system to hang
Date: Sat, 31 Oct 2009 15:28:11 +0000 (GMT)
I can (accidentally) confirm that this bug exists. :-(
FreeBSD rho.york.ac.uk 9.0-CURRENT FreeBSD 9.0-CURRENT #5: Mon Oct 19
20:34:46 BST 2009 root at rho.york.ac.uk:/usr/obj/usr/src/sys/RHO i386
"kldunload geom_mbr" hangs, with the backtrace below. It hangs while
holding the GEOM topology lock and the kernel linker lock, which is
presumably the cause of the hang reported by the original submitter (which
I haven't witnessed yet but expect to soon...)
KDB: enter: manual escape to debugger
[thread pid 12 tid 100024 ]
Stopped at kdb_enter+0x3a: movl $0,kdb_why
db> tr 54907
Tracing pid 54907 tid 100193 td 0xc5666690
sched_switch(c5666690,0,104,191,7439752a,...) at sched_switch+0x418
mi_switch(104,0,c0cb4ff6,1d6,4c,...) at mi_switch+0x200
sleepq_switch(c5666690,0,c0cb4ff6,26e,0,...) at sleepq_switch+0x15f
sleepq_timedwait(cac08280,4c,c0ca78f4,0,0,...) at sleepq_timedwait+0x6b
_sleep(cac08280,0,4c,c0ca78f4,3e8,...) at _sleep+0x339
g_waitfor_event(c08413f0,c5105090,2,0,ca656980,...) at g_waitfor_event+0x9c
g_modevent(ca656980,1,cb8a6440,109,0,...) at g_modevent+0x14f
module_unload(ca656980,c0cad345,274,271,c0884be6,...) at module_unload+0x43
linker_file_unload(c62b4000,0,c0cad345,42c,cb8a3000,...) at linker_file_unload+0x15e
kern_kldunload(c5666690,a,0,e79dcd2c,c0be0953,...) at kern_kldunload+0xd5
kldunloadf(c5666690,e79dccf8,8,c0cb7d91,c0d9f210,...) at kldunloadf+0x2b
syscall(e79dcd38) at syscall+0x2d3
Xint0x80_syscall() at Xint0x80_syscall+0x20
--- syscall (444, FreeBSD ELF32, kldunloadf), eip = 0x280d62fb, esp =
0xbfbfe48c, ebp = 0xbfbfecd8 ---
db>
db> sh alllocks
Process 58972 (procstat) thread 0xc53ee8c0 (100089)
shared sx sysctl lock (sysctl lock) r = 0 (0xc0e25844) locked @
/usr/src/sys/kern/kern_sysctl.c:1521
Process 54907 (kldunload) thread 0xc5666690 (100193)
exclusive sx kernel linker (kernel linker) r = 0 (0xc0e23f98) locked @
/usr/src/sys/kern/kern_linker.c:1068
Process 2 (g_event) thread 0xc4e07000 (100011)
exclusive sx GEOM topology (GEOM topology) r = 0 (0xc0e23508) locked @
/usr/src/sys/geom/geom_event.c:185
Process 12 (intr) thread 0xc4e07d20 (100024)
exclusive sleep mutex Giant (Giant) r = 1 (0xc0e25130) locked @
/usr/src/sys/dev/usb/usb_transfer.c:2954
db>
(Giant held by USB due to escaping to debugger via USB keyboard. The
sysctl lock is held because I ran "procstat -kk" on the kldunload process,
which also wedged waiting for the kernel linker lock.)
Gavin
More information about the freebsd-geom
mailing list