From hsu@clinet.fi  Wed Feb 19 08:06:07 1997
Received: from hauki.clinet.fi (root@hauki.clinet.fi [194.100.0.1])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA29210
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 08:05:59 -0800 (PST)
Received: from news.clinet.fi (root@news.clinet.fi [194.100.0.3]) by hauki.clinet.fi (8.8.5/8.6.4) with ESMTP id SAA22215 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 18:05:48 +0200 (EET)
Received: (root@localhost) by news.clinet.fi (8.8.4/8.6.4) id SAA03914; Wed, 19 Feb 1997 18:05:57 +0200 (EET)
Message-Id: <199702191605.SAA03914@news.clinet.fi>
Date: Wed, 19 Feb 1997 18:05:57 +0200 (EET)
From: Heikki Suonsivu <hsu@clinet.fi>
Reply-To: hsu@clinet.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: panic: bad dir
X-Send-Pr-Version: 3.2

>Number:         2771
>Category:       kern
>Synopsis:       panic: bad dir
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 08:10:04 PST 1997
>Closed-Date:    Thu Aug 10 13:58:20 PDT 2000
>Last-Modified:  Thu Aug 10 13:59:51 PDT 2000
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 2.2-GAMMA i386
>Organization:
Clinet, Espoo, Finland
>Environment:

2.2, news server, 128M, 2940

>Description:

hsu#news.clinet.fi Wed 1: gdb -k kernel.4 vmcore.4
GDB is free software and you are welcome to 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.
GDB 4.13 (i386-unknown-freebsd), 
Copyright 1994 Free Software Foundation, Inc...
IdlePTD 271000
current pcb at 0x210c98
panic: bad dir
#0  boot (howto=256) at ../../kern/kern_shutdown.c:243
243                                     dumppcb.pcb_cr3 = rcr3();
(kgdb) bt
#0  boot (howto=256) at ../../kern/kern_shutdown.c:243
#1  0xf0112402 in panic (fmt=0xf01b37d1 "bad dir")
    at ../../kern/kern_shutdown.c:367
#2  0xf01b3813 in ufs_dirbad (ip=0xf494ab00, offset=49210, 
    how=0xf01b2b70 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:589
#3  0xf01b3071 in ufs_lookup (ap=0xefbffe5c) at ../../ufs/ufs/ufs_lookup.c:284
#4  0xf0130619 in lookup (ndp=0xefbfff0c) at vnode_if.h:31
#5  0xf013015b in namei (ndp=0xefbfff0c) at ../../kern/vfs_lookup.c:156
#6  0xf0133a2d in link (p=0xf48b5000, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/vfs_syscalls.c:894
#7  0xf01cfcef in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 1344640, 
      tf_esi = 1, tf_ebp = -272639824, tf_isp = -272629788, tf_ebx = 20082716, 
      tf_edx = 28, tf_ecx = -272641940, tf_eax = 9, tf_trapno = 7, tf_err = 7, 
      tf_eip = 134672897, tf_cs = 31, tf_eflags = 514, tf_esp = -272641840, 
      tf_ss = 39}) at ../../i386/i386/trap.c:892
#8  0x806f201 in ?? ()
#9  0xcfeb in ?? ()
#10 0xedc7 in ?? ()
#11 0xf477 in ?? ()
#12 0x99eb in ?? ()
#13 0xc592 in ?? ()
#14 0x1096 in ?? ()
(kgdb) up
#1  0xf0112402 in panic (fmt=0xf01b37d1 "bad dir")
    at ../../kern/kern_shutdown.c:367
367             boot(bootopt);
(kgdb) up
#2  0xf01b3813 in ufs_dirbad (ip=0xf494ab00, offset=49210, 
    how=0xf01b2b70 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:589
589                     panic("bad dir");
(kgdb) list
584
585             mp = ITOV(ip)->v_mount;
586             (void)printf("%s: bad dir ino %ld at offset %ld: %s\n",
587                 mp->mnt_stat.f_mntonname, ip->i_number, offset, how);
588             if ((mp->mnt_stat.f_flags & MNT_RDONLY) == 0)
589                     panic("bad dir");
590     }
591
592     /*
593      * Do consistency checking on a directory entry:
(kgdb) print mp
$1 = (struct mount *) 0xf48d8200
(kgdb) print *mp
$2 = {mnt_list = {cqe_next = 0xf48db400, cqe_prev = 0xf48d5000}, 
  mnt_op = 0xf02095c0, mnt_vfc = 0xf02095ec, mnt_vnodecovered = 0xf48c8f80, 
  mnt_vnodelist = {lh_first = 0xf4e67080}, mnt_flag = 268439552, 
  mnt_maxsymlinklen = 60, mnt_stat = {f_spare2 = 0, f_bsize = 1024, 
    f_iosize = 8192, f_blocks = 2893614, f_bfree = 641136, f_bavail = 409647, 
    f_files = 1966078, f_ffree = 1073865, f_fsid = {val = {1148, 1}}, 
    f_owner = 0, f_type = 1, f_flags = 268439552, f_spare = {0, 0, 0, 0, 0, 
      0}, f_mntonname = "/m/news/news3", '\000' <repeats 76 times>, 
    f_mntfromname = "/dev/sd15e", '\000' <repeats 79 times>}, 
  mnt_data = 0xf48dbc00, mnt_time = 0}
(kgdb) set radix 16
Input and output radices now set to decimal 16, hex 10, octal 20.
(kgdb) print *mp
$3 = {mnt_list = {cqe_next = 0xf48db400, cqe_prev = 0xf48d5000}, 
  mnt_op = 0xf02095c0, mnt_vfc = 0xf02095ec, mnt_vnodecovered = 0xf48c8f80, 
  mnt_vnodelist = {lh_first = 0xf4e67080}, mnt_flag = 0x10001000, 
  mnt_maxsymlinklen = 0x3c, mnt_stat = {f_spare2 = 0x0, f_bsize = 0x400, 
    f_iosize = 0x2000, f_blocks = 0x2c272e, f_bfree = 0x9c870, 
    f_bavail = 0x6402f, f_files = 0x1dfffe, f_ffree = 0x1062c9, f_fsid = {
      val = {0x47c, 0x1}}, f_owner = 0x0, f_type = 0x1, f_flags = 0x10001000, 
    f_spare = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 
    f_mntonname = "/m/news/news3", '\000' <repeats 76 times>, 
    f_mntfromname = "/dev/sd15e", '\000' <repeats 79 times>}, 
  mnt_data = 0xf48dbc00, mnt_time = 0x0}
(kgdb)

Dumps are available on request.

>How-To-Repeat:

Run a busy news server with 2.2

>Fix:
	
	

>Release-Note:
>Audit-Trail:

From: Heikki Suonsivu <hsu@clinet.fi>
To: freebsd-bugs@freebsd.org
Cc: gnats@freefall.freebsd.org
Subject: Re: kern/2771: panic: bad dir
Date: Wed, 19 Feb 1997 23:11:04 +0200 (EET)

 In article <199702191605.SAA03914@news.clinet.fi> Heikki Suonsivu <hsu@clinet.fi> writes:
 One more thing about this panic; we did not have any problems with this
 system when it was installed and the disks were mostly empty.  The problems
 started when expire kicked in after about two weeks.  We have a
 built-ourselves expire which keeps space available constant by removing old
 articles one-by-one, so load it different from traditional news server.
 
    IdlePTD 271000
    current pcb at 0x210c98
    panic: bad dir
    #0  boot (howto=256) at ../../kern/kern_shutdown.c:243
    243                                     dumppcb.pcb_cr3 = rcr3();
    (kgdb) bt
    #0  boot (howto=256) at ../../kern/kern_shutdown.c:243
    #1  0xf0112402 in panic (fmt=0xf01b37d1 "bad dir")
        at ../../kern/kern_shutdown.c:367
    #2  0xf01b3813 in ufs_dirbad (ip=0xf494ab00, offset=49210, 
        how=0xf01b2b70 "mangled entry") at ../../ufs/ufs/ufs_lookup.c:589
    #3  0xf01b3071 in ufs_lookup (ap=0xefbffe5c) at ../../ufs/ufs/ufs_lookup.c:284
    #4  0xf0130619 in lookup (ndp=0xefbfff0c) at vnode_if.h:31
    #5  0xf013015b in namei (ndp=0xefbfff0c) at ../../kern/vfs_lookup.c:156
    #6  0xf0133a2d in link (p=0xf48b5000, uap=0xefbfff94, retval=0xefbfff84)
        at ../../kern/vfs_syscalls.c:894
    #7  0xf01cfcef in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 1344640, 
 	 tf_esi = 1, tf_ebp = -272639824, tf_isp = -272629788, tf_ebx = 20082716, 
 	 tf_edx = 28, tf_ecx = -272641940, tf_eax = 9, tf_trapno = 7, tf_err = 7, 
 	 tf_eip = 134672897, tf_cs = 31, tf_eflags = 514, tf_esp = -272641840, 
 	 tf_ss = 39}) at ../../i386/i386/trap.c:892
    #8  0x806f201 in ?? ()
    #9  0xcfeb in ?? ()
 
 -- 
 Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND, hsu@clinet.fi
 mobile +358-40-5519679 work +358-9-43542270 fax -4555276
 
State-Changed-From-To: open->closed 
State-Changed-By: johan 
State-Changed-When: Thu Aug 10 13:58:20 PDT 2000 
State-Changed-Why:  
<hsu@clinet.fi>: host mail.clinet.fi[194.100.0.7] said: 550 <hsu@clinet.fi>... 
User unknown 


and duplicated by PR 3582 


http://www.freebsd.org/cgi/query-pr.cgi?pr=2771 
>Unformatted:
