Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 236491 - emerge @preserved-rebuild and then !!! [Errno 12] Cannot allocate memory None
Summary: emerge @preserved-rebuild and then !!! [Errno 12] Cannot allocate memory None
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 3 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 240320 preserve-libs
  Show dependency tree
 
Reported: 2008-09-02 20:21 UTC by Erol Mutlu
Modified: 2011-02-18 15:06 UTC (History)
8 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 Erol Mutlu 2008-09-02 20:21:29 UTC
whene i run emerge @preserved-ebuild ihave error and cant rebuild libs


 emerge @preserved-rebuild
WARNING: repository at /usr/local/portage/layman/zugaina is missing a repo_name entry
Calculating dependencies /

!!! Problem in 'media-gfx/gimp:2' dependencies.
!!! [Errno 12] Cannot allocate memory None
Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 13662, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 12651, in action_build
    retval, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5034, in select_files
    myroot, atom, onlydeps=onlydeps)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5282, in _select_pkg_highest_available
    ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5329, in _select_pkg_highest_available_imp
    cpv_list = db.xmatch("match-all", atom)
  File "/usr/lib64/portage/pym/portage/dbapi/porttree.py", line 757, in xmatch
    myval = list(self._iter_match(mydep, self.cp_list(mykey)))
  File "/usr/lib64/portage/pym/portage/dbapi/__init__.py", line 139, in _iter_match_slot
    if self.aux_get(cpv, ["SLOT"])[0] == atom.slot:
  File "/usr/lib64/portage/pym/portage/dbapi/porttree.py", line 414, in aux_get
    dbkey=mydata, tree="porttree", mydbapi=self)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 5262, in doebuild
    fd_pipes=fd_pipes, returnpid=True, droppriv=droppriv)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 3110, in spawn
    mypids.extend(spawn_func(mystring, env=env, **keywords))
  File "/usr/lib64/portage/pym/portage/process.py", line 66, in spawn_sandbox
    return spawn(args, opt_name=opt_name, **keywords)
  File "/usr/lib64/portage/pym/portage/process.py", line 219, in spawn
    pid = os.fork()
OSError: [Errno 12] Cannot allocate memory


 emerge --info
WARNING: repository at /usr/local/portage/layman/zugaina is missing a repo_name entry
Portage 2.2_rc8 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-rc3-git6 x86_64)
=================================================================
System uname: Linux-2.6.26-rc3-git6-x86_64-Intel-R-_Core-TM-2_CPU_6300_@_1.86GHz-with-glibc2.2.5
Timestamp of tree: Tue, 02 Sep 2008 18:36:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r6, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     9999-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1, 9999
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ia64 x86 ~amd64 ~ia64 ~x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/zugaina /usr/local/portage/layman/vdr-devel /usr/local/portage/layman/xen /usr/local/portage/layman/x11 /usr/local/portage/layman/sabayon /usr/local/portage/layman/java-overlay /usr/local/portage/layman/java-gcj-overlay /usr/local/portage/layman/erol"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl aio alsa amd64 apache2 ares arts authdaemond avi berkdb bigpatch bitmap-fonts bzip2 cairo cdparanoia cdr cli cmdsubmenu cpudetection cracklib crypt ctype cups curl dbus directv divx djbfft dri dts dvb dvbplayer dvbsetup dvd dvdr dvdread dvlvidprefer eds emb encode esd fam ffmpeg firefox fortran ftp fuse gdbm gif gmedia gnome gpm gstreamer gtk gtk2 hal httpd iconv imap imlib ipf-transparent iptv ipv6 isdnlog java java6 jpeg kde ldap libg++ lnbshare logrotate mad mainmenuhooks midi mikmod mjpeg mmx mng mp3 mp4 mpeg mplayer msn mudflap multilib mysql nautilus ncurses network nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf pdflib perl pf-transparent php png posix ppds pppd python qt3support qt4 quicktime readline realmedia reflection samba sasl sdl session setup-plugin shout spell spl sse sse2 ssl stream submenu subtitles svg swscaler syncearly sysfs tcpd threads tiff tk truetype truetype-fonts type1-fonts udev unicode v4l v4l2 vcd vdr vnc vorbis wmp wxwindows x264 xinerama xml xorg xv xvid xvmc yaepg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nvidia mesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always
Comment 1 Zac Medico gentoo-dev 2008-09-02 21:45:01 UTC
The traceback looks similar to bug 228075 but I'm not sure what might be triggering it in your case. How many packages do you have installed? This command will tell us:

