From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 18 14:40:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51EC49EE for ; Fri, 18 Apr 2014 14:40:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E02E16E4 for ; Fri, 18 Apr 2014 14:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3IEe2ch072435 for ; Fri, 18 Apr 2014 14:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3IEe2Mb072434; Fri, 18 Apr 2014 14:40:02 GMT (envelope-from gnats) Resent-Date: Fri, 18 Apr 2014 14:40:02 GMT Resent-Message-Id: <201404181440.s3IEe2Mb072434@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oleg Ginzburg Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAF848D4 for ; Fri, 18 Apr 2014 14:31:40 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D774A16A6 for ; Fri, 18 Apr 2014 14:31:40 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3IEVe4H067942 for ; Fri, 18 Apr 2014 14:31:40 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3IEVeZ9067934; Fri, 18 Apr 2014 14:31:40 GMT (envelope-from nobody) Message-Id: <201404181431.s3IEVeZ9067934@cgiserv.freebsd.org> Date: Fri, 18 Apr 2014 14:31:40 GMT From: Oleg Ginzburg To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/188762: makefs(8) create bad images with UFS2. 100% reproducibility. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 14:40:02 -0000 >Number: 188762 >Category: bin >Synopsis: makefs(8) create bad images with UFS2. 100% reproducibility. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 18 14:40:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Oleg Ginzburg >Release: FreeBSD 11 >Organization: >Environment: FreeBSD home.my.domain 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r264340M: Fri Apr 11 12:01:21 UTC 2014 root@home.my.domain:/usr/jails/src/obj_amd64_amd64_11/usr/src/sys/GENERIC.CBSD amd64 >Description: makefs(8) create bad images with UFS2. 100% reproducibility. >How-To-Repeat: 1) Populate some data, for example - base of FreeBSD. On the small size of data problem is not reproducible. % bsdinstall jail /tmp/base 2) Create image with UFS2 (on UFS1 is not reproducible) by makefs: % makefs -o version=2 /tmp/base.img /tmp/base 3) Attach via mdconfig % mdconfig -a -t vnode -f /tmp/base.img md0 4) First run fsck (FS is not consistent, why?): % fsck_ufs -y /dev/md0 ** /dev/md0 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames UNALLOCATED I=1536 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/nls/uk_UA.ISO8859-5/tcsh.cat REMOVE? yes UNALLOCATED I=1537 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/nls/zh_CN.UTF-8/grep.cat REMOVE? yes UNALLOCATED I=1535 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/nls/POSIX REMOVE? yes UNALLOCATED I=2106 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/locale/en_CA.US-ASCII/LC_COLLATE REMOVE? yes UNALLOCATED I=2107 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/locale/en_CA.US-ASCII/LC_MONETARY REMOVE? yes UNALLOCATED I=2108 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/usr/share/locale/en_CA.US-ASCII/LC_CTYPE 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 13074 files, 307370 used, 18677 free (125 frags, 2319 blocks, 0.0% fragmentation) ***** FILE SYSTEM MARKED DIRTY ***** ***** FILE SYSTEM WAS MODIFIED ***** ***** PLEASE RERUN FSCK ***** 5) Second fsck, all clean: % fsck_ufs -y /dev/md0 ** /dev/md0 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 13074 files, 307370 used, 18677 free (125 frags, 2319 blocks, 0.0% fragmentation) ***** FILE SYSTEM MARKED CLEAN ***** 6) Mount and unmount fs (when mount with -oro, problem is not reproducible): % mount /dev/md0 /mnt % umount /mnt 7) Third run of fsck, FS is not consistent) : fsck_ufs -y /dev/md0 ** /dev/md0 ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes PARTIALLY ALLOCATED INODE I=128 CLEAR? yes PARTIALLY ALLOCATED INODE I=132 CLEAR? yes ** Phase 2 - Check Pathnames UNALLOCATED I=128 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-15 REMOVE? yes UNALLOCATED I=129 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-1 REMOVE? yes UNALLOCATED I=132 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/var/db/etcupdate/current/usr/share/nls/en_US.US-ASCII REMOVE? yes UNALLOCATED I=133 OWNER=root MODE=0 SIZE=0 MTIME=Mar 16 16:58 2242 NAME=/var/db/etcupdate/current/usr/share/nls/POSIX REMOVE? yes UNALLOCATED I=134 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/var/db/etcupdate/current/usr/share/man/en.UTF-8 REMOVE? yes UNALLOCATED I=135 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/var/db/etcupdate/current/usr/share/man/en.ISO8859-15 REMOVE? yes ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts LINK COUNT DIR I=126 OWNER=root MODE=40755 SIZE=512 MTIME=Apr 15 01:03 2014 COUNT 4 SHOULD BE 3 ADJUST? yes LINK COUNT DIR I=127 OWNER=root MODE=40755 SIZE=512 MTIME=Apr 15 01:03 2014 COUNT 3 SHOULD BE 2 ADJUST? yes UNREF FILE I=137 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes NO lost+found DIRECTORY CREATE? yes UNREF FILE I=138 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=139 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=140 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=141 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=142 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=143 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=144 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=145 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes ** 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 13067 files, 307369 used, 18678 free (126 frags, 2319 blocks, 0.0% fragmentation) ***** FILE SYSTEM MARKED DIRTY ***** ***** FILE SYSTEM WAS MODIFIED ***** ***** PLEASE RERUN FSCK ***** 8) And again: root@home:/ # fsck_ufs -y /dev/md0 ** /dev/md0 ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes PARTIALLY ALLOCATED INODE I=128 CLEAR? yes PARTIALLY ALLOCATED INODE I=132 CLEAR? yes ** Phase 2 - Check Pathnames UNALLOCATED I=128 OWNER=root MODE=0 SIZE=0 MTIME=Jan 1 03:00 1970 NAME=/lost+found REMOVE? yes ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts LINK COUNT DIR I=2 OWNER=root MODE=40755 SIZE=512 MTIME=Apr 18 17:58 2014 COUNT 18 SHOULD BE 17 ADJUST? yes UNREF FILE I=137 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes NO lost+found DIRECTORY CREATE? yes UNREF FILE I=138 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=139 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=140 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=141 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=142 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=143 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=144 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes UNREF FILE I=145 OWNER=root MODE=120755 SIZE=7 MTIME=Apr 15 01:03 2014 RECONNECT? yes ** Phase 5 - Check Cyl groups SUMMARY INFORMATION BAD SALVAGE? yes 13067 files, 307369 used, 18678 free (126 frags, 2319 blocks, 0.0% fragmentation) ***** FILE SYSTEM STILL DIRTY ***** ***** FILE SYSTEM WAS MODIFIED ***** ***** PLEASE RERUN FSCK ***** 9) And again: fsck_ufs -y /dev/md0 ** /dev/md0 Cannot find file system superblock ioctl (GCINFO): Inappropriate ioctl for device fsck_ufs: /dev/md0: can't read disk label 10) No superblock, no data % mount -oro /dev/md0 /mnt % mount: /dev/md0: Invalid argument >Fix: sorry >Release-Note: >Audit-Trail: >Unformatted: