Created attachment 457282 [details] emerge --info '=dev-lang/perl-5.22.3_rc4::gentoo' output I run gentoo on a very old machine (emerge-info). Today the upgrade of perl to 5.22.4-RC4 failed with: xz: /home/gentoo/tmp/portage/dev-lang/perl-5.22.3_rc4/distdir/perl-5.22.3-RC4-patches-1.tar.xz: Cannot allocate memory Checking to see how much memory was required I get 513MiB: $ unxz --memlimit-decompress=1MiB perl-5.22.3-RC4-patches-1.tar.xz unxz: perl-5.22.3-RC4-patches-1.tar.xz: Memory usage limit reached unxz: 513 MiB of memory is required. The limit is 1 MiB. which seems a bit excessive for a file that uncompresses to 100k $ xz -l perl-5.22.3-RC4-patches-1.tar.xz Strms Blocks Compressed Uncompressed Ratio Check Filename 1 1 22.8 KiB 100.0 KiB 0.228 SHA-256 perl-5.22.3-RC4-patches-1.tar.xz I uncompress the file on another machine and recompressed using the installed xz (app-arch/xz-utils-5.2.2). With xz -e -9 -C sha256 I get a file of the same size but it only need 65MiB to decompress which is the figure given in the man page. So something weird has happened with this file or the way it was compressed.
Created attachment 457284 [details] build.log
Found the problem - the file was compressed with --lzma2=dict=512MiB Why?
It inherited my defaults I use for other, much larger things from ENV unfortunately. Have set up a build script now so this mistake won't happen again, and sets a more frugal decompression limit of 1MB. ( which is still very generous considering how small these patches are :) )
commit 2c1ec464e1c6d2d13c63715a34f8e0401c73a4fd Author: Kent Fredric <kentnl@gentoo.org> Date: Tue Dec 27 04:20:27 2016 +1300 dev-lang/perl: Use more frugal decompression limits re bug #603578 In my user ENV I have some very expensive and large limits defined which leaked through into the release process. This commit ships re-generated tar.xz's with a more frugal memory limit of 1MB, which is *heaps* for this. Thanks to Mark Davies for reporting. Bug: https://bugs.gentoo.org/603578