portageq match / "" | wc -l
Comment 2 Erol Mutlu 2008-09-04 18:37:11 UTC
(In reply to comment #1)
> The traceback looks similar to bug 228075 but I'm not sure what might be
> triggering it in your case. How many packages do you have installed? This
> command will tell us:
> 
> portageq match / "" | wc -l
> 

1354
Comment 3 Jörg Eitemüller 2008-11-17 15:45:28 UTC
I can confirm this bug, here are infos about my system and the number of packages installed:

# emerge @preserved-rebuild
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 4) dev-python/pyclamav-0.4.1
Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 14212, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 13256, in action_build
    retval = mergetask.merge()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 9642, in merge
    rval = self._merge()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 9884, in _merge
    self._main_loop()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 10010, in _main_loop
    while self._schedule():
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 8503, in _schedule
    return self._schedule_tasks()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 10031, in _schedule_tasks
    if q.schedule():
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 8395, in schedule
    task.start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 1647, in start
    self._start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 3595, in _start
    self._start_task(build, self._default_final_exit)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 1935, in _start_task
    task.start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 1647, in start
    self._start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 2488, in _start
    self._prefetch_exit(prefetcher)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 2511, in _prefetch_exit
    self._start_task(fetcher, self._fetch_exit)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 1935, in _start_task
    task.start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 1647, in start
    self._start()
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 2309, in _start
    SpawnProcess._start(self)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 2114, in _start
    master_fd, slave_fd = self._pipe(fd_pipes)
  File "//usr/lib/portage/pym/_emerge/__init__.py", line 2320, in _pipe
    portage._create_pty_or_pipe(copy_term_size=stdout_pipe)
  File "//usr/lib/portage/pym/portage/__init__.py", line 2998, in _create_pty_or_pipe
    set_term_size(rows, columns, slave_fd)
  File "//usr/lib/portage/pym/portage/output.py", line 413, in set_term_size
    spawn(cmd, env=os.environ, fd_pipes={0:fd})
  File "//usr/lib/portage/pym/portage/process.py", line 220, in spawn
    pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

# cat /proc/meminfo |head -n2
MemTotal:       741152 kB
MemFree:        478688 kB

# emerge --info
Portage 2.2_rc14 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.24-hardened-r2 i686)
=================================================================
System uname: Linux-2.6.24-hardened-r2-i686-AMD_Duron-tm-with-glibc2.0
Timestamp of tree: Mon, 17 Nov 2008 01:16:01 +0000
distcc 3.0 i686-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r6, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks elog parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
LINGUAS="de en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/webapps-experimental"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl aim apache2 bash-completion bcmath berkdb bitmap-fonts bzip2 cgi cli cracklib crypt cups curl curlwrappers dbus dri exif fastcgi fortran ftp gd gdbm gif gpm iconv icq imagemagick imap ipv6 isdnlog jabber java jpeg libwww logrotate memlimit midi mime mp3 msn mudflap mysql mysqli ncurses nls nptl nptlonly openmp oscar pam pcre pdf perl php png posix postgres pppd python readline reflection ruby samba server session sockets socks5 spl sqlite ssl svg tcl tcltk tcpd tokenizer truetype truetype-fonts type1-fonts unicode usb v4l x86 xml xorg yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1      emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m    maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FRITZCAPI_CARDS="fcusb2" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel        mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage   siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware      voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

# portageq match / "" | wc -l
579
Comment 4 Martin Doucha 2009-08-30 23:24:39 UTC
I can confirm the bug. Emerge starts @preserved-rebuild by allocating over 400MB of memory and keeps it allocated throughout the installation. I have 1GB of RAM and 512MB of swap so I'm fine unless emerge tries to install something memory hungry (e.g. dev-libs/boost) but systems with less RAM will run into trouble.

I have absolutely no idea what kind of data you keep in that memory once the dependency tree is computed but I'm quite sure you don't need most of it anymore.

portageq match / "" | wc -l
1466

emerge --info
Portage 2.2_rc40 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.10.1-r0, 2.6.30-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r5-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-gentoo-2.0.1
Timestamp of tree: Sun, 30 Aug 2009 13:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 1.3.7-r1, 2.1.9
dev-lang/python:     2.4.6, 2.5.4-r3, 2.6.2-r1, 3.1.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="cs_CZ.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="cs en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=300"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa bash-completion branding bzip2 cairo cdparanoia cdr cjk cli cpudetection cracklib crypt cups curl dbus dri dts dvd dvdr dvdread emboss encode evo fam fbcon ffmpeg flac gdbm gif gnutls gpm gstreamer gtk hal iconv ieee1394 isdnlog java javascript jpeg jpeg2k kde laptop libnotify lm_sensors logrotate mad mikmod mmx mmxext mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtc sdl session spell spl sse sse2 ssl startup-notification svg svga sysfs tcpd tga theora thunar tiff truetype unicode usb vcd vorbis wifi win32codecs x264 x86 xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs en" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
Comment 5 Brian Beardall 2009-09-13 21:04:08 UTC
I'm affected by this bug too. Both emerge --depclean, and emerge @preserved-rebuild can't complete with an AMD64. Python was using up to 1.6G of virtual and 400M of Resident. At peak resident Python was allocated 800M of resident which is way to much. I don't want to spend the time to individually emerge each of the packages in the @preserved-rebuild set. Another system which is x86 can't complete either because of memory constraints.
Comment 6 brho 2009-11-09 18:25:39 UTC
Is there a way to turn off the @preserved-rebuild check at the end of every emerge?  While that won't solve the problem, at the very least I'll be able to emerge simple things without having to watch the console and ^C before the memory-hogging checks take over.
Comment 7 Zac Medico gentoo-dev 2009-11-09 21:06:00 UTC
(In reply to comment #6)
> Is there a way to turn off the @preserved-rebuild check at the end of every
> emerge?  While that won't solve the problem, at the very least I'll be able to
> emerge simple things without having to watch the console and ^C before the
> memory-hogging checks take over.

I guess we can add a --quiet-preserve-libs option to prevent it from looking up the owners of the files. I already does this with --quiet.
Comment 8 brho 2009-11-11 22:38:19 UTC
> I guess we can add a --quiet-preserve-libs option to prevent it from looking up
> the owners of the files. I already does this with --quiet.

oh, in that case, i'll just use --quiet til the main problem gets fixed.  no need for a separate option.  thanks for the tip.
Comment 9 Ortwin Glueck 2010-12-08 15:28:12 UTC
Same problem here. A simple:
emerge -1 gentoo-sources
would eat up all memory on a 512MB machine that has no swap. This occurs while installing from the sandbox image into the live filesystem.

The author of emerge apparently assumed infinite memory :-)
Comment 10 Zac Medico gentoo-dev 2010-12-08 16:15:19 UTC
(In reply to comment #9)
> Same problem here. A simple:
> emerge -1 gentoo-sources

If gentoo-sources triggers it, then that sounds more like bug 346749 than this bug which refers to @preserved-rebuild (a completely different operation).
Comment 11 Zac Medico gentoo-dev 2011-02-18 15:06:48 UTC
This should be fixed since 2.2_rc68 by the following change:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c4fdf0e53398e4917c64901da626ced4c6357010