From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 9 13:00:42 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFAFD16A4CE for ; Tue, 9 Dec 2003 13:00:41 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3C8843D33 for ; Tue, 9 Dec 2003 13:00:38 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hB9L0cFY004192 for ; Tue, 9 Dec 2003 13:00:38 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hB9L0cFZ004191; Tue, 9 Dec 2003 13:00:38 -0800 (PST) (envelope-from gnats) Resent-Date: Tue, 9 Dec 2003 13:00:38 -0800 (PST) Resent-Message-Id: <200312092100.hB9L0cFZ004191@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, Gordon Burditt Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0DF616A4CE for ; Tue, 9 Dec 2003 12:55:53 -0800 (PST) Received: from hammy.burditt.org (hammy.burditt.org [206.138.224.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E31443D21 for ; Tue, 9 Dec 2003 12:55:52 -0800 (PST) (envelope-from gordon@hammy.burditt.org) Received: from gordon by hammy.burditt.org with local (Exim 4.24; FreeBSD) id 1ATotZ-0003vD-FP; Tue, 09 Dec 2003 14:55:49 -0600 Message-Id: Date: Tue, 09 Dec 2003 14:55:49 -0600 From: Gordon Burditt Sender: Gordon Burditt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: gordonb@airmail.net Subject: kern/60089: UDF filesystem appends garbage to files X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Gordon Burditt List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2003 21:00:42 -0000 >Number: 60089 >Category: kern >Synopsis: UDF filesystem appends garbage to files >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: Tue Dec 09 13:00:38 PST 2003 >Closed-Date: >Last-Modified: >Originator: Gordon Burditt >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD hammy.burditt.org 4.9-STABLE FreeBSD 4.9-STABLE #7: Sat Nov 22 14:13:11 CST 2003 gordon@hammy.burditt.org:/scratch5/i386-obj/usr/src/sys/HAMMY i386 (Reporting this from a FreeBSD-4.9 system even though the DVD drive is installed on a 5.1-RELEASE system and the bug is observed on 5.1-RELEASE. FreeBSD 4.9-RELEASE does not have mount_udf). mkisofs 2.0.3 FreeBSD 5.1-RELEASE Generic Cheap DVD+/-R+/-RW recorder (reproducible without this) >Description: If you build a UDF filesystem image of compressed files (using mkisofs), then mount it (either burning it to DVD and mounting it, or mounting the image with mdconfig/mount), different programs will see the file length differently (either correct, or apparently rounded up to the next 64k in size). In my case I used compressed filesystem dumps. ls -l says the original var.dump.gz and the one in the UDF filesystem are the same length. cmp says the files are identical (not EOF on one of the files). wc says the UDF filesystem file is longer. 6909 40703 1900544 /mnt/book/var.dump.gz (UDF filesystem) 6905 40385 1863645 /backups/dumps/0/book/var.dump.gz gzip -tv says there is trailing garbage at the end of the UDF file, but the checksum is OK. hd shows extra stuff at the end of the UDF file. md5 says that the checksums are different. Not all files have their sizes rounded up to the next 64k, in particular not small files. Files with the observed problem range from 326KB to almost 396MB. Files without the problem range from 109 bytes to 6.5KB. As it happens, there were no files between 6.5KB and 326KB. I do not know for sure that this is strictly a file size issue. Whether or not mkisofs is producing a corrupted UDF filesystem, it does seem strange that some programs see the file as one size and others see it as another size. >How-To-Repeat: Build a directory tree of large (e.g. 2MB to 400MB) gzipped files. Using mkisofs 2.0, build a UDF filesystem image from these files. Either (a) Use mdconfig and mount the image, or (b) burn the image to a CD-R/DVD-R and mount it. Run gzip -tv on the gzipped files. Note message about "decompression OK, trailing garbage ignored". Verify that this message does not occur on the original files used to build the UDF filesystem image. >Fix: not known. Gordon L. Burditt >Release-Note: >Audit-Trail: >Unformatted: