From owner-freebsd-stable Fri Apr 26 11:51:32 1996 Return-Path: owner-stable Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA25322 for stable-outgoing; Fri, 26 Apr 1996 11:51:32 -0700 (PDT) Received: from ki.net (root@ki.net [205.150.102.1]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id LAA25316 for ; Fri, 26 Apr 1996 11:51:28 -0700 (PDT) Received: from freebsd.ki.net (root@freebsd.ki.net [205.150.102.51]) by ki.net (8.7.4/8.7.4) with ESMTP id OAA11798 for ; Fri, 26 Apr 1996 14:51:25 -0400 (EDT) Received: from localhost (scrappy@localhost) by freebsd.ki.net (8.7.5/8.7.5) with SMTP id OAA11020 for ; Fri, 26 Apr 1996 14:51:43 -0400 (EDT) X-Authentication-Warning: freebsd.ki.net: scrappy owned process doing -bs Date: Fri, 26 Apr 1996 14:51:39 -0400 (EDT) From: "Marc G. Fournier" To: stable@freebsd.org Subject: bad dir panic Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi... On a different machine then the usual panics, I yesterday totally blew up the machine, and am wondering if this is a hardware issue (like the other machine), or possibly a software one. The machine is a DX33 w/ 8Meg of RAM, and I tried to do a make world to bring it up to date with stable. Before the panic, I got: free inode /usr/obj/29376 had 2013265776 blocks flash on the screen, and then several minutes later it panic'd with: /usr: bad dir ino 11725 at offset 12: mangled entry panic: bad dir Stopped at +0x2b: movb $0,_in_Debugger.110 If you get this far and feel its a hardware problem, then don't read any further (but do send me a quick email telling me so?), as its just more details from what I could dig out of a core dump and a DDB trace...the corruption that this caused was so extensive that I had to effectively rebuild my /etc directory... Trace showed: () at +0x2b _panic+0x3b _ufs_dirbad+0x37 _ufs_lookup+0x4f5 _lookup+0x2c5 _namei+0xfd _vn_open+0x183 _open+0x97 _syscall+0xf3 _Xsyscall+0x2b --- syscall 5, eip = 0x8070d15, ebp = 0xefbfcb68 Dmesg of the system: FreeBSD 2.1-STABLE #0: Fri Apr 26 00:14:42 EDT 1996 scrappy@ki.net:/usr/src/sys/compile/thrawn CPU: i486DX (486-class CPU) real memory = 8388608 (8192K bytes) avail memory = 6717440 (6560K bytes) Probing for devices on the ISA bus: sc0 at 0x60-0x6f irq 1 on motherboard sc0: VGA color <16 virtual consoles, flags=0x0> aic0 at 0x340-0x35f irq 11 on isa aic0 waiting for scsi devices to settle (aic0:0:0): "CONNER CFA540S 13B0" type 0 fixed SCSI 2 sd0(aic0:0:0): Direct-Access 515MB (1056708 512 byte sectors) fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: NEC 765 fd0: 1.44MB 3.5in 1 3C5x9 board(s) on ISA found at 0x300 ep0 at 0x300-0x30f irq 10 on isa ep0: aui/bnc[*BNC*] address 00:a0:24:0a:5a:fenpx0 on motherboard npx0: INT 16 interface Bits of a gdb of the core dump follow: panic: bad dir #0 boot (howto=260) at ../../i386/i386/machdep.c:911 911 dumppcb.pcb_ptd = rcr3(); (kgdb) where #0 boot (howto=260) at ../../i386/i386/machdep.c:911 #1 0xf0111225 in panic (fmt=0xf0101258 "from debugger") at ../../kern/subr_prf.c:116 #2 0xf0101275 in db_panic (dummy1=-266858973, dummy2=0, dummy3=-1, dummy4=0xefbffb40 "") at ../../ddb/db_command.c:397 #3 0xf010115e in db_command (last_cmdp=0xf01a0af4, cmd_table=0xf01a0954) at ../../ddb/db_command.c:281 #4 0xf01012dd in db_command_loop () at ../../ddb/db_command.c:419 #5 0xf0103c78 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:72 #6 0xf0180bfa in kdb_trap (type=3, code=0, regs=0xefbffc30) at ../../i386/i386/db_interface.c:120 #7 0xf01883b0 in trap (frame={tf_es = 16, tf_ds = -262602736, tf_edi = -262542592, tf_esi = 8191, tf_ebp = -272630668, tf_isp = -272630696, tf_ebx = 256, tf_edx = -266859019, tf_ecx = 2000, tf_eax = -1, tf_trapno = 3, tf_err = 0, tf_eip = -266858973, tf_cs = -272695288, tf_eflags = 582, tf_esp = -266859035, tf_ss = -267316773}) at ../../i386/i386/trap.c:388 #8 0xf0181461 in calltrap () #9 0xf011121f in panic (fmt=0xf016b82d "bad dir") at ../../kern/subr_prf.c:114 #10 0xf016b86f in ufs_dirbad (ip=0xf059eb00, offset=12, how=0xf016ab80 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:590 #11 0xf016b095 in ufs_lookup (ap=0xefbffd88) at ../../ufs/ufs/ufs_lookup.c:285 #12 0xf0125f1d in lookup (ndp=0xefbffefc) at ./vnode_if.h:27 #13 0xf0125a6d in namei (ndp=0xefbffefc) at ../../kern/vfs_lookup.c:147 #14 0xf012b323 in vn_open (ndp=0xefbffefc, fmode=5, cmode=1445) at ../../kern/vfs_vnops.c:113 #15 0xf0128a9f in open (p=0xf0591200, uap=0xefbfff94, retval=0xefbfff8c) at ../../kern/vfs_syscalls.c:646 #16 0xf0188dbb in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 87960, tf_esi = -272640916, tf_ebp = -272643224, tf_isp = -272629788, tf_ebx = 134766688, tf_edx = 0, tf_ecx = 46, tf_eax = 5, tf_trapno = 534, tf_err = 534, tf_eip = 134679829, tf_cs = 31, tf_eflags = 534, tf_esp = -272643348, tf_ss = 39}) at ../../i386/i386/trap.c:906 #17 0xf01814ab in Xsyscall () #18 0x534b in ?? () #19 0xcb14 in ?? () #20 0x94ea in ?? () #21 0x10d3 in ?? () (kgdb) up 10 #10 0xf016b86f in ufs_dirbad (ip=0xf059eb00, offset=12, how=0xf016ab80 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:590 590 panic("bad dir"); (kgdb) list 585 586 mp = ITOV(ip)->v_mount; 587 (void)printf("%s: bad dir ino %ld at offset %ld: %s\n", 588 mp->mnt_stat.f_mntonname, ip->i_number, offset, how); 589 if ((mp->mnt_stat.f_flags & MNT_RDONLY) == 0) 590 panic("bad dir"); 591 } 592 593 /* 594 * Do consistency checking on a directory entry: (kgdb) print mp->mnt_stat.f_flags $1 = 4096 (kgdb) up #11 0xf016b095 in ufs_lookup (ap=0xefbffd88) at ../../ufs/ufs/ufs_lookup.c:285 285 ufs_dirbad(dp, dp->i_offset, "mangled entry"); (kgdb) list 280 ep = (struct direct *)((char *)bp->b_data + entryoffsetinblock); 281 if (ep->d_reclen == 0 || 282 (dirchk && ufs_dirbadentry(vdp, ep, entryoffsetinblock))) { 283 int i; 284 285 ufs_dirbad(dp, dp->i_offset, "mangled entry"); 286 i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)); 287 dp->i_offset += i; 288 entryoffsetinblock += i; 289 continue; (kgdb) quit ki# Marc G. Fournier scrappy@ki.net Systems Administrator @ ki.net scrappy@freebsd.org