Subject: kern/24451: panic: bad dir ino xxxx at offset yy: mangled entry
To: None <gnats-bugs@gnats.netbsd.org>
From: None <he@netbsd.org>
List: netbsd-bugs
Date: 02/17/2004 10:41:03
>Number:         24451
>Category:       kern
>Synopsis:       panic: bad dir ino xxxx at offset yy: mangled entry
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 17 09:42:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Havard Eidnes
>Release:        NetBSD 1.6ZK 15-16 Feb 2004
>Organization:
	
>Environment:
System: NetBSD dennis.urc.uninett.no 1.6ZK NetBSD 1.6ZK (GENERIC) #35: Sun Feb 15 02:57:31 CET 2004  he@stegg.urc.uninett.no:/usr/users/he/src/sys/arch/hp300/compile/obj.hp300/GENERIC hp300
System: NetBSD viola.urc.uninett.no 1.6ZK NetBSD 1.6ZK (VIOLA) #18: Sun Feb 15 12:09:20 CET 2004  he@viola.urc.uninett.no:/usr/obj/sys/arch/sgimips/compile/VIOLA sgimips
Architecture: hp300, sgimips
Machine: m68k, mips
>Description:
	Recent kernels built and run in the Sun/Mon 15-16 Feb
	timeframe show a worrying trend in that they panic indicating
	an FFS-related problem, typically "bad dir".

	A subsequent fsck consistently reveals no problems.

	In one case, I was able to reproduce the problem by doing an
	"ls -l" on one of the directories whose inodes was complained
	about, but in two other cases that did not hold.

	This problem was initially observed on a hp300, but has now
	also been observed on an sgimips machine, so I beleive this
	problem is machine-independent.

	Some of the panic messages were:

Second bad
/usr: bad dir ino 86456 at offset 1000: mangled entry
panic: bad dir
Stopped in pid 19858.1 (find) at        netbsd:cpu_Debugger+0x6:        unlk    a
6
db> 

/usr: bad dir ino 851073 at offset 2012: mangled entry
panic: bad dir
Stopped in pid 1278.1 (ls) at   netbsd:cpu_Debugger+0x6:        unlk    a6
db> 

First bad, reclen=c60e, DIRSIZ=52, namlen=40, flags=1000 entryoffsetinblock=0, dirblksiz = 512
/usr: bad dir ino 3837175 at offset 0: mangled entry
panic: bad dir
Stopped in pid 15831.1 (find) at        0x88129b94:     jr      ra
                bdslot: nop
db> 

	Strangely, none of the i386 hosts I run updated in the same
	timeframe behave this way.

>How-To-Repeat:
	Try to run these kernels, and watch stability deteriorate with
	the above panics.

>Fix:
	Sorry, don't know.
	Hints for information gathering / debugging highly appreciated.
>Release-Note:
>Audit-Trail:
>Unformatted: