Bug 348118 - KXzFilter broken for some large archives
Summary: KXzFilter broken for some large archives
Status: REPORTED
Alias: None
Product: frameworks-karchive
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 22:14 UTC by Ragnar Thomsen
Modified: 2021-03-09 05:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ragnar Thomsen 2015-05-22 22:14:15 UTC
It appears the Xz filter in KArchive is broken (using KF 5.10.0). When opening or extracting large xz-compressed tar-archives with Ark (current frameworks branch) not all files are extracted.

I tested this with linux kernel source v3.12, which contains 44,587 files. Only 23,450 files are extracted by Ark using the karchive plugin. Extracting the corresponding gz- and bz2-compressed tarball works correctly.

When compiling KArchive in debug mode, I get an assertion failure in line 694 in karchive.cpp when this happens:
Q_ASSERT(n == currentChunkSize);
Comment 1 Ragnar Thomsen 2015-05-23 08:40:23 UTC
I inserted some qDebug statements to see at which file in the archive the assertion failure occurs. For the linux-3.12 source, it always happens when extracting the file:
drivers/media/dvb-frontends/s5h1411.c

When opening this file in a text editor I can see that it is truncated, although not always at the same position.

I've tried extracting other kernel source versions and the assertion failure occurs when extracting different files, but always the same for the same archive.
Comment 2 Ragnar Thomsen 2015-05-23 11:35:20 UTC
Have investigated this further. Tried extracting the xz-compressed tarball of the Qt-5.4.1 source (which is much larger than the kernel-3.12 source, 278MB and 75MB, respectively). This was possible without error, so this issue might be specific to some kernel source archives.

Tried decompressing linux-3.12.tar.xz with xz (v5.2.1) and re-compressing it. The re-compressed archive opened/extracted without issues in Ark using karchive plugin.

Tested the kernel source archive using xz -t, which could not detect any issues with the archive.
Comment 3 David Faure 2015-10-04 09:42:49 UTC
Do you have a link to the problematic xz archive, so I can be sure we're not testing something slightly different?
Comment 4 Ragnar Thomsen 2015-10-04 10:06:48 UTC
Here's the link to the linux kernel source v3.12:
https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.12.tar.xz
Comment 5 Justin Zobel 2021-03-09 05:54:03 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.