Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 1996 21:04:07 +0200 (MET DST)
From:      guido@gvr.win.tue.nl (Guido van Rooij)
To:        pst@shockwave.com (Paul Traina)
Cc:        FreeBSD-hackers@freebsd.org (FreeBSD-hackers)
Subject:   Re: cvs commit: src/sbin/fsdb fsdb.c
Message-ID:  <199609271904.VAA01907@gvr.win.tue.nl>
In-Reply-To: <199609271648.JAA07942@precipice.shockwave.com> from Paul Traina at "Sep 27, 96 09:48:02 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Paul Traina wrote:
> I just got a panic off of a 24-Sep kernel in:
> 
> #0  0xf011389e in boot ()
> #1  0xf0113b8a in panic ()
> #2  0xf01b28ab in ufs_dirbad ()
> #3  0xf01b205c in ufs_lookup ()
> #4  0xf013403e in lookup ()
> #5  0xf0133b0d in namei ()
> #6  0xf0139c05 in vn_open ()
> #7  0xf0137249 in open ()
> #8  0xf01d0db6 in syscall ()
> #9  0xf01c8275 in Xsyscall ()
> 
> I completely missed the comments about sparse directory panics.  When was this
> found/fixed?

Well, I had a filesystem with that behaviour. When I found out the cause
I contacted Kirk. He agreed with my diagnosis, but it was low on his
priority list so i made a fix. However, this fix is not what we really want.

The strange thing is that this should be impossible to happen. Anyway,
the problem is that sometimes an filesystem passes the fsck but still makes
the kernel panic with a bad dir: mangled entry (or something like that).
The reason is that the size of the directory is beyond the last datablock,
thus effectively making a sparse directory file (at least in my case).
Fsck doesn't find anything becuase it only examines the present datablocks.
The kernel does see such a non-present block as a bunch of zero's. And
that causes the panic because a non-used directory chunk should have a
reclen field of 255. The fix (until fsck is fixed) is to fsdb the filesystem,
chdir to the bad dir and do an ls. You will then see the last entry and you
can reset the size of the directory untill just after that entry.

-Guido



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609271904.VAA01907>