Bug 240619

Summary: makefs (ffs): "ffs_alloccg: map corrupted" error on small filesystem
Product: Base System Reporter: Ed Maste <emaste>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196390

Description Ed Maste freebsd_committer freebsd_triage 2019-09-16 21:15:22 UTC
While investigating PR196390 I encountered an error during the creation of a small filesystem:

% (cd /; makefs ~/image ~/metalog)
Calculated size of `/home/emaste/image': 131072 bytes, 8 inodes
Extent size set to 32768
/home/emaste/image: 0.1MB (256 sectors) block size 32768, fragment size 4096
        using 1 cylinder groups of 0.12MB, 4 blks, 256 inodes.
super-block backups (for fsck -b #) at:
 64,
Populating `/home/emaste/image'
makefs: ffs_alloccg: map corrupted: start 1 len 3 offset 206 206

metalog contained the example from PR196390,
. type=dir uname=root gname=wheel mode=0755
./etc type=dir uname=root gname=wheel mode=0755
./sbin type=dir uname=root gname=wheel mode=0755
./usr type=dir uname=root gname=wheel mode=0755
./usr/bin type=dir uname=root gname=wheel mode=0755
./usr/bin/passwd type=file uname=root gname=wheel mode=04555 size=7000
./etc/passwd type=file mode=0644 uname=root gname=wheel