Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSAR enters infinite loop on RAR v2 archive #111

Open
kyeastmood opened this issue Jan 20, 2020 · 5 comments
Open

LSAR enters infinite loop on RAR v2 archive #111

kyeastmood opened this issue Jan 20, 2020 · 5 comments
Labels
question Further information is requested

Comments

@kyeastmood
Copy link

kyeastmood commented Jan 20, 2020

When LSAR is invoked with "-L" option it enters an infinite loop on some RAR archives.
This doesn't happen without "-L" parameter.'
Version: 1.10.1/Debian
Here's a link to such an archive (valid for 30 days):
https://0x0.st/zC8M.rar

@PaulTaykalo
Copy link
Collaborator

thanks for pointing this out. will take a look what can be done.
P.S. big kudos for providing example archive

@kyeastmood
Copy link
Author

OK, thanks!

@PaulTaykalo
Copy link
Collaborator

This is likely a duplicate.
https://github.com/MacPaw/XADMaster/pull/82/files

The issue is that there's a SOLID archive and it shown in a reference of 'Internal solid identifier'
since there are a lot of files(1546) in one big chunk.

For each file in this chunk there'll be reference to 'Internal solid identifier' which will print the whole information about this chunk

-Part 1
-Internal solid identifier [Part1,Part2,Part3,Part4]
-Part 2
-Internal solid identifier [Part1,Part2,Part3,Part4]
-Part 3
-Internal solid identifier [Part1,Part2,Part3,Part4]
-Part 4
-Internal solid identifier [Part1,Part2,Part3,Part4]

This output explodes for huge number of files in the solid archive. The total output in this example will be approximately 640Kb * 1564 files ~ 1GB. You'll just need to wait

unar -L~/Downloads/zC8M.rar > ~/Desktop/result.txt  636.56s user 6.82s system 98% cpu 10:53.40 total
944M	~/Desktop/result.txt

Previous solution was to add additional flag for removing 'Internal solid identifier' information from the output. If this option works in your case, I suggest adding an additional flag for this case as well.

@PaulTaykalo PaulTaykalo added the question Further information is requested label Jan 21, 2020
@kyeastmood
Copy link
Author

I cannot currently check this command-line parameters because they are not available yet in my version:

$ lsar
lsar v1.10.1, a tool for listing the contents of archive files.
Usage: lsar [options] archive [files ...]

Available options:
-long (-l)                      Print more information about each file in the archive.
-verylong (-L)                  Print all available information about each file in the archive.
-test (-t)                      Test the integrity of the files in the archive, if possible.
-password (-p) <string>         The password to use for decrypting protected archives.
-encoding (-e) <encoding name>  The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the encoding used. Use "help" or "list" as the argument to give a listing of
                                all supported encodings.
-password-encoding (-E) <name>  The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the -encoding option or the auto-detected encoding is used.
-print-encoding (-pe)           Print the auto-detected encoding and the confidence factor after the file list
-indexes (-i)                   Instead of specifying the files to list as filenames or wildcard patterns, specify them as indexes.
-json (-j)                      Print the listing in JSON format.
-json-ascii (-ja)               Print the listing in JSON format, encoded as pure ASCII text.
-no-recursion (-nr)             Do not attempt to list archives contained in other archives. For instance, when unpacking a .tar.gz file, only list the .gz file and not its contents.
-help (-h)                      Display this information.
-version (-v)                   Print version and exit.

However this is probably a good solution. May I only request a separate switch that works with plain output format (-L) and not with json output? It seems that when -json flag is set, listing errors are not printed and password prompt doesn't work. And even if errors were printed, they would end up inside json object that contains archive items (unless printed to error stream).
Thanks

@mirh
Copy link

mirh commented May 29, 2024

I think this is generally a problem with rar files, or maybe extracting too many files (possibly with a too long path) at once.
Whereas 7-zip is done in just a few seconds, unar cannot be done even after a hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants