Subject: problem with fsck_ffs
To: None <current-users@NetBSD.ORG>
From: Thorsten Frueauf <frueauf@ira.uka.de>
List: port-pmax
Date: 04/17/1998 21:52:32
Hello!

My DS 3100 running current from 14.04.1998 had a lockup while I did
compiling egcs and did a `cp /usr/lib/libc.so.12.26 /usr/lib/libc.so.12.26.bak`.
While I don't know why it froze, I got a problem with fsck after I reset the
machine:

Apr 17 16:16:43 cyberdec-1 /netbsd: /dev/rz2d: file system not clean
(fs_flags=10); please fsck(8)

** /dev/rrz2d
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes

BLK(S) MISSING IN BIT MAPS
SALVAGE? yes

SUMMARY INFORMATION BAD
SALVAGE? yes

now fsck_ffs dumped core without fixing the fs. I was able to get a mountable
partition (/usr in this case) with answering "no" to above questions, but
each time I will reboot the machine I get the same problem.

Here is what I got from the core:
[milano@cyberdec-1]/usr/src/sbin/fsck_ffs# gdb obj/fsck_ffs /fsck_ffs.core 
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.16 (mips-netbsd), Copyright 1996 Free Software Foundation, Inc...
Core was generated by `fsck_ffs'.
Program terminated with signal 11, Segmentation fault.
#0  0x41ac9c in copyback_cg (blk=0x10064560)
    at /usr/src/sbin/fsck_ffs/utilities.c:589
589             memcpy(blk->b_un.b_cg, cgrp, SBSIZE);
(gdb) bt
#0  0x41ac9c in copyback_cg (blk=0x10064560)
    at /usr/src/sbin/fsck_ffs/utilities.c:589
#1  0x4144b8 in pass5 () at /usr/src/sbin/fsck_ffs/pass5.c:336
#2  0x40d894 in checkfilesys (filesys=0x1005ebf0 "/dev/rrz2d", mntpt=0x0, 
    auxdata=269430784, child=269279232) at /usr/src/sbin/fsck_ffs/main.c:269
#3  0x40d390 in main (argc=0, argv=0x7ffffca4)
    at /usr/src/sbin/fsck_ffs/main.c:167

If it helps I can put up the core and binary for more debugging on
my homepage - just give me a note.

Any suggestions on how to cure that fs?

Thanx for help in advance!

Greets
      Thorsten