Subject: Re: FFS panic "locking against myself"
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: current-users
Date: 12/16/1998 23:54:53
On Wed, Dec 16, 1998 at 10:51:02AM +0100, Manuel Bouyer wrote:
> On Dec 16, Brian C. Grayson wrote
> > Is there still a known locking against self bug in the FFS
> > code? None of the open PRs appeared relevant/similar to my
> > panic.
>
> Did you try a fsck on our partitions ?
An fsck on the /usr/src partition never complains, even after
the panic and reboot -- no bad blk counts, etc. Only the root
filesystem has an fsck blip, and only one bad blk count, at
that, IIRC.
> Could you give more details about your disks (esp. disklabels) ?
Sure. The system has a single 4.3G Quantum IDE disk, with the
following disklabel (trimmed):
sectors/track: 63
tracks/cylinder: 15
sectors/cylinder: 945
cylinders: 8960
total sectors: 8467200
...
# size offset fstype [fsize bsize cpg]
a: 94500 378000 4.2BSD 1024 8192 16 # (Cyl. 400 - 499)
b: 378000 472500 swap # (Cyl. 500 - 899)
c: 5197500 378000 unused 0 0 # (Cyl. 400 - 5899)
d: 8467200 0 unused 0 0 # (Cyl. 0 - 8959)
e: 945000 850500 4.2BSD 1024 8192 16 # (Cyl. 900 - 1899)
f: 3780000 1795500 4.2BSD 1024 8192 16 # (Cyl. 1900 - 5899)
g: 967680 5575500 4.2BSD 1024 8192 16 # (Cyl. 5900 - 6923)
h: 377937 63 MSDOS # (Cyl. 0*- 399*)
/usr/src is a symlink to /home/src, and /home/src is partition wd0f.
All filesystems are ffs (except the unmounted msdos).
> > Also, I created a debugging kernel, but when I enter
> > gdb on the core dump using netbsd.gdb, the `where' command
> > doesn't work -- it only says 0x0 (??). Is there some tricky
> > thing I'm missing?
>
> Maybe 'proc _curproc' ?
Didn't help:
# gdb netbsd.gdb
...
(gdb) target kcore netbsd.5.core
panic: lockmgr: locking against myself
#0 0x0 in ?? ()
(gdb) proc _curproc
No symbol "_curproc" in current context.
(gdb) proc curproc
can not access 0x0, invalid translation (invalid PDE)
can not access 0x0, invalid translation (invalid PDE)
cannot read pcb at 0
Here's a bit more of a backtrace, if it helps:
_panic(f011c8c9,20002,f22f56b4,30002,d6) at _panic+0x55
_lockmgr(f22f7230,30002,f22f5740,f2495dcc,f0145143) at _lockmgr+0x2af
_ufs_lock(f2495dc0) at _ufs_lock+0x22
_vn_lock(f22f56b4,20002,f22f56b4,f2495ebc,f026c4d0) at _vn_lock+0x3f
_lookup(f2495e98) at _lookup+0x72
_namei(f2495e98) at _namei+0x176
_sys___lstat13(f2471d40,f2495f88,f2495f80,0,163800) at +0x45
_syscall() at syscall+0x1fa
_syscall 280
0x4007afab
dmesg output from the kernel, with DEBUG enabled:
NetBSD 1.3I (K9.new.ide) #1: Mon Dec 14 23:00:45 CST 1998
bgrayson@marvin:/usr/src/sys/arch/i386/compile/K9.new.ide
cpu0: family 5 model 2 step 2
cpu0: Intel Pentium (P54C) (586-class)
real mem = 33161216
avail mem = 28569600
using 430 buffers containing 1761280 bytes of memory
mainbus0 (root)
pci_mode_detect: mode 1 enable failed (0)
pci0 at mainbus0 bus 0: configuration mode 2
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82434LX/NX PCI, Cache and Memory Controller (PCMC) (rev. 0x11)
pciide0 at pci0 dev 1 function 0: PC Technology RZ1000 (rev. 0x01)
pciide0: pciide0: hardware does not support DMA
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <QUANTUM BIGFOOT_CY4320A>
wd0: drive supports 32-sector pio transfers, lba addressing
wd0: 4134MB, 8960 cyl, 15 head, 63 sec, 512 bytes/sect x 8467200 sectors
wd0: drive supports PIO mode 4, DMA mode 2
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (not responding; disabled or no drives?)
pcib0 at pci0 dev 2 function 0
pcib0: Intel 82378ZB System I/O (SIO) (rev. 0x03)
S3 Trio64V2/DX (VGA display, revision 0x14) at pci0 dev 14 function 0 not configured
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
com2 at isa0 port 0x3e8-0x3ef irq 9: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
lptprobe: mask ff data 55 failed
lptprobe: mask ff data 55 failed
wt0 at isa0 port 0x300-0x303 irq 5 drq 1: type <Archive>
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
WARNING: Pentium FDIV bug detected!
vt0 at isa0 port 0x60-0x6f irq 1
vt0: unknown s3, 80 col, color, 8 scr, mf2-kbd, [R3.32]
vt0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: read port 0x203
ne0 at isapnp0 port 0x280/32 mem 0xc0000/16384 irq 10
ne0: NE2000 Ethernet
ne0: Ethernet address 00:20:18:71:b8:31
biomask 4060 netmask 4460 ttymask 44e2
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying nfs...
mountroot: trying ext2fs...
mountroot: trying ffs...
root file system type: ffs
init: copying out path `/sbin/init' 11
IP Filter: initialized. Default = pass all, Logging = enabled
Thanks. I'll try to not 'fix' this, in case anyone wants me
to try out anything. I'm building a new kernel now that calls
lockmgr_printinfo() right before the panic, in case that helps.
Brian