panic: Lock GEOM topology not exclusively locked

From: Gavin Atkinson <gavin.atkinson_at_ury.york.ac.uk>
Date: Wed, 28 Apr 2004 15:42:11 +0100 (BST)
Hi,

Attempting to "mount /cdrom" on one of those extended audio CDs which come
with the video etc doesn't seem to be the best way to keep a system
running... Code is top-of-tree. I have a dump and am happy to dig further
into it.

acd0: WARNING - REQUEST_SENSE read data overrun 18>0
acd0: WARNING - REQUEST_SENSE read data overrun 18>0
acd0: WARNING - REQUEST_SENSE read data overrun 18>0
acd0: WARNING - REQUEST_SENSE read data overrun 18>0
acd0: WARNING - REQUEST_SENSE read data overrun 18>0
acd0: WARNING - REQUEST_SENSE read data overrun 18>0
panic: Lock GEOM topology not exclusively locked _at_ /usr/src/sys/geom/geom_subr.c:380

at line 346 in file /usr/src/sys/kern/kern_sx.c
cpuid = 0;
Debugger("panic")
Stopped at      Debugger+0x46:  xchgl   %ebx,in_Debugger.0
db> tr
Debugger(c07c28d0) at Debugger+0x46
__panic(c07c2fc6,15a,c07c3060,c07be193,c07be4f4) at __panic+0x13d
_sx_assert(c087db40,4,c07be4f4,17c) at _sx_assert+0xa7
g_new_providerf(c2c5fd00,c079ac3f,0,2,4) at g_new_providerf+0x1f
acd_read_toc(c2bea000,de6a6ad0,c05def70,c088da40,246) at acd_read_toc+0x182
acd_geom_ioctl(c2c5fc80,40046304,de6a6c60,c2d02930,4) at acd_geom_ioctl+0x8a
g_dev_ioctl(c2c2dd00,40046304,de6a6c60,1,c2d02930) at g_dev_ioctl+0x18f
spec_ioctl(de6a6b88,de6a6c34,c063e157,de6a6b88,c0863800) at spec_ioctl+0xdf
spec_vnoperate(de6a6b88) at spec_vnoperate+0x13
vn_ioctl(c30df4c8,40046304,de6a6c60,c33ba280,c2d02930) at vn_ioctl+0x17f
ioctl(c2d02930,de6a6d14,3,0,292) at ioctl+0x37c
syscall(2f,2f,2f,bfbfecc0,4) at syscall+0x217
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (54, FreeBSD ELF32, ioctl), eip = 0x280c504b, esp =
0xbfbfe4cc, ebp = 0xbfbfe818 ---
db> sh locks
db> call doadump
Dumping 255 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
Dump complete
0xf

buffy# uname -a
FreeBSD buffy.york.ac.uk 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue Apr 27
22:24:37 BST 2004     root_at_buffy.york.ac.uk:/usr/obj/usr/src/sys/GENERIC
i386

buffy# gdb -k /usr/obj/usr/src/sys/GENERIC/kernel.debug /var/crash/vmcore.0
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
panic: Lock GEOM topology not exclusively locked _at_ /usr/src/sys/geom/geom_subr.c:380

panic messages:
---
panic: Lock GEOM topology not exclusively locked _at_ /usr/src/sys/geom/geom_subr.c:380

at line 346 in file /usr/src/sys/kern/kern_sx.c
cpuid = 0;
Debugger("panic")
Dumping 255 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
---
Reading symbols from /boot/kernel/snd_ich.ko...done.
Loaded symbols for /boot/kernel/snd_ich.ko
Reading symbols from /boot/kernel/snd_pcm.ko...done.
Loaded symbols for /boot/kernel/snd_pcm.ko
Reading symbols from /boot/kernel/radeon.ko...done.
Loaded symbols for /boot/kernel/radeon.ko
Reading symbols from /boot/kernel/acpi.ko...done.
Loaded symbols for /boot/kernel/acpi.ko
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:236
236             dumping++;
(kgdb) bt
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:236
#1  0xc045d0be in db_fncall (dummy1=0, dummy2=0, dummy3=-1064556352, dummy4=0xde6a6888 "hjp](\214F")
    at /usr/src/sys/ddb/db_command.c:551
#2  0xc045cec4 in db_command (last_cmdp=0xc0864fc0, cmd_table=0x0, aux_cmd_tablep=0xc07e6c24, aux_cmd_tablep_end=0xc07e6c3c)
    at /usr/src/sys/ddb/db_command.c:348
#3  0xc045cfa4 in db_command_loop () at /usr/src/sys/ddb/db_command.c:475
#4  0xc045f739 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_trap.c:73
#5  0xc0747759 in kdb_trap (type=3, code=0, regs=0xde6a69b4) at /usr/src/sys/i386/i386/db_interface.c:159
#6  0xc0759a4c in trap (frame=
      {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -1065602976, tf_esi = 1, tf_ebp = -563451400, tf_isp = -563451424, tf_ebx = 0, tf_edx = 0, tf_ecx = -1056882688, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1066108386, tf_cs = 8, tf_eflags = 658, tf_esp = -563451348, tf_ss = -563451368}) at /usr/src/sys/i386/i386/trap.c:579
#7  0xc0747a1e in Debugger (msg=0xc07c28d0 "panic") at machine/cpufunc.h:56
#8  0xc05e6b55 in __panic (file=0xc07c2fc6 "/usr/src/sys/kern/kern_sx.c", line=346,
    fmt=0xc07c3060 "Lock %s not exclusively locked _at_ %s:%d\n") at /usr/src/sys/kern/kern_shutdown.c:532
#9  0xc05ec653 in _sx_assert (sx=0xc087db40, what=0, file=0xc07be4f4 "/usr/src/sys/geom/geom_subr.c", line=380)
    at /usr/src/sys/kern/kern_sx.c:365
#10 0xc05bd4cb in g_new_providerf (gp=0xc2c5fd00, fmt=0xc079ac3f "acd%dt%02d") at /usr/src/sys/geom/geom_subr.c:380
#11 0xc04c6962 in acd_read_toc (cdp=0xc2bea000) at /usr/src/sys/dev/ata/atapi-cd.c:1260
#12 0xc04c56aa in acd_geom_ioctl (pp=0xc2c5fc80, cmd=1074029316, addr=0xde6a6c60, td=0xc2d02930) at /usr/src/sys/dev/ata/atapi-cd.c:563
#13 0xc05b9a3f in g_dev_ioctl (dev=0xc2c2dd00, cmd=0, data=0xde6a6c60 "", fflag=1, td=0xc2d02930) at /usr/src/sys/geom/geom_dev.c:333
#14 0xc05b7e0f in spec_ioctl (ap=0xde6a6b88) at /usr/src/sys/fs/specfs/spec_vnops.c:353
#15 0xc05b75f3 in spec_vnoperate (ap=0x0) at /usr/src/sys/fs/specfs/spec_vnops.c:118
#16 0xc063e157 in vn_ioctl (fp=0xc30df4c8, com=1074029316, data=0xde6a6c60, active_cred=0xc33ba280, td=0xc2d02930) at vnode_if.h:503
#17 0xc060ac48 in ioctl (td=0xc2d02930, uap=0xde6a6d14) at /usr/src/sys/sys/file.h:257
#18 0xc075a227 in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = -1077941056, tf_esi = 4, tf_ebp = -1077942248, tf_isp = -563450508, tf_ebx = -1077940705, tf_edx = -1077940696, tf_ecx = -1077940696, tf_eax = 54, tf_trapno = 12, tf_err = 2, tf_eip = 671895627, tf_cs = 31, tf_eflags = 658, tf_esp = -1077943092, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1004
#19 0x280c504b in ?? ()
---Can't read userspace from dump, or kernel process---

(kgdb) f 10
#10 0xc05bd4cb in g_new_providerf (gp=0xc2c5fd00, fmt=0xc079ac3f "acd%dt%02d") at /usr/src/sys/geom/geom_subr.c:380
380             g_topology_assert();
(kgdb) p gp
$1 = (struct g_geom *) 0xc2c5fd00
(kgdb) p *gp
$2 = {name = 0xc2c0c180 "acd0", class = 0xc07f67e0, geom = {le_next = 0x0, le_prev = 0xc07f6804}, consumer = {lh_first = 0x0}, provider = {
    lh_first = 0xc14e2b00}, geoms = {tqe_next = 0xc2c9f280, tqe_prev = 0xc08187ec}, rank = 1, start = 0xc04c619c <acd_geom_start>,  spoiled = 0, dumpconf = 0, access = 0xc04c53b8 <acd_geom_access>, orphan = 0, ioctl = 0xc04c5620 <acd_geom_ioctl>, softc = 0xc2bea000,  flags = 0}


I'll keep the dump for a while, if anyone wants me to dig deeper into it,
though from analysing the source I can't see whereabouts the topology lock
should be grabbed...

Gavin
Received on Wed Apr 28 2004 - 05:42:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC