Subject: 'ffs_alloccg: map corrupted' with UFS2 kernel
To: None <current-users@netbsd.org>
From: David <abs@mono.org>
List: current-users
Date: 04/11/2003 14:35:28
	sparc64 Ultra1, running -current from a week or so ago, updated
	kernel to today and attempting to copy onto sd0a from nfs
	mounted root gives:

# cp netbsd /mnt
start = 1, len = 20329, fs = /mnt
offset=9848 9848
panic: ffs_alloccg: map corrupted
kdb breakpoint at 1142314
Stopped in pid 2414.1 (cp) at   cpu_Debugger+0x4:       nop
db> trace
ffs_mapsearch(1, d630000, 0, 8, 8, 27b50) at ffs_mapsearch+0x1b8
ffs_alloccgblk(e7d43c0, 71dbec8, 8, ffffffffffffffff, e7e1338, e7f7c70) at
ffs_a
lloccgblk+0xa0
ffs_alloccg(e7d43c0, 0, 8, 8000, 1cb171, e7c41c8) at ffs_alloccg+0x134
ffs_hashalloc(e7d43c0, 0, 8, 8000, 10795b0, 100720) at ffs_hashalloc+0x18
ffs_alloc(e7d43c0, 0, 8, 8000, 2059f80, e7e15c8) at ffs_alloc+0xa8
ffs_balloc_ufs1(2059f80, e8d36a0, 8000, 0, 3, 0) at ffs_balloc_ufs1+0x3f8
ffs_balloc(e7e17f0, 107ae58, 148, e78eb40, 20d6000, 3e96b43b) at
ffs_balloc+0x28

ufs_gop_alloc(0, 0, 8000, 0, 2059f80, 10a6c04) at ufs_gop_alloc+0x80
ffs_write(0, 2, 0, e7d43c8, 0, e7e1a70) at ffs_write+0x370
vn_write(e7c4190, e7c41c8, e7e1b80, 2059f80, 1, 10fbef8) at vn_write+0x10c
dofilewrite(df7bc80, 4, e7c4190, 1cb171, 1cb171, e7c41c8) at
dofilewrite+0x8c
sys_write(df7bc80, e7e1dd0, e7e1dc0, 10d7204, 20, 100720) at
sys_write+0x5c
syscall(e7e1ed0, 4, 0, df7bc80, 4052efa8, 4052efa4) at syscall+0x344
syscall_setup(4, 406e4000, 1cb171, 1, 3, 0) at syscall_setup+0xe8
db>

	After the panic fsck reports:

# fsck -fy /dev/sd0a
** /dev/rsd0a
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
17892 files, 103667 used, 329868 free (140 frags, 41216 blocks, 0.0% fragmentation)

MARK FILE SYSTEM CLEAN? yes


-- 
		David Brownlee