Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96780 - Whoops ! tar truncates sparse files which are >=4GB
Summary: Whoops ! tar truncates sparse files which are >=4GB
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2005-06-22 06:15 UTC by Joël
Modified: 2006-10-05 00:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Testing script (,320 bytes, text/plain)
2005-06-22 06:19 UTC, Joël
sparse.patch (sparse.patch,346 bytes, patch)
2005-06-23 17:12 UTC, SpanKY
Details | Diff
xheader.patch (xheader.patch,305 bytes, patch)
2005-06-23 17:13 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

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

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

Comment 7 SpanKY gentoo-dev 2005-06-23 17:12:56 UTC
Created attachment 61813 [details, diff]
Comment 8 SpanKY gentoo-dev 2005-06-23 17:13:10 UTC
Created attachment 61814 [details, diff]
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.