commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Resolved: (SANDBOX-170) Creating TAR archive of an 8 GB file causes IOException
Date Sat, 21 Jun 2008 17:57:45 GMT


Emmanuel Bourg resolved SANDBOX-170.

    Resolution: Fixed

Fixed, TarOutputStream now uses long values internally.

> Creating TAR archive of an 8 GB file causes IOException
> -------------------------------------------------------
>                 Key: SANDBOX-170
>                 URL:
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: Compress
>    Affects Versions: Nightly Builds
>         Environment: Win xp pro sp2; JDK 1.5.0_07
>            Reporter: Sam Smith
> Yesterday I reported a bug with extraction of TAR archives:
> Today I found that when I tried to creat a TAR archive of a file that is exactly 8 GB,
that is,
> 	(8L * 1024L * 1024L * 1024L) - 1
> that it failed with the following strange error:
> Exception in thread "main" request to write '32768' bytes exceeds
size in header of '-1' bytes
>         at org.apache.commons.compress.archivers.tar.TarOutputStream.write(
>         at
>         at
>         at
>         at
>         at
>         at$Test.test_archive_extract_fileLengthLimit(
>         at$Test.main(
> The code that I used to try and create the TAR archive was the same described in that
previous bug report, so I will not repeat it here.
> I was doing this in an attempt to discern if the org.apache.commons.compress TAR code
has any file size limits, since classic TAR is limited to 8 BG files but org.apache.commons.compress
supports GNU TAR long path names, so maybe it has no file size limits either.  (There appears
to be no documentation about this in the TAR code.)
> What is strange is that the code first DID apparently succeed in TARing a 10 GB file,
albeit, when I tried to see if a third party piece of software (7-zip) would extract it, that
program objected saying that it did not support the TAR format type encpuntered in the file.
> Since I need to use a file size limit that is consistent with other programs, I then
tried to TAR a file of exactly 8 GB in size.  This is when I encountered the above error.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message