Your message dated Thu, 5 Apr 2007 02:55:24 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#417673: /sbin/fsck.vfat: Incorrectly truncates files of
4294966784 bytes length
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: dosfstools
Version: 2.11-2.1
Severity: critical
File: /sbin/fsck.vfat
Justification: causes serious data loss
/sbin/fsck.vfat truncates files of 4294966784 bytes length.
The file system on /dev/hda8 was checked immediately before reboot using the
GUI tool
in Windows 2000. As the output /var/log/fsck/checkfs shows /sbin/fsck.vfat
decided
during boot that the filesystem was inconsistent and automatically truncated
the file.
Note that it hasn't actually released the clusters yet. The clusters seem to
be freed
during when fsck is run at the next boot.
Also shown below is the result of manually copying an equivalant file, and
manually
running fsck.vfat is sufficent to reproduce the problem.
A quick test shows that Sarge does not truncate the file during boot.
Thanks for your work in Debian
Andrew V.
========================================================================
$ cat /var/log/fsck/checkfs
Log of fsck -C -V -R -A -a
Wed Apr 4 17:23:06 2007
fsck 1.40-WIP (14-Nov-2006)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /mnt/p4-backup-root] fsck.ext3 -a -C0 /dev/hda6
/dev/hda6: Superblock last mount time is in the future. FIXED.
/dev/hda6: clean, 19738/128520 files, 313092/514048 blocks
[/sbin/fsck.vfat (1) -- /mnt/p4-shared] fsck.vfat -a /dev/hda8
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/Sarge Hard Disk.vhd
File size is 4294966784 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
Performing changes.
/dev/hda8: 63 files, 950195/2076388 clusters
fsck died with exit status 1
Wed Apr 4 17:23:07 2007
----------------
$ cp /mnt/p4-games/tmp/MS-Virtual-PC/sarge1/Sarge\ Hard\ Disk.vhd
/mnt/p4-shared/sarge_test
$ ll /mnt/p4-shared/
total 4194368
[...]
-rwxr-xr-x 1 andrew andrew 0 2007-03-29 18:32 Sarge Hard Disk.vhd
-rwxr-xr-x 1 andrew andrew 4294966784 2007-04-04 17:34 sarge_test
$ sudo umount /dev/hda8
$ sudo fsck.vfat -a /dev/hda8
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/sarge_test
File size is 4294966784 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/Sarge Hard Disk.vhd
File size is 0 bytes, cluster chain length is > 0 bytes.
Truncating file to 0 bytes.
Free cluster summary wrong (864049 vs. really 1126193)
Auto-correcting.
Performing changes.
/dev/hda8: 64 files, 950195/2076388 clusters
$ sudo fsck.vfat -a /dev/hda8
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/sarge_test
File size is 0 bytes, cluster chain length is > 0 bytes.
Truncating file to 0 bytes.
Free cluster summary wrong (1126193 vs. really 1388337)
Auto-correcting.
Performing changes.
/dev/hda8: 64 files, 688051/2076388 clusters
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Versions of packages dosfstools depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
dosfstools recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Thu, Apr 05, 2007 at 10:38:06AM +0200, Manfred Rebentisch wrote:
> The Makefile contains the line
> OPTFLAGS = -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
> It must be added by
> -D_LARGEFILE64_SOURCE
> I dont know, if "_FILE_OFFSET_BITS=64" is really neccessary, but
> _LARGEFILE64_SOURCE is important on 32-Bit-Systems.
No, _LARGEFILE64_SOURCE is not what you want; this only enables the 64-bit
interfaces under the additional "foo64" names.
The correct fix here is to use the output of $(getconf LFS_CFLAGS), which
gives correct values on all platforms (you should never use
_FILE_OFFSET_BITS=64 on alpha, and you don't need either of these flags on
any of the 64-bit archs).
As it happens, debian/rules already *does* this (in fact, the version
currently in sarge included a fix for exactly this), but doesn't seem to be
getting the right flags to the build. And the only other change since
sarge, supposedly, has been an ia64-specific unaligned access fix.
Based on the build logs, I would conclude then that this was a bug in some
earlier version of getconf, because the package now builds correctly for me
here. BinNMUs scheduled on the relevant (32-bit) architectures; I'm closing
this report on the belief that no sourceful upload is necessary here, but
please reopen if you find that this simple rebuild does not fix the problem.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
[EMAIL PROTECTED] http://www.debian.org/
--- End Message ---