From hsu@clinet.fi  Wed Feb 19 08:19:39 1997
Received: from hauki.clinet.fi (hauki.clinet.fi [194.100.0.1])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA29707
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 08:18:32 -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 SAA22892 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 18:17:54 +0200 (EET)
Received: (root@localhost) by news.clinet.fi (8.8.4/8.6.4) id SAA04519; Wed, 19 Feb 1997 18:18:03 +0200 (EET)
Message-Id: <199702191618.SAA04519@news.clinet.fi>
Date: Wed, 19 Feb 1997 18:18:03 +0200 (EET)
From: Heikki Suonsivu <hsu@clinet.fi>
Reply-To: hsu@clinet.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: bad dir
X-Send-Pr-Version: 3.2

>Number:         2773
>Category:       kern
>Synopsis:       bad dir panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 08:20:04 PST 1997
>Closed-Date:    Mon Sep 25 13:00:11 PDT 2000
>Last-Modified:  Mon Sep 25 13:01:44 PDT 2000
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 2.2-GAMMA i386
>Organization:
Clinet, Espoo, Finland
>Environment:

2.2 news server, 2940, 128M, 7 * 3G quantum fb.

>Description:

hsu#news.clinet.fi Wed 2: gdb -k kernel.2 vmcore.2
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 b21000
current pcb at 0x21b3fc
panic: from debugger
#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  0xf0116013 in panic (fmt=0xf0101439 "from debugger")
    at ../../kern/kern_shutdown.c:367
#2  0xf0101455 in db_panic (dummy1=-266634537, dummy2=0, dummy3=-1, 
    dummy4=0xefbffc0c "") at ../../ddb/db_command.c:436
#3  0xf0101345 in db_command (last_cmdp=0xf020bb24, cmd_table=0xf020b974, 
    aux_cmd_tablep=0xf0255d00) at ../../ddb/db_command.c:333
#4  0xf01014c2 in db_command_loop () at ../../ddb/db_command.c:458
#5  0xf0103c88 in db_trap (type=12, code=0) at ../../ddb/db_trap.c:73
#6  0xf01cfccb in kdb_trap (type=12, code=0, regs=0xefbffd50)
    at ../../i386/i386/db_interface.c:126
#7  0xf01d953f in trap_fatal (frame=0xefbffd50) at ../../i386/i386/trap.c:738
#8  0xf01d9038 in trap_pfault (frame=0xefbffd50, usermode=0)
    at ../../i386/i386/trap.c:653
#9  0xf01d8cd7 in trap (frame={tf_es = 16, tf_ds = 16, tf_edi = 8191, 
      tf_esi = -169903616, tf_ebp = -272630236, tf_isp = -272630408, 
      tf_ebx = -132091846, tf_edx = -142553356, tf_ecx = 49210, tf_eax = 0, 
      tf_trapno = 12, tf_err = 0, tf_eip = -266634537, tf_cs = 8, 
      tf_eflags = 66182, tf_esp = -174733312, tf_ss = -272630176})
    at ../../i386/i386/trap.c:311
#10 0xf01b7ad7 in ufs_lookup (ap=0xefbffe60) at ../../ufs/ufs/ufs_lookup.c:279
#11 0xf0134299 in lookup (ndp=0xefbfff0c) at vnode_if.h:31
#12 0xf0133ddb in namei (ndp=0xefbfff0c) at ../../kern/vfs_lookup.c:156
#13 0xf01379b9 in unlink (p=0xf58d1400, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/vfs_syscalls.c:986
#14 0xf01d97f7 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 0, 
      tf_esi = 20047930, tf_ebp = -272642264, tf_isp = -272629788, 
      tf_ebx = 20047947, tf_edx = 20047908, tf_ecx = 1801, tf_eax = 10, 
      tf_trapno = 7, tf_err = 7, tf_eip = 134834753, tf_cs = 31, 
      tf_eflags = 582, tf_esp = -272642564, tf_ss = 39})
    at ../../i386/i386/trap.c:892
#15 0x8096a41 in ?? ()
#16 0x32fe in ?? ()
#17 0x53dc in ?? ()
#18 0xcfeb in ?? ()
#19 0xedc7 in ?? ()
#20 0xf477 in ?? ()
#21 0x99eb in ?? ()
#22 0xc592 in ?? ()
#23 0x1096 in ?? ()
(kgdb) frame 10
#10 0xf01b7ad7 in ufs_lookup (ap=0xefbffe60) at ../../ufs/ufs/ufs_lookup.c:279
279                     ep = (struct direct *)((char *)bp->b_data + entryoffsetinblock);
(kgdb) list
274                      * Full validation checks are slow, so we only check
275                      * enough to insure forward progress through the
276                      * directory. Complete checks can be run by patching
277                      * "dirchk" to be true.
278                      */
279                     ep = (struct direct *)((char *)bp->b_data + entryoffsetinblock);
280                     if (ep->d_reclen == 0 ||
281                         (dirchk && ufs_dirbadentry(vdp, ep, entryoffsetinblock))) {
282                             int i;
283
(kgdb) print ep
$1 = (struct direct *) 0xf820703a
(kgdb) print *ep
Cannot access memory at address 0xf820703a.
(kgdb) print bp
$2 = (struct buf *) 0xf780cef4
(kgdb) print *bp
$3 = {b_hash = {le_next = 0xf77e5b9c, le_prev = 0xf77e3784}, b_vnbufs = {
    le_next = 0xf78131c8, le_prev = 0xf595c830}, b_freelist = {
    tqe_next = 0xf78169a4, tqe_prev = 0xf022bb0c}, b_act = {tqe_next = 0x0, 
    tqe_prev = 0xf57b91d4}, b_proc = 0x0, b_flags = 1049104, b_qindex = 0, 
  b_usecount = 4 '\004', b_error = 0, b_bufsize = 8192, b_bcount = 8192, 
  b_resid = 0, b_dev = 1132, b_un = {
    b_addr = 0xf8205000 "Path: news.clinet.fi!news.cs.hut.fi!news.funet.fi!newsfeed.sunet.se!news00.sunet.se!sunic!mn6.swip.net!plug.news.pipex.net!pipex!oleane!newsxfer3.itd.umich.edu!news.bbnplanet.com!su-news-hub1.bbnplane"...}, 
  b_kvabase = 0xf8205000 "Path: news.clinet.fi!news.cs.hut.fi!news.funet.fi!newsfeed.sunet.se!news00.sunet.se!sunic!mn6.swip.net!plug.news.pipex.net!pipex!oleane!newsxfer3.itd.umich.edu!news.bbnplanet.com!su-news-hub1.bbnplane"..., 
  b_kvasize = 8192, b_saveaddr = 0x0, b_lblkno = 5, b_blkno = 760176, 
  b_iodone = 0, b_iodone_chain = 0x0, b_vp = 0xf595c800, b_dirtyoff = 0, 
  b_dirtyend = 0, b_rcred = 0x0, b_wcred = 0x0, b_validoff = 0, 
  b_validend = 0, b_pblkno = 760176, b_savekva = 0x0, b_driver1 = 0x0, 
  b_driver2 = 0x0, b_spc = 0x0, b_cluster = {cluster_head = {
      tqh_first = 0xf78169a4, tqh_last = 0xf7813258}, cluster_entry = {
      tqe_next = 0xf78169a4, tqe_prev = 0xf7813258}}, b_pages = {0xf0c3e3e8, 
    0xf0c08a84, 0x0 <repeats 14 times>}, b_npages = 1016327}
(kgdb) print entryoffsetinblock
$4 = 8250
(kgdb)

dumps available on request

>How-To-Repeat:

run a busy news server

>Fix:
	

>Release-Note:
>Audit-Trail:

From: Heikki Suonsivu <hsu@clinet.fi>
To: FreeBSD-gnats@freefall.freebsd.org, freebsd-bugs@freefall.freebsd.org
Cc: hsu@clinet.fi
Subject: Re: kern/2773: bad dir
Date: Tue, 17 Jun 1997 00:39:38 +0300 (EET DST)

 This problem seems to have disappeared or reduced in frequency after we
 stopped one process storing binaries collected from newsgroups to a nfs
 disk (aub, a perl script utilizing a bunch of netbpm tools).
 
 FreeBSD-gnats@freefall.freebsd.org writes:
  > Thank you very much for your problem report.
  > It has the internal identification `kern/2773'.
  > The individual assigned to look at your
  > bug is: freebsd-bugs. 
  > 
  > >Category:       kern
  > >Responsible:    freebsd-bugs
  > >Synopsis:       bad dir panic
  > >Arrival-Date:   Wed Feb 19 08:20:04 PST 1997
 
 -- 
 Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND, hsu@clinet.fi
 mobile +358-40-5519679 work +358-9-43542270 fax -4555276
 
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: peter 
Responsible-Changed-When: Sun Apr 26 02:21:32 PDT 1998 
Responsible-Changed-Why:  
NFS references, I'll take a look.. 
State-Changed-From-To: open->closed 
State-Changed-By: peter 
State-Changed-When: Mon Sep 25 13:00:11 PDT 2000 
State-Changed-Why:  
This is very old, and is likely to have been fixed with the 4.x and beyond 
NFS etc fixes. 

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