Subject: Re: kern/21296: more file corruption since UFS2
To: None <dive@endersgame.net>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: netbsd-bugs
Date: 04/24/2003 20:25:58
dive@endersgame.net wrote:

> >Number:         21296
> >Category:       kern
> >Synopsis:       another random(?) lock in current, and more corrupted files
> >Confidential:   no
> >Severity:       critical
> >Priority:       high
> >Responsible:    kern-bug-people
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   net
> >Arrival-Date:   Thu Apr 24 00:09:00 UTC 2003
> >Closed-Date:
> >Last-Modified:
> >Originator:     dive
> >Release:        NetBSD 1.6R
> >Organization:
> /~\ The ASCII
> \ / Ribbon Campaign                   Sean Davis
>  X  Against HTML                       aka dive
> / \ Email!
> >Environment:
> System: NetBSD eros 1.6R NetBSD 1.6R (EROS) #478: Wed Apr 23 19:45:01 EDT 2003 dive@eros:/sys/arch/i386/compile/EROS i386
> Architecture: i386
> Machine: i386
> >Description:
> this has happened before, but not to programs, just a temp file or two.
> The machine locked up hard, I suspect due to something thats happened since
> ffs2 went in, because i haven't had so many problems at once ever with
> netbsd except for post-ffs2-import.
> <dive@eros(/home/dive)> % bbkeys
> /usr/X11R6/bin/bbkeys: Permission denied.
> Exit 1
> <dive@eros(/home/dive)> % ls -l `which bbkeys`
> ls: Command: No such file or directory
> ls: bbkeys:: No such file or directory
> ls: found.: No such file or directory
> ls: not: No such file or directory
> Exit 1
> <dive@eros(/home/dive)> % ls -l /usr/X11R6/bin/bbkeys
> ls: /usr/X11R6/bin/bbkeys: Bad file descriptor
> Exit 1
> <dive@eros(/home/dive)> % 

I think it is because ffs1_din is not being cleared during allocation.
Before ufs2 went in, memset() on the inode would have also cleared the
dinode structure.

Quite a few file-systems will exhibit this problem.

	-- Gregory McGarry <g.mcgarry@ieee.org>