Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Dec 2003 14:55:49 -0600
From:      Gordon Burditt <gordonb@airmail.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gordonb@airmail.net
Subject:   kern/60089: UDF filesystem appends garbage to files
Message-ID:  <E1ATotZ-0003vD-FP@hammy.burditt.org>
Resent-Message-ID: <200312092100.hB9L0cFZ004191@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1ATotZ-0003vD-FP>