ckolivas / lrzip

Long Range Zip

Home Page:http://lrzip.kolivas.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Unable to allocate enough memory for operation" on x86 when 10 threads are used.

parona-source opened this issue · comments

This only occurs when running an x86 environment in a chroot as there aren't any x86 cpus with that many threads.

x86-test ~ # lrzip  --version
lrzip version 0.651
x86-test ~ # touch t.txt
x86-test ~ # lrzip -o t.txt.lrz t.txt
Warning, low memory for chosen compression settings
Unable to allocate enough memory for operation
Failed to open streams in rzip_chunk
Fatal error - exiting
x86-test ~ # lrzip -p 10 -o t.txt.lrz t.txt
Warning, low memory for chosen compression settings
Unable to allocate enough memory for operation
Failed to open streams in rzip_chunk
Fatal error - exiting
x86-test ~ # lrzip -p 9 -o t.txt.lrz t.txt
Warning, low memory for chosen compression settings
t.txt - Compression Ratio: 0.000. Average Compression Speed:  0.000MB/s.
Total time: 00:00:00.01

https://bugs.gentoo.org/916317

Edit:

To clarify this is not a zero-length file issue.

x86-test ~ # du -sh cmake-3.27.9.tar
66M     cmake-3.27.9.tar
x86-test ~ # lrzip cmake-3.27.9.tar 
Output filename is: cmake-3.27.9.tar.lrz
Warning, low memory for chosen compression settings
Unable to allocate enough memory for operation
Failed to open streams in rzip_chunk
Fatal error - exiting
x86-test ~ # lrzip -p 9 cmake-3.27.9.tar 
Output filename is: cmake-3.27.9.tar.lrz
Warning, low memory for chosen compression settings
cmake-3.27.9.tar - Compression Ratio: 8.599. Average Compression Speed:  8.125MB/s.
Total time: 00:00:07.51

This also breaks libarchive, since it calls lrzip with no parameters, and therefore default thread count is used. And it affects all 32-bit architectures.