From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BAE1D138010 for ; Wed, 22 Aug 2012 19:08:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5F79E0507; Wed, 22 Aug 2012 19:08:10 +0000 (UTC) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id CA9E2E0539 for ; Wed, 22 Aug 2012 19:05:39 +0000 (UTC) Received: by bkwj4 with SMTP id j4so465211bkw.40 for ; Wed, 22 Aug 2012 12:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=u+njUK7UgPpDvyKUwEOm3zienCxpMS3vezss+TTEN8Y=; b=tkC4T/2JdvyQa3JcFTQJMA3SvbKHArQaPDY8fns7JnUjgR4F/UpfuNNp59VGi2ZEMH V2W14Ryh/Ats4yyEQg1dvYC2LPo2hWO/Xi/vLDaxeTfeNSBtVv575hQ2KASF0kAH7QaA I+WDhFowHD2S8tbvllBfBzhxqudgrHGL97WtzQlKCT4d0IEtn0iy8rau+bnhmOEBw4K/ 00JQlArGKs9xetADyi7tuntblFM5LUXYBGIzfopGnCSxwPAvvMa0aiS0eQ4HvpnLDnRp rPoGd2/q8/4XvJrV4tgfOEQ1N7wvtJ+SUMihwvjjsAjt3CKVS8srjU49OT3x6iWI/0z/ 6wfg== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.204.148.78 with SMTP id o14mr6840744bkv.38.1345662338796; Wed, 22 Aug 2012 12:05:38 -0700 (PDT) Received: by 10.205.25.8 with HTTP; Wed, 22 Aug 2012 12:05:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 22 Aug 2012 15:05:38 -0400 Message-ID: Subject: Re: [gentoo-user] xz memory hungry? From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 04af54f7-61af-4382-b4f2-a7cb0692be0a X-Archives-Hash: 9f97396ffca3bf1aa1fd7e6ed6653bae On Wed, Aug 22, 2012 at 2:52 PM, Jorge Almeida wrote: > # tar -xJvf /usr/portage/distfiles/m4-1.4.16.tar.xz > xz: (stdin): Cannot allocate memory > tar: Child returned status 1 > tar: Error is not recoverable: exiting now > > The box has 2G ram + 1G swap. I'm installing Gentoo from an existing dist= ro. > Emerging fails on m4. tar xJvf fails both from within the chroot and from= the > host system. top shows that nothing is using any amount of memory worth > mentioning. Extracting libtool-2.4.tar.xz works. I can extract > m4-1.4.16.tar.xz in a computer with 4G ram. This is ridiculous. Not gento= o > related, except that I have no choice, as m4 is pulled by other packages. > What to do? > > app-arch/xz-utils-5.0.3 in chroot > xz 5.0.4 in host system (Archlinux) How much do you have free? From xz's manpage: Memory usage The memory usage of xz varies from a few hundred kilobytes to several gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decompressor. Typically the decompressor needs 5 % to 20 % of the amount of memory that the compressor needed when creating the file. For example, decompressing a file created with xz -9 currently requires 65 MiB of memory. Still, it is possible to have .xz files that require several giga=E2=80=90 bytes of memory to decompress. Three things come to mind: 1) You may not have enough memory free 2) There may be a bug (either compile/link-induced or code-induced) in the copy of xz you're using 3) Upstream used some insane settings, causing a massive increase in the amount of RAM required to decompress that stream. You could download the .tar.xz file, decompress it on a different box, and then recompress it with lighter settings. unxz filename.tar.xz xz -1 filename.tar --=20 :wq