kern/114216: aio when using dt panic: lock "aiomtx" 0xc473f1f0 already initialized

Kirk Russell kirk at
Sat Aug 11 12:20:06 PDT 2007

The following reply was made to PR kern/114216; it has been noted by GNATS.

From: Kirk Russell <kirk at>
To: bug-followup at
Subject: Re: kern/114216: aio when using dt panic: lock "aiomtx" 0xc473f1f0
 already initialized
Date: Sat, 11 Aug 2007 14:21:48 -0400 (EDT)

 I can reproduce the panic, with 7.0-CURRENT-200706, in less then one minute
 by running that "dt" script a couple of times.  I have added the backtrace of
 the aio kernel module, after I RTFM.  This is with 7.0-CURRENT-200706.  This
 does not include Kostik Belousov's patch.
 amd# kldstat
 Id Refs Address    Size     Name
  1    4 0xc0400000 8930c8   kernel
  2    1 0xc0c94000 69c8c    acpi.ko
  3    1 0xc4809000 9000     aio.ko
 amd# objdump --section-headers /boot/kernel/aio.ko | grep text
   4 .text         000045ca  00002ef0  00002ef0  00002ef0  2**4
 amd# kgdb kernel.debug vmcore.18
 [GDB will not be able to debug user-mode threads: /usr/lib/ Undefined symbol "ps_pglobal_lookup"]
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 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-marcel-freebsd".
 Unread portion of the kernel message buffer:
 panic: lock "aiomtx" 0xc481a174 already initialized
 cpuid = 0
 KDB: enter: panic
 Uptime: 14m27s
 Physical memory: 1139 MB
 Dumping 52 MB: 37 21 5
 #0  doadump () at pcpu.h:172
 172     pcpu.h: No such file or directory.
         in pcpu.h
 (kgdb) add-symbol-file /boot/kernel/aio.ko 0xC480BEF0
 add symbol table from file "/boot/kernel/aio.ko" at
         .text_addr = 0xc480bef0
 (y or n) y
 Reading symbols from /boot/kernel/aio.ko...Reading symbols from /boot/kernel/aio.ko.symbols...done.
 (kgdb) bt
 #0  doadump () at pcpu.h:172
 #1  0xc073ab4e in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409
 #2  0xc073ae53 in panic (fmt=Variable "fmt" is not available.
 ) at /usr/src/sys/kern/kern_shutdown.c:563
 #3  0xc0761334 in lock_init (lock=0x0, class=0xc0acab44,
     name=0xc48106e7 "aiomtx", type=0x0, flags=131072)
     at /usr/src/sys/kern/subr_lock.c:201
 #4  0xc072f7f4 in mtx_init (m=0xc481a174, name=0xc48106e7 "aiomtx", type=0x0,
     opts=0) at /usr/src/sys/kern/kern_mutex.c:714
 #5  0xc480df2e in aio_init_aioinfo (p=0xc47a5970)
     at /usr/src/sys/modules/aio/../../kern/vfs_aio.c:507
 #6  0xc480e37c in aio_aqueue (td=0xc477fa00, job=0x28202800, lj=0x0, type=1,
     oldsigev=0) at /usr/src/sys/modules/aio/../../kern/vfs_aio.c:1341
 #7  0xc480f7f2 in aio_write (td=0xc477fa00, uap=0xec9cacfc)
     at /usr/src/sys/modules/aio/../../kern/vfs_aio.c:1942
 #8  0xc0988848 in syscall (frame=0xec9cad38)
     at /usr/src/sys/i386/i386/trap.c:1013
 #9  0xc096eb80 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196
 #10 0x00000033 in ?? ()
 Previous frame inner to this frame (corrupt stack?)

More information about the freebsd-bugs mailing list