Subject: kern/21296: more file corruption since UFS2
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dive@endersgame.net>
List: netbsd-bugs
Date: 04/24/2003 00:08:05
>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 dropped to singleuser, and scripted fsck -fy:
Script started on Wed Apr 23 20:02:12 2003
# fsck -fy
** /dev/rwd0a
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3677 files, 15128 used, 500903 free (167 frags, 62592 blocks, 0.0% fragmentation)

MARK FILE SYSTEM CLEAN? yes


***** FILE SYSTEM MARKED CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****

***** REBOOT NOW *****
** /dev/rwd0e
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
5048 files, 44087 used, 988048 free (392 frags, 123457 blocks, 0.0% fragmentation)

MARK FILE SYSTEM CLEAN? yes


***** FILE SYSTEM MARKED CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****
** /dev/rwd0f
** File system is already clean
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3 files, 4 used, 516043 free (19 frags, 64503 blocks, 0.0% fragmentation)
** /dev/rwd0g
** File system is already clean
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
UNALLOCATED  I=203611  OWNER=root MODE=0
SIZE=0 MTIME=Dec 31 19:00 1969 
NAME=/X11R6/bin/bbkeys

REMOVE? yes

UNALLOCATED  I=304414  OWNER=root MODE=0
SIZE=0 MTIME=Dec 31 19:00 1969 
NAME=/pkg/include/ppmcmap.h

REMOVE? yes

UNALLOCATED  I=304425  OWNER=root MODE=0
SIZE=0 MTIME=Dec 31 19:00 1969 
NAME=/pkg/lib/libcharset.a

REMOVE? yes

** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes

SUMMARY INFORMATION BAD
SALVAGE? yes

BLK(S) MISSING IN BIT MAPS
SALVAGE? yes

75450 files, 1258332 used, 3902619 free (6059 frags, 487070 blocks, 0.1% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****
** /dev/rwd0h
** File system is already clean
** Last Mounted on /home
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
23923 files, 1573862 used, 8748313 free (5281 frags, 1092879 blocks, 0.1% fragmentation)
** /dev/rwd0i
** File system is already clean
** Last Mounted on /media
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2091 files, 28321014 used, 2645527 free (575 frags, 330619 blocks, 0.0% fragmentation)
** /dev/rwd0j
** File system is already clean
** Last Mounted on /misc
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
289525 files, 1197547 used, 7451872 free (12216 frags, 929957 blocks, 0.1% fragmentation)
** /dev/rwd1a
** File system is already clean
** Last Mounted on /disk2
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
121359 files, 5231563 used, 4581684 free (7732 frags, 571744 blocks, 0.1% fragmentation)
# ^D
Script done on Wed Apr 23 20:05:56 2003

>How-To-Repeat:
run -current for a few days with ffs partitions, i guess.
>Fix:
either backout ffs2 entirely or fix the parts of it that changed ffs. this
never happened before ffs2 went in.
>Release-Note:
>Audit-Trail:
>Unformatted:
 locked up w/ 20030417 kernel/userland. using 20030423 userland now. fsck found
 nothing wrong on bootup.