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

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

Open
parona-source opened this issue Jan 1, 2024 · 1 comment

Comments

@parona-source
Copy link

parona-source commented Jan 1, 2024

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
@mgorny
Copy link

mgorny commented Mar 25, 2024

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.

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

No branches or pull requests

2 participants