Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293580 - sys-devel/libtool-2.2.6b can't extract sources with <=160M physical memory
Summary: sys-devel/libtool-2.2.6b can't extract sources with <=160M physical memory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 303975
Blocks:
  Show dependency tree
 
Reported: 2009-11-18 05:55 UTC by Ben Kohler
Modified: 2010-06-05 18:57 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2009-11-18 05:55:19 UTC
Another one of these--

Since lzma has a hard memory limit of 40% of physical memory, and
libtool-2.2.6b.tar.lzma needs 65M to extract, users with <162.5M physical memory
can't unpack it.

Nearly identical scenario to bug #284602, dropping from -9 to -6 fixed it there
(without a noticeable change to the tarball size).


Reproducible: Always

Steps to Reproduce:
1.  hop on an old machine with 128M ram or so
2.  emerge =sys-devel/libtool-2.2.6b
Actual Results:  
>>> Unpacking source...
>>> Unpacking libtool-2.2.6b.tar.lzma to /var/tmp/portage/sys-devel/libtool-2.2.6b/work
lzma: /var/tmp/portage/sys-devel/libtool-2.2.6b/distdir/libtool-2.2.6b.tar.lzma: Memory usage limit reached
lzma: Limit was 45 MiB, but 65 MiB would have been needed
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
 * ERROR: sys-devel/libtool-2.2.6b failed:
 *   failure unpacking libtool-2.2.6b.tar.lzma

Expected Results:  
Unpacked and installed
Comment 1 Ben Kohler gentoo-dev 2009-11-18 06:43:04 UTC
Here's a temp workaround by the way--

XZ_OPT="--memory=128M" emerge -1 libtool

Should this be reported somewhere else? Or is this not a problem for enough people to matter?  Seems like there are going to be more and more packages that just won't extract on lower-memory systems without special options passed to xz/lzma.
Comment 2 matt 2010-01-31 20:18:15 UTC
i have an ancient pentium without mmx, 64 MB of ram, and 512 MB of swap, i did not notice any problem with libtool.

p5hx ~ # eix -sI libtool
[I] sys-devel/libtool
     Available versions:  
        (1.3)   1.3.5
        (1.5)   1.5.26 ~1.5.26-r1 2.2.6a 2.2.6b **9999
        {test vanilla}
     Installed versions:  2.2.6b(1.5)(18:11:36 01/12/10)(-test -vanilla)
     Homepage:            http://www.gnu.org/software/libtool/
     Description:         A shared library tool for developers

Comment 3 Ben Kohler gentoo-dev 2010-02-01 04:47:51 UTC
I just did a fresh x86 install on a virtualbox VM with 128M ram allocated, and libtool-2.2.6b (already installed on current stage3) fails to rebuild.  Same error.

First machine I noticed it on was sparc w/ 128M.
Comment 4 Gene 2010-02-15 11:27:39 UTC
(In reply to comment #2)
> i have an ancient pentium without mmx, 64 MB of ram, and 512 MB of swap, i did
> not notice any problem with libtool.

Of course you didn't have a problem, having 512 MB of swap your total virtual memory is more than adequate for this. This problem affects users of virtualized environments (e.g. VPS) who can't add any swap. My VPS package gives me 128 Mb, no more, and this stupid lzma behavior gives me trouble mentioned in this bug report.

XZ_OPT="--memory=128M" emerge -1 libtool 
This indeed helped, however the bug should be fixed.
Comment 5 Ben Kohler gentoo-dev 2010-02-15 19:05:57 UTC
Even with 1G swap, my sparc w/ 128M ram fails.  Quote from the lzma man page:

       To  prevent uncomfortable surprises caused by huge memory usage, xz has
       a built-in memory usage limiter. The default limit is  40  %  of  total
       physical  RAM. While operating systems provide ways to limit the memory
       usage of processes, relying on it wasn't deemed to be flexible enough.
Comment 6 Gene 2010-02-15 20:19:09 UTC
>        To  prevent uncomfortable surprises caused by huge memory usage, xz has
>        a built-in memory usage limiter. The default limit is  40  %  of  total
>        physical  RAM. While operating systems provide ways to limit the memory
>        usage of processes, relying on it wasn't deemed to be flexible enough.

I don't know what to say here... whoever had this idea is out of his fucking mind! This is totally Windoze mentality. There is ulimit to limit memory usage. Makes absolutely no sense to enforce something like this in the software. Software should humbly execute the almighty user's commands, this is UNIX mentality. The user is wise and will limit the commands resources usage if necessary, himself. Software doesn't have to think for the user, it should obey and don't mess around. Just venting...
Comment 7 Giczi Levente 2010-03-11 03:07:50 UTC
Still exist on my P3 with 128MB RAM and 256MB swap. Need to fix it.
Comment 8 Boney McCracker 2010-04-17 20:32:15 UTC
For a more persistent temporary work-around, one may conditionally export it from /etc/portage/bashrc (which is, I believe, officially unsupported):

[ $PN="libtool" ] && export XZ_OPT="--memory=70M"
Comment 9 Ben Kohler gentoo-dev 2010-05-26 14:16:49 UTC
Looks like sys-devel/libtool-2.2.7b isn't packed quite so hard, needs 33M to unpack and so systems with 83M or more physical RAM will succeed.  As long as the memory limit is this low (low enough for me, maybe not everyone), I think the only real outstanding BUG here is with xz-utils.
Comment 10 SpanKY gentoo-dev 2010-06-05 18:57:12 UTC
nothing to do with libtool now that Bug 303975 is done