Locking problem with snapshots...

From: Sean Chittenden <seanc_at_FreeBSD.org>
Date: Sat, 22 Nov 2003 04:07:28 -0800
I had some transient panic today that resulted in a hard panic that I
had to pull the plug on to reboot... once up again and the background
file system check was running, I picked up this dandy of a panic:

panic: lockmgr: locking against myself
panic messages:
---
panic: lockmgr: locking against myself

syncing disks, buffers remaining... panic: bremfree: removing a buffer not on a queue
Uptime: 4m51s
Dumping 255 MB
[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort]  16[CTRL-C to abort] [CTRL-C to abort]  32 48 64 80 96 112 128 144 160 176 192 208 224 240
---
Reading symbols from /boot/kernel/snd_maestro3.ko...done.
Loaded symbols for /boot/kernel/snd_maestro3.ko
Reading symbols from /boot/kernel/snd_pcm.ko...done.
Loaded symbols for /boot/kernel/snd_pcm.ko
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
240             dumping++;
(kgdb) bt
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
#1  0xc0533229 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:372
#2  0xc0533608 in panic () at /usr/src/sys/kern/kern_shutdown.c:550
#3  0xc057dfd1 in bremfreel (bp=0xd087f438) at /usr/src/sys/kern/vfs_bio.c:649
#4  0xc057dedb in bremfree (bp=0x0) at /usr/src/sys/kern/vfs_bio.c:631
#5  0xc0582831 in getblk (vp=0xcbdae924, blkno=-1509388, size=16384,
    slpflag=0, slptimeo=0, flags=0) at /usr/src/sys/kern/vfs_bio.c:2470
#6  0xc057e0a2 in breadn (vp=0xcbdae924, blkno=0, size=0, rablkno=0x0,
    rabsize=0x0, cnt=0, cred=0x0, bpp=0x0) at /usr/src/sys/kern/vfs_bio.c:702
#7  0xc057e04c in bread (vp=0x0, blkno=0, size=0, cred=0x0, bpp=0x0)
    at /usr/src/sys/kern/vfs_bio.c:684
#8  0xc06804c3 in ffs_balloc_ufs2 (vp=0xcbdae924, startoffset=0, size=16384,
    cred=0xc16b3f00, flags=131072, bpp=0xd6756a40)
    at /usr/src/sys/ufs/ffs/ffs_balloc.c:706
#9  0xc06892ce in ffs_copyonwrite (devvp=0xcb8f4924, bp=0xd081e5e8)
    at /usr/src/sys/ufs/ffs/ffs_snapshot.c:1992
#10 0xc04efdc2 in spec_xstrategy (vp=0xcb8f4924, bp=0xd081e5e8)
    at /usr/src/sys/fs/specfs/spec_vnops.c:474
#11 0xc04efebb in spec_specstrategy (ap=0x0)
    at /usr/src/sys/fs/specfs/spec_vnops.c:534
#12 0xc04eefd8 in spec_vnoperate (ap=0x0)
    at /usr/src/sys/fs/specfs/spec_vnops.c:122
#13 0xc06a681c in ufs_strategy (ap=0x0) at vnode_if.h:1141
#14 0xc06a7718 in ufs_vnoperate (ap=0x0)
    at /usr/src/sys/ufs/ufs/ufs_vnops.c:2793
#15 0xc057e8dd in bwrite (bp=0xd081e5e8) at vnode_if.h:1116
#16 0xc057f34c in bawrite (bp=0x0) at /usr/src/sys/kern/vfs_bio.c:1152
#17 0xc0696c7f in ffs_fsync (ap=0xd6756c24)
    at /usr/src/sys/ufs/ffs/ffs_vnops.c:247
#18 0xc0695d49 in ffs_sync (mp=0xcb7e7400, waitfor=3, cred=0xc16b3f00,
    td=0xc16cb780) at vnode_if.h:627
#19 0xc059709a in sync_fsync (ap=0xd6756cc4)
    at /usr/src/sys/kern/vfs_subr.c:3515
#20 0xc0593052 in sched_sync () at vnode_if.h:627
#21 0xc051bf00 in fork_exit (callout=0xc0592d60 <sched_sync>, arg=0x0,
    frame=0x0) at /usr/src/sys/kern/kern_fork.c:793

This looks like it's up Kirk's alley, but I figured I'd send it here
in case someone else has some info on this.  I've still got the vmcore
if anyone wants to take a crack at it.

FWIW, as some back story, I was compiling gdb6-release, the machine
panic'ed the 1st time.  Once back up, not more than 90sec after the
machine was up, I kicked off the build of GDB again and am pretty sure
that's what 'caused this.  -sc

-- 
Sean Chittenden
Received on Sat Nov 22 2003 - 03:08:15 UTC

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