panic: ufs_dirbad: bad dir (5.2.1-p5)

Simon Barner barner at in.tum.de
Wed May 5 07:33:33 PDT 2004


Hi,

I got a panic (backtrace attached) when I started my workstation today.

It seems that this is related to a problem I had ~ 2 weeks ago when my
/usr partition wasn't mounted: In that case, the /usr mount point somehow
got corrupted (``file /usr/'' said something about a bad file descriptor).

In both cases, rebooting and fsck'ing (without any error reports) solved
the problem.

Is it possible that this problem is hardware related? My hard disk is less
that half a year old, but the rest of the system is quite old (but rock
stable apart from that problem during the boot).

Any hints are glady appreciated...

Regards,
 Simon
-------------- next part --------------
Script started on Wed May  5 15:57:55 2004
zi025:/var/crash # ggdb -k /boot/kernel/kernel.debug 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-unknown-freebsd"...
panic: ufs_dirbad: bad dir
panic messages:
---
panic: ufs_dirbad: bad dir

syncing disks, buffers remaining... 340 340 316 316 316 316 316 316 316 314 314 314 314 314 314 315 315 315 315 315 315 315 315 315 315 315 315 315 315 
giving up on 283 buffers
Uptime: 50s
Dumping 192 MB
 16 32 48 64 80 96 112 128 144 160 176
---
Reading symbols from /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modules/fdescfs/fdescfs.ko.debug...done.
Loaded symbols for /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modules/fdescfs/fdescfs.ko.debug
Reading symbols from /boot/kernel/ipl.ko...done.
Loaded symbols for /boot/kernel/ipl.ko
#0  doadump () at ../../../kern/kern_shutdown.c:240
240		dumping++;
(kgdb) bt
#0  doadump () at ../../../kern/kern_shutdown.c:240
#1  0xc04ed36f in boot (howto=256) at ../../../kern/kern_shutdown.c:372
#2  0xc04ed645 in panic () at ../../../kern/kern_shutdown.c:550
#3  0xc0599371 in ufs_dirbad (ip=0x0, offset=4728, 
    how=0xc062469e "mangled entry") at ../../../ufs/ufs/ufs_lookup.c:633
#4  0xc059897a in ufs_lookup (ap=0xcb4acb38)
    at ../../../ufs/ufs/ufs_lookup.c:296
#5  0xc059f5d3 in ufs_vnoperate (ap=0x0) at ../../../ufs/ufs/ufs_vnops.c:2793
#6  0xc05304f5 in vfs_cache_lookup (ap=0x0) at vnode_if.h:82
#7  0xc059f5d3 in ufs_vnoperate (ap=0x0) at ../../../ufs/ufs/ufs_vnops.c:2793
#8  0xc0534df7 in lookup (ndp=0xcb4acc30) at vnode_if.h:52
#9  0xc0534899 in namei (ndp=0xcb4acc30) at ../../../kern/vfs_lookup.c:183
#10 0xc05409be in stat (td=0xc1134780, uap=0xcb4acd14)
    at ../../../kern/vfs_syscalls.c:1994
#11 0xc05eec8b in syscall (frame=
      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 135295656, tf_esi = 3, tf_ebp = -1077943544, tf_isp = -884290188, tf_ebx = 135295876, tf_edx = 135295876, tf_ecx = 135295885, tf_eax = 188, tf_trapno = 0, tf_err = 2, tf_eip = 134726031, tf_cs = 31, tf_eflags = 531, tf_esp = -1077943700, tf_ss = 47})
    at ../../../i386/i386/trap.c:1010
#12 0xc05e242d in Xint0x80_syscall () at {standard input}:136
---Can't read userspace from dump, or kernel process---

(kgdb) bt full
#0  doadump () at ../../../kern/kern_shutdown.c:240
No locals.
#1  0xc04ed36f in boot (howto=256) at ../../../kern/kern_shutdown.c:372
No locals.
#2  0xc04ed645 in panic () at ../../../kern/kern_shutdown.c:550
	td = (struct thread *) 0xc1134780
	bootopt = 256
	newpanic = 0
	ap = 0xcb4aca20 "x\002E?\b?J?z\211Y?4\b@?x\022"
	buf = "ufs_dirbad: bad dir", '\0' <repeats 236 times>
#3  0xc0599371 in ufs_dirbad (ip=0x0, offset=4728, 
    how=0xc062469e "mangled entry") at ../../../ufs/ufs/ufs_lookup.c:633
	mp = (struct mount *) 0xc2363400
#4  0xc059897a in ufs_lookup (ap=0xcb4acb38)
    at ../../../ufs/ufs/ufs_lookup.c:296
	i = 0
	vdp = (struct vnode *) 0xc23fdb2c
	dp = (struct inode *) 0xc2400834
	bp = (struct buf *) 0xc5fb5108
	ep = (struct direct *) 0xc6450278
	entryoffsetinblock = 4728
	slotstatus = FOUND
	slotoffset = -1
	slotsize = 0
---Type <return> to continue, or q <return> to quit---
	slotfreespace = 0
	slotneeded = 0
	numdirpasses = 2
	endsearch = 7168
	prevoff = 4712
	pdp = (struct vnode *) 0x1c00
	tdp = (struct vnode *) 0x1000040
	enduseful = 4728
	bmask = 16383
	lockparent = 0
	wantparent = 0
	namlen = 0
	error = -968555912
	vpp = (struct vnode **) 0xcb4acc44
	cnp = (struct componentname *) 0xcb4acc58
	cred = (struct ucred *) 0xc1129e00
	flags = 49348
	nameiop = 0
	td = (struct thread *) 0xc1134780
#5  0xc059f5d3 in ufs_vnoperate (ap=0x0) at ../../../ufs/ufs/ufs_vnops.c:2793
No locals.
#6  0xc05304f5 in vfs_cache_lookup (ap=0x0) at vnode_if.h:82
	dvp = (struct vnode *) 0xc23fdb2c
	vp = (struct vnode *) 0xc06727a0
---Type <return> to continue, or q <return> to quit---
	lockparent = 0
	error = -1036002516
	vpp = (struct vnode **) 0xcb4acc44
	cnp = (struct componentname *) 0xcb4acc58
	cred = (struct ucred *) 0x0
	flags = 49348
	td = (struct thread *) 0xc1134780
	vpid = 3410676560
#7  0xc059f5d3 in ufs_vnoperate (ap=0x0) at ../../../ufs/ufs/ufs_vnops.c:2793
No locals.
#8  0xc0534df7 in lookup (ndp=0xcb4acc30) at vnode_if.h:52
	cp = 0xc238600d ""
	dp = (struct vnode *) 0xc23fdb2c
	tdp = (struct vnode *) 0xc23c2c30
	mp = (struct mount *) 0xc238600d
	docache = 32
	wantparent = 0
	rdonly = 0
	trailing_slash = 0
	error = 0
	dpunlocked = 0
	cnp = (struct componentname *) 0xcb4acc58
	td = (struct thread *) 0xc1134780
#9  0xc0534899 in namei (ndp=0xcb4acc30) at ../../../kern/vfs_lookup.c:183
---Type <return> to continue, or q <return> to quit---
	fdp = (struct filedesc *) 0xc239b400
	cp = 0xcb4acbe4 "\b?J?\006?S?\f?B??&g?\f?B?\200G\023?\001"
	dp = (struct vnode *) 0xc237fe38
	aiov = {iov_base = 0xc242e30c, iov_len = 3410676744}
	auio = {uio_iov = 0xc1134780, uio_iovcnt = 1, 
  uio_offset = -4534201784750571520, uio_resid = -884290324, 
  uio_segflg = 3226733048, uio_rw = 3259163404, uio_td = 0x0}
	error = -1036517832
	linklen = -1036517832
	cnp = (struct componentname *) 0xcb4acc58
	td = (struct thread *) 0xc1134780
	p = (struct proc *) 0x0
#10 0xc05409be in stat (td=0xc1134780, uap=0xcb4acd14)
    at ../../../kern/vfs_syscalls.c:1994
	sb = {st_dev = 3239266176, st_ino = 3239259392, st_mode = 45960, 
  st_nlink = 49718, st_uid = 3239246592, st_gid = 3258364980, 
  st_rdev = 3258364808, st_atimespec = {tv_sec = -884290388, 
    tv_nsec = -1068500418}, st_mtimespec = {tv_sec = -1066928480, 
    tv_nsec = -1055720704}, st_ctimespec = {tv_sec = -1055701120, 
    tv_nsec = -884290372}, st_size = 11816349089, 
  st_blocks = -4534201781524104832, st_blksize = 3239238464, 
  st_flags = 71762397, st_gen = 3410677008, st_lspare = -1068546804, 
  st_birthtimespec = {tv_sec = -1055701120, tv_nsec = -118768102}}
	error = -1036602488
---Type <return> to continue, or q <return> to quit---
	nd = {ni_dirp = 0x8107384---Can't read userspace from dump, or kernel process---

(kgdb) zi025:/var/crash # 

Script done on Wed May  5 15:58:23 2004
-------------- next part --------------
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 5.2.1-RELEASE-p5 #0: Sat Apr 17 12:06:11 CEST 2004
    toor at zi025.glhnet.mhn.de:/usr/src/sys/i386/compile/KISTE
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0724000.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD-K6(tm) 3D+ Processor (400.91-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x591  Stepping = 1
  Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
  AMD Features=0x80000800<SYSCALL,3DNow!>
real memory  = 201326592 (192 MB)
avail memory = 190103552 (181 MB)
netsmb_dev: loaded
K6-family MTRR support enabled (2 registers)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcibios: BIOS version 2.10
Using $PIR table, 5 entries at 0xc00fdde0
pcib0: <VIA 82C598MVP (Apollo MVP3) host bridge> at pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
pci_cfgintr: 0:17 INTA BIOS irq 9
pci_cfgintr: 0:18 INTA BIOS irq 3
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C586B UDMA33 controller> port 0xe000-0xe00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata0: [MPSAFE]
ata1: at 0x170 irq 15 on atapci0
ata1: [MPSAFE]
xl0: <3Com 3c905-TX Fast Etherlink XL> port 0xe800-0xe83f irq 9 at device 17.0 on pci0
xl0: Ethernet address: 00:60:08:4a:00:e5
miibus0: <MII bus> on xl0
nsphy0: <DP83840 10/100 media interface> on miibus0
nsphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci0: <display, VGA> at device 18.0 (no driver attached)
orm0: <Option ROM> at iomem 0xc0000-0xc87ff on isa0
pmtimer0 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/15 bytes threshold
ppbus0: <Parallel port bus> on ppc0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sbc0: <ESS ES1868> at port 0x330-0x331,0x388-0x38b,0x220-0x22f irq 5 drq 0,1 on isa0
pcm0: <ESS 18xx DSP> on sbc0
ata2: <Generic ESDI/IDE/ATA controller> at port 0x36e-0x36f,0x168-0x16f irq 10 on isa0
ata2: [MPSAFE]
unknown: <PNP0303> can't assign resources (port)
unknown: <PNP0f13> can't assign resources (irq)
unknown: <PNP0700> can't assign resources (port)
unknown: <PNP0401> can't assign resources (port)
Timecounter "TSC" frequency 400911125 Hz quality 800
Timecounters tick every 10.000 msec
IP Filter: v3.4.31 initialized.  Default = block all, Logging = enabled
GEOM: create disk ad0 dp=0xc2356e60
ad0: 9787MB <WDC WD102AA> [19885/16/63] at ata0-master UDMA33
acd0: CDRW <HL-DT-ST RW/DVD GCC-4120B> at ata1-master PIO4
GEOM: create disk ad3 dp=0xc2356c60
ad3: 117246MB <Maxtor 6Y120L0> [238216/16/63] at ata1-slave UDMA33
GEOM: create disk cd0 dp=0xc22e7e00
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST RW/DVD GCC-4120B 2.02> Removable CD-ROM SCSI-0 device 
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Mounting root from ufs:/dev/ad0s2a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040505/ef90738c/attachment.bin


More information about the freebsd-current mailing list