Red Hat Bugzilla – Bug 9067
Wrong "File shrank by x bytes; padding with zeros" message
Last modified: 2008-05-01 11:37:54 EDT
I've been getting errors like this regularly from the tar that's running my
tar: /c/oldroot.tgz: File shrank by 182917781 bytes; padding with zeros
I'm using tar-1.13.17-1 with a local patch to ignore some additional failed
stat()s whtn when --ignore-failed-read is specified; I'm fairly certain
that patch doesn't have anything to do with the error shown above.
Until today, the error always happened with files on a read-only NTFS
partition, so I assumed that it was related to a bug in the NTFS filesystem
code, rather than a bug in tar. But the file /c/oldroot.tgz shown above is
in fact on an ext2 partition, so I cannot help but suspect that there's a
bug in tar that is sometimes causing it to believe that a file has shrunk
when it hasn't.
The file /c/oldroot.tgz hasn't changed in a long time.
Note that I'm using --listed-incremental for my backups; that may or may
not be relevant to this bug.
This should be fixed in the current tar.