Subject: LFS v2 problems with full partition
To: None <current-users@netbsd.org>
From: Andrew Gillham <gillham@vaultron.com>
List: current-users
Date: 07/17/2001 09:36:43
So I deliberately filled my test LFS partition.  On i386 it starts spitting
out errors like this:
lfs_cleanerd[772]: add_segment failed segment 0: Invalid argument
lfs_cleanerd[772]: clean_segment: lfs_markv failed: Invalid argument
lfs_cleanerd[772]: Bad magic number: 0x60390 instead of 0x61561
lfs_cleanerd[772]: add_segment: lfs_segmapv failed for segment 0
lfs_cleanerd[772]: add_segment failed segment 0: Invalid argument

Here's the partition:
/dev/wd0e             340220   359543    -53345   117%    /mnt

The disk is very busy according to 'systat vmstat':
Discs  wd0  fd0  md0                                   64 fmin
seeks                                                  85 ftarg
xfers  101                                                itarg
Kbyte 5800                                             98 wired
%busy 62.4                                                pdfre

And top:
   PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
   772 root      -5    0    47M   12M physio     4:14 39.06% 39.06% 
lfs_cleanerd

I can't 'rm' a file on this partition, it just stalls.  Presumably waiting for
lfs_cleanerd to find some space.

On my Alpha the above behavior results in a panic.
panic: malloc: out of space in kmem_map
#0  0xfffffc00005c9698 in dumpsys ()
     at ../../../../arch/alpha/alpha/machdep.c:1290
1290            savectx(&dumppcb);
(gdb) where
#0  0xfffffc00005c9698 in dumpsys ()
     at ../../../../arch/alpha/alpha/machdep.c:1290
#1  0xfffffc00005c9288 in cpu_reboot (howto=0, bootstr=0x0)
     at ../../../../arch/alpha/alpha/machdep.c:1116
#2  0xfffffc00003e1e18 in panic (
     fmt=0xfffffc00006078b4 "malloc: out of space in kmem_map")
     at ../../../../kern/subr_prf.c:250
#3  0xfffffc00003cdba4 in malloc (size=0, type=0, flags=0)
     at ../../../../kern/kern_malloc.c:276
#4  0xfffffc000053001c in lfs_newbuf (fs=0x0, vp=0xfffffc00030322a0,
     daddr=5211, size=542409728) at ../../../../ufs/lfs/lfs_bio.c:491
#5  0xfffffc0000539500 in lfs_fakebuf (vp=0x0, lbn=0, can not access 0x1, 
invali
d kernel virtual address
can not access 0x1, invalid kernel virtual address
can not access 0x1, invalid kernel virtual address
can not access 0x1, invalid kernel virtual address
size=542409728,
     uaddr=0x1 <Address 0x1 out of bounds>)
     at ../../../../ufs/lfs/lfs_syscalls.c:1239
#6  0xfffffc0000537bd8 in lfs_markv (p=0x0, fsidp=0x0,
     blkiov=0xfffffe0000228020, blkcnt=751220)
     at ../../../../ufs/lfs/lfs_syscalls.c:485
#7  0xfffffc00005371d4 in sys_lfs_markv (p=0xfffffc00052fae48, v=0x0,
     retval=0x0) at ../../../../ufs/lfs/lfs_syscalls.c:209
#8  0xfffffc00005cfdcc in syscall_plain (p=0xfffffc00052fae48, code=0,
     framep=0xfffffe000717def8) at ../../../../arch/alpha/alpha/syscall.c:217
#9  0xfffffc0000300488 in XentSys ()
     at ../../../../arch/alpha/alpha/locore.s:535
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x120004048