Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 96780

Summary: Whoops ! tar truncates sparse files which are >=4GB
Product: Gentoo Linux Reporter: Joël <world.root>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: critical    
Priority: High    
Version: 2005.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Testing script
sparse.patch
xheader.patch

Description Joël 2005-06-22 06:15:03 UTC
I'm attaching a test script. This happens at least with GNU tar 1.15.1 on x86.

When 'S' command-line switch is removed, tar will perform as expected.
Comment 1 Joël 2005-06-22 06:19:24 UTC
Created attachment 61717 [details]
Testing script

First pass creates a sparse tar file. Extraction is incorrect.
Second pass creates a normal tar file. Extraction is fine.
The second pass requires 4G of HDD space.
Comment 2 Joël 2005-06-22 06:26:12 UTC
Tested under reiser4 and reiserfs.

====== From documentation ======

   The following table summarizes the limitations of each of these
formats:

Format  UID            File Size      Path Name      Devn
gnu     1.8e19         Unlimited      Unlimited      63
oldgnu  1.8e19         Unlimited      Unlimited      63
v7      2097151        8GB            99             n/a
ustar   2097151        8GB            256            21
posix   Unlimited      Unlimited      Unlimited      Unlimited

====== From tar --help ======

*This* tar defaults to:
--format=gnu -f- -b20 --rmt-command=/usr/sbin/rmt
Comment 3 SpanKY gentoo-dev 2005-06-22 18:41:41 UTC
can you please e-mail this issue to the bug tar list ?  you'll get a lot more
help a lot faster if you do so ...

http://lists.gnu.org/mailman/listinfo/bug-tar
Comment 4 Joël 2005-06-23 00:33:32 UTC
SpanKY:  ok, I've just sent it with a reference to gentoo bugzilla page. Thanks !
Comment 5 Joël 2005-06-23 05:54:52 UTC
Response from upstream developer:

> I've had a serious issue when backing up large sparse files with tar
> 1.15.1.

This has been fixed in CVS. Thanks for reporting.

Regards,
Sergey
Comment 6 SpanKY gentoo-dev 2005-06-23 10:27:16 UTC
ok, i'll look through upstream cvs and see if i can find/grab the fix for this

thanks
Comment 7 SpanKY gentoo-dev 2005-06-23 17:12:56 UTC
Created attachment 61813 [details, diff]
sparse.patch
Comment 8 SpanKY gentoo-dev 2005-06-23 17:13:10 UTC
Created attachment 61814 [details, diff]
xheader.patch
Comment 9 SpanKY gentoo-dev 2005-06-23 17:13:53 UTC
could you try these patches and see if one or the other (or both) fix the issue ?
Comment 10 Joël 2005-06-24 00:31:17 UTC
Thanks !

Unfortunately I've tried applying the two patches, both together and separately,
and they don't solve the problem..
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-10-05 00:24:53 UTC
tested this, problem no longer exists.