I encountered this bug when using PeaZip (on Vista64), which uses 7zip as its backend for handling tar files. I reported the isssue to the PeaZip developer, and after some testing it was determined that the bug was in 7zip, and we decided I would report the bug to you.
The tar file in question is a valid tar file, I can unpack it on Linux (Ubuntu 10.10) with either the CLI tar/bzip2 programs or the GUI archive manager just fine, with no errors or warnings. But with either 7zip itself or Peazip (on Windows), this happens: the tar file gets extracted from the tar.bz2 file succesfully, but when trying to extract the files from within the tar archive, 7zip fails and the error message
"Windows cannot open this file" is produced at around 30-40% on the second pass. I tested this with different 7zip versions, including the latest 9.18.
Now the tar.bz2 file in question is a virus collection, and is 4.07GB big, so if you like I can do all the testing you want, eg. running a debug version of 7zip and send you the logs. Or if you want the file for testing yourself, just let me know where I can upload it (I assume Sourceforge doesn't allow attachments of that size). For the record, I have tested other .tar.bz2 files, but those all worked fine, so this is really the only file I have that triggers this bug. (And yes, AV was disabled during my tests on Windows, in case you're wondering).
If you need any more information from me, or want me to run some tests, let me know. I will also notify the PeaZip developer of this bug report.
1) Use version 9.18 in your tests.
2) Try to reduce size of that TAR file. If you can delete files from that .TAR with some program, try to delete some big files, but check with 7-zip that you don't remove error thing.
3) Compress TAR file to .7z format with big dictionary and upload to some site.
You can write the link to me via e-mail, if you don't want to show thatfile.
1) Use version 9.18 in your tests.
Am doing this, as noted above.
2) Try to reduce size of that TAR file. If you can delete files from that
.TAR with some program, try to delete some big files, but check with 7-zip
that you don't remove error thing.
The tar file contains just a lot of small files, so I deleted (w/Linux tar) a few thousand of them to bring the file size to just under 4GB (from over 7GB), but now when I try to open the tar file in Windows, I see only 1 file in there?? Does 7zip not handle "modified" tarfiles?
3) Compress TAR file to .7z format with big dictionary and upload to some
site.
I can't find a site that will allow me to upload files of this size (without paying for a subscription), if you have a site where I can upload it, just send me the link. Otherwise I'm afraid this will take a long time, dual-booting each time between Windows and Linux, and handling these large tarfiles takes some time as well.
-- The tar file contains just a lot of small files, so I deleted (w/Linux
tar) a few thousand of them to bring the file size to just under 4GB (from
over 7GB), but now when I try to open the tar file in Windows, I see only 1
file in there?? Does 7zip not handle "modified" tarfiles?
Let's solve this problem at first.
Delete more files.
Probably you can get small "bad" TAR archive.
Maybe I didn't make myself clear, but what happens is: as soon as I delete any files from the original tarfile (with "tar --delete -vf tarfile.tar somefile" under Linux), the resulting tarfile becomes unreadable for 7zip.
I just performed the following test:
In Linux:
- copy original.tar to copy.tar
- remove single file from tar ("tar --delete -vf original.tar first_file_inside_tar")
- copy copy.tar back to NTFS partition, verify both files are exact match
In Windows, using 7za 9.18:
with "original minus one" file:
C> 7za.exe l -slt d:\copy.tar
Error: d:\copy.tar: Can not open file as archive
Errors: 1
with "original minus several thousand files" (see previous comment):
C> 7za.exe l -slt d:\copy_smaller.tar
Listing archive: d:\copy_smaller.tar
Path = d:\copy_smaller.tar
Type = zip
Physical Size = 3671
Offset = 2748462
----------
Path = [Content_Types].xml
Folder = -
Size = 486
Packed Size = 235
Modified = 2006-03-31 15:59:26
Created =
Accessed =
Attributes = .....
Encrypted = -
Comment =
CRC = EBDBBA5D
Method = Deflate
Host OS = FAT
Version = 20
Path = _rels\.rels
Folder = -
Size = 295
Packed Size = 185
Modified = 2006-03-31 15:59:26
Created =
Accessed =
Attributes = .....
Encrypted = -
Comment =
CRC = D4826D15
Method = Deflate
Host OS = FAT
Version = 20
Path = theme\theme\themeManager.xml
Folder = -
Size = 0
Packed Size = 2
Modified = 2006-03-31 15:59:26
Created =
Accessed =
Attributes = .....
Encrypted = -
Comment =
CRC = 00000000
Method = Deflate
Host OS = FAT
Version = 20
Path = theme\theme\theme1.xml
Folder = -
Size = 7032
Packed Size = 1398
Modified = 2006-03-31 15:59:26
Created =
Accessed =
Attributes = .....
Encrypted = -
Comment =
CRC = EF3AB3C1
Method = Deflate
Host OS = FAT
Version = 20
Path = theme\theme\_rels\themeManager.xml.rels
Folder = -
Size = 268
Packed Size = 171
Modified = 2006-03-31 15:59:26
Created =
Accessed =
Attributes = .....
Encrypted = -
Comment =
CRC = 202B1662
Method = Deflate
Host OS = FAT
Version = 20
As you can see, it gets misidentified as a zip instead of a tar, the size is wrong, and the files listed here are not in the tarfile.
So, in conclusion:
- If I remove one file from the tar, it becomes unreadable for 7zip.
- If I remove more files from the tar, 7zip reads it incorrectly.
So removing files isn't gonna work here, because it never leaves us with a file that 7zip can handle.
Wouldn't it be possible for you to send me a 7zip executable with debug info, with all logging on, so that I could get more diagnostics? Especially the second test case above suggests to me there is something wrong with even identifying tarfiles in 7zip, so it's not just a case of the tar being too big or containing too many files as I originally thought.
When 7-zip can't open file as .tar, it tries another formats.
You can use the following command:
7za.exe l d:\copy.tar -ttar
Try to get small .tar file (remove most of files from original archive). that can not be open by 7-zip.
Compress that small .tar to .7z and upload gete.
I tried to delete all but one file for the original tar, but then the resulting tar _is_ readable by 7zip, so apparently the "sweet spot" lies anywhere from 10KB to 7GB, and I can't think of a method to determine this, apart from just trial and error. I don't have the time (or the inclination) to do this, and I've talked to the PeaZip dev about it, but apart from sending you the entire file (which is a problem because of the size) there doesn't seem to be a constructive way forward here.
So you can close this bug, I'm sorry for wasting your time.