Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431496 - app-portage/gentoolkit-0.3.0.6-r3 - equery d -a uses 2 GB of memory
Summary: app-portage/gentoolkit-0.3.0.6-r3 - equery d -a uses 2 GB of memory
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 09:33 UTC by wbrana
Modified: 2022-07-10 16:22 UTC (History)
1 user (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 wbrana 2012-08-15 09:33:01 UTC
I crashes when equery uses 1.6 GB RAM, but system has 4 GB RAM.

equery d -a llvm

Traceback (most recent call last):
  File "/usr/lib64/python3.2/site-packages/gentoolkit/dependencies.py", line 241, in graph_reverse_depends
    all_depends = depcache[pkgdep]
KeyError: <Dependencies 'x11-libs/libqxt-9999'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/equery", line 38, in <module>
    equery.main(sys.argv)
  File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/__init__.py", line 354, in main
    loaded_module.main(module_args)
  File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/depends.py", line 199, in main
    printer_fn=dep_print
  File "/usr/lib64/python3.2/site-packages/gentoolkit/dependencies.py", line 243, in graph_reverse_depends
    all_depends = uniqify(pkgdep.get_all_depends())
  File "/usr/lib64/python3.2/site-packages/gentoolkit/dependencies.py", line 109, in get_all_depends
    return self.parser(' '.join(self.environment(env_vars)))
  File "/usr/lib64/python3.2/site-packages/gentoolkit/dependencies.py", line 72, in environment
    result = PORTDB.aux_get(self.cpv, envvars)
  File "/usr/lib64/portage/pym/portage/dbapi/porttree.py", line 453, in aux_get
    proc.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/EbuildMetadataPhase.py", line 105, in _start
    fd_pipes=fd_pipes, returnpid=True)
  File "/usr/lib64/portage/pym/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 684, in doebuild
    fd_pipes=fd_pipes, returnpid=returnpid)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 112, in _spawn_phase
    return _doebuild_spawn(phase, settings, actionmap=actionmap, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 106, in _doebuild_spawn
    return spawn(cmd, settings, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 1423, in spawn
    return spawn_func(mystring, env=mysettings.environ(), **keywords)
  File "/usr/lib64/portage/pym/portage/process.py", line 81, in spawn_bash
    return spawn(args, opt_name=opt_name, **keywords)
  File "/usr/lib64/portage/pym/portage/process.py", line 259, in spawn
    pid = os.fork()
  File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 12] Cannot allocate memory


Portage 2.1.11.10 (hardened/linux/amd64, gcc-4.7.2, glibc-2.14.1-r3, 3.5.1-2 x86_64)
=================================================================
System uname: Linux-3.5.1-2-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Wed, 15 Aug 2012 00:45:01 +0000
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.3
sys-devel/binutils:       2.22-r1, 2.22.90
sys-devel/gcc:            4.4.7, 4.5.4::x-portage, 4.6.4_pre9999::toolchain, 4.6.4::x-portage, 4.7.1, 4.7.2_pre9999::toolchain, 4.7.2::x-portage, 4.8.0_pre9999::toolchain
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo qt toolchain x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 ETQW RTCW-ETEULA googleearth AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -O3 -pipe -march=core2 -mtune=core2 -fomit-frame-pointer -funroll-loops --param max-unrolled-insns=64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -O3 -pipe -march=core2 -mtune=core2 -fomit-frame-pointer -funroll-loops --param max-unrolled-insns=64"
DISTDIR="/mnt/md3/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv webrsync-gpg"
FFLAGS="-O2 -O3 -pipe -march=core2 -mtune=core2 -fomit-frame-pointer -funroll-loops --param max-unrolled-insns=64"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu  -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/mnt/md3/cache/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/md3/cache"
PORTDIR="/mnt/md3/portage"
PORTDIR_OVERLAY="/var/lib/layman/qt /var/lib/layman/toolchain /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aio alsa amd64 amr apng berkdb bzip2 cairo caps chm cli consolekit cracklib crypt curl cxx dbus device-mapper dlz dri dts dvb eix enca exif extensions extras faad ffmpeg flac gcj gdbm glib glibc-omitfp glitz gnutls gold graphite gtk gudev handbook hardened iconv jit jpeg jpeg2k justify lcms lm_sensors logrotate lzma matroska mikmod minizip mmx mng modplug modules mp3 mpeg mudflap multilib multislot ncurses nodrm nptl nsplugin ogg openal opengl openmp pam pax_kernel pch pcntl pcre pcre16 pdf pic png pppd qt qt3support qt4 rar readline rtsp sandbox schroedinger session slang spell sqlite sqlite3 sse sse2 sse3 ssl ssse3 symlink theora threads tiff truetype unicode urandom usb userpriv v4l2 vlc vorbis vpx x264 xcb xcomposite xml xv xvid zlib" ALSA_CARDS="virtuoso" 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2012-08-15 14:40:56 UTC
I can confirm this with HEAD and portage-9999.  It nearly maxed 4G system memory to start swapping with equery hitting 1.6G memory usage.  (Ignore any intentional errors that it spits out like the missing digest one) 


brian@big_daddy ~ $ equery d -a llvm
 * These packages depend on llvm:
 * Missing digest for '/usr/local/portage/app-portage/some-package/some-package-0.6.0.ebuild'
dev-lang/ghc-7.0.4 (llvm ? sys-devel/llvm)
dev-lang/ghc-7.4.1 (llvm ? sys-devel/llvm)
dev-lang/ghc-7.4.1-r1 (llvm ? sys-devel/llvm)
dev-lang/ispc-1.2.2 (=sys-devel/llvm-3.0*)
dev-lang/ispc-1.3.0 (>=sys-devel/llvm-3.0)
dev-lang/ispc-9999 (>=sys-devel/llvm-3.0)
dev-lang/rubinius-1.2.4.20110705 (>=sys-devel/llvm-2.8)
dev-util/creduce-2.0.1 (sys-devel/llvm)
media-libs/mesa-7.10.3 (<sys-devel/llvm-3)
media-libs/mesa-7.11 (llvm ? <sys-devel/llvm-3)
media-libs/mesa-7.11.2 (llvm ? >=sys-devel/llvm-2.8)
media-libs/mesa-8.0.3 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.0.3-r1 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.0.4 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.1_rc1_pre20120724 (llvm ? >=sys-devel/llvm-2.9)
                                    (r600-llvm-compiler ? >=sys-devel/llvm-3.1)
                                    (video_cards_radeonsi ? >=sys-devel/llvm-3.1)
media-libs/opengtl-0.9.15.2 (<sys-devel/llvm-3.0)
media-libs/opengtl-0.9.16 (=sys-devel/llvm-3.0*)
media-libs/opengtl-0.9.17 (=sys-devel/llvm-3.1*)
sci-physics/root-9999 (llvm ? =sys-devel/llvm-9999)
sys-devel/binutils-apple-3.2.6 (lto ? sys-devel/llvm)
sys-devel/binutils-apple-4.2 (lto ? sys-devel/llvm)
sys-devel/binutils-apple-4.3 (lto ? sys-devel/llvm)
sys-devel/clang-2.8-r3 (~sys-devel/llvm-2.8[multitarget=])
sys-devel/clang-2.9-r1 (~sys-devel/llvm-2.9[multitarget=])
sys-devel/clang-3.0-r4 (~sys-devel/llvm-3.0[multitarget=])
sys-devel/clang-3.1-r1 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r2 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r4 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r5 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-9999 (~sys-devel/llvm-9999[multitarget=])
sys-devel/dragonegg-3.0 (~sys-devel/llvm-3.0)
sys-devel/dragonegg-3.1 (~sys-devel/llvm-3.1)
sys-devel/dragonegg-9999 (~sys-devel/llvm-9999)
www-plugins/lightspark-0.5.7 (>=sys-devel/llvm-3)
                             (=sys-devel/llvm-2.8*)
www-plugins/lightspark-0.6.0.1 (>=sys-devel/llvm-3)
                               (=sys-devel/llvm-2.8*)
Traceback (most recent call last):
  File "/usr/bin/equery", line 38, in <module>
    equery.main()
  File "/usr/lib64/python2.7/site-packages/gentoolkit/equery/__init__.py", line 354, in main
    loaded_module.main(module_args)
  File "/usr/lib64/python2.7/site-packages/gentoolkit/equery/depends.py", line 199, in main
    printer_fn=dep_print
  File "/usr/lib64/python2.7/site-packages/gentoolkit/dependencies.py", line 243, in graph_reverse_depends
    all_depends = uniqify(pkgdep.get_all_depends())
  File "/usr/lib64/python2.7/site-packages/gentoolkit/dependencies.py", line 109, in get_all_depends
    return self.parser(' '.join(self.environment(env_vars)))
  File "/usr/lib64/python2.7/site-packages/gentoolkit/dependencies.py", line 72, in environment
    result = PORTDB.aux_get(self.cpv, envvars)
  File "/usr/lib64/portage/pym/portage/dbapi/porttree.py", line 453, in aux_get
    proc.start()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/portage/pym/_emerge/EbuildMetadataPhase.py", line 105, in _start
    fd_pipes=fd_pipes, returnpid=True)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 683, in doebuild
    fd_pipes=fd_pipes, returnpid=returnpid)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 111, in _spawn_phase
    return _doebuild_spawn(phase, settings, actionmap=actionmap, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 105, in _doebuild_spawn
    return spawn(cmd, settings, **kwargs)
  File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 1422, in spawn
    return spawn_func(mystring, env=mysettings.environ(), **keywords)
  File "/usr/lib64/portage/pym/portage/process.py", line 90, in spawn_sandbox
    return spawn(args, opt_name=opt_name, **keywords)
  File "/usr/lib64/portage/pym/portage/process.py", line 259, in spawn
    pid = os.fork()
  File "/usr/lib64/portage/pym/portage/__init__.py", line 230, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 12] Cannot allocate memory
brian@big_daddy ~ $ equery --version
equery (9999-1ec0b2f81f2186c10411240a3b590c67dc341e1b) - Gentoo package query tool
brian@big_daddy ~ $ emerge --version
Portage 2.2.0_alpha120_p4 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.3, glibc-2.15-r2, 3.2.1-gentoo x86_64)
brian@big_daddy ~ $
Comment 2 Bernd Waibel 2012-08-26 14:38:12 UTC
It runs fine for me on an almost-all-stable, although equery uses up to 1.6 GB RAM, it doesn't throw an exception. I too have 4 GB RAM in my system.


bernd@artus /home/portage/portage $ equery d -a llvm
 * These packages depend on llvm:
dev-lang/ghc-7.0.4 (llvm ? sys-devel/llvm)
dev-lang/ghc-7.4.1 (llvm ? sys-devel/llvm)
dev-lang/ghc-7.4.1-r1 (llvm ? sys-devel/llvm)
dev-lang/ispc-1.2.2 (=sys-devel/llvm-3.0*)
dev-lang/ispc-1.3.0 (>=sys-devel/llvm-3.0)
dev-lang/ispc-9999 (>=sys-devel/llvm-3.0)
dev-lang/rubinius-1.2.4.20110705 (>=sys-devel/llvm-2.8)
dev-util/creduce-2.0.1 (sys-devel/llvm)
media-libs/mesa-7.10.3 (<sys-devel/llvm-3)
media-libs/mesa-7.11 (llvm ? <sys-devel/llvm-3)
media-libs/mesa-7.11.2 (llvm ? >=sys-devel/llvm-2.8)
media-libs/mesa-8.0.3 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.0.3-r1 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.0.4 (llvm ? >=sys-devel/llvm-2.9)
media-libs/mesa-8.1_rc1_pre20120724 (llvm ? >=sys-devel/llvm-2.9)
                                    (r600-llvm-compiler ? >=sys-devel/llvm-3.1)
                                    (video_cards_radeonsi ? >=sys-devel/llvm-3.1)
media-libs/mesa-8.1_rc1_pre20120814 (llvm ? >=sys-devel/llvm-2.9)
                                    (r600-llvm-compiler ? >=sys-devel/llvm-3.1)
                                    (video_cards_radeonsi ? >=sys-devel/llvm-3.1)
media-libs/opengtl-0.9.15.2 (<sys-devel/llvm-3.0)
media-libs/opengtl-0.9.16 (=sys-devel/llvm-3.0*)
media-libs/opengtl-0.9.17 (=sys-devel/llvm-3.1*)
sci-physics/root-9999 (llvm ? =sys-devel/llvm-9999)
sys-devel/binutils-apple-3.2.6 (lto ? sys-devel/llvm)
sys-devel/binutils-apple-4.2 (lto ? sys-devel/llvm)
sys-devel/binutils-apple-4.3 (lto ? sys-devel/llvm)
sys-devel/clang-2.8-r3 (~sys-devel/llvm-2.8[multitarget=])
sys-devel/clang-2.9-r1 (~sys-devel/llvm-2.9[multitarget=])
sys-devel/clang-3.0-r4 (~sys-devel/llvm-3.0[multitarget=])
sys-devel/clang-3.1-r1 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r2 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r4 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-3.1-r5 (~sys-devel/llvm-3.1[multitarget=])
sys-devel/clang-9999 (~sys-devel/llvm-9999[multitarget=])
sys-devel/dragonegg-3.0 (~sys-devel/llvm-3.0)
sys-devel/dragonegg-3.1 (~sys-devel/llvm-3.1)
sys-devel/dragonegg-9999 (~sys-devel/llvm-9999)
www-plugins/lightspark-0.5.7 (>=sys-devel/llvm-3)
                             (=sys-devel/llvm-2.8*)
www-plugins/lightspark-0.6.0.1 (>=sys-devel/llvm-3)
                               (=sys-devel/llvm-2.8*)
bernd@artus /home/portage/portage $ echo $?
0


bernd@artus /home/portage/portage $ emerge --info =gentoolkit-0.3.0.6-r3
Portage 2.1.11.9 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.4, glibc-2.15-r2, 3.3.8-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-AMD_Athlon-tm-_7850_Dual-Core_Processor-with-gentoo-2.1
Timestamp of tree: Sun, 26 Aug 2012 13:45:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo local science dotnet dweezil sunrise gentoo-guis java-overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @FREE @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ggdb --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/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"
CXXFLAGS="-O2 -pipe -march=native -ggdb --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
DISTDIR="/home/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdep y --complete-graph"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://de-mirror.org/distro/gentoo/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://mirror.netcologne.de/gentoo/ "
LANG="de_DE.UTF-8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,--hash-style=gnu"
LINGUAS="de en en_GB en_US"
MAKEOPTS="-j2"
PKGDIR="/home/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/build"
PORTDIR="/home/portage/portage"
PORTDIR_OVERLAY="/home/portage/local /home/portage/layman/science /home/portage/layman/dotnet /home/portage/layman/dweezil /home/portage/layman/sunrise /home/portage/layman/gentoo-guis /home/portage/layman/java-overlay"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avahi bash-completion bluetooth branding bzip2 cairo caps cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dga dmx dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fontconfig fortran fuse gconf gd gdbm gif glade gnome gnome-keyring gnome-online-accounts gnutls gpm gstreamer gtk iconv idn imagemagick ipv6 jadetex jpeg jpeg2k kde kerberos kpathsea latex lcms ldap libnotify lzma mad mmap mmx mng modules mono mp3 mp4 mpeg mudflap multilib mysql nautilus ncurses networkmanager nls nptl nsplugin offensive ogg opengl openmp pam pango pch pcre pdf png policykit ppds pppd python qt3support qt4 readline samba sasl sdl session socialweb speex spell sse sse2 sse3 ssl ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vorbis webkit webp wxwidgets x264 xattr xcb xft xinerama xml xpm xv xvid zeroconf zip 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="*" 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 cgi cgid 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="apache cpu cpufreq df disk exec filecount fscache hddtemp interface iptables irq java libvirt load logfile mbmon memory mysql netlink network notify_desktop ntpd processes protocols rrdtool sensors swap syslog table tcpconns thermal uptime users" CURL_SSL="openssl" DRACUT_MODULES="btrfs caps crypt crypt-gpg dmraid dmsquash-live livenet lvm mdraid multipath nbd ssh-client" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_GB en_US" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm armeb i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia nv qxl vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-portage/gentoolkit-0.3.0.6-r3 was built with the following:
USE="(multilib)"
Comment 3 wbrana 2014-01-06 18:35:29 UTC
equery uses 2 GB of memory without crash on machine with 8 GB memory
Comment 4 Patrick Lauer gentoo-dev 2014-05-22 09:07:46 UTC
/usr/bin/time equery d libpo6 -a
[snip]

113.84user 4.82system 4:10.19elapsed 47%CPU (0avgtext+0avgdata 8369712maxresident)k
332840inputs+8outputs (0major+584828minor)pagefaults 0swaps

so it takes nearly 2 CPU-minutes @ 3.4Ghz (that's kinda bad, but whatever)

top shows it taking just over 2GB memory, and if I'm parsing the output of "time" properly it allocates ~8.3GB memory (but doesn't use all of it)

That makes it a little bit hard to use ...
Comment 5 Virgil Dupras (RETIRED) gentoo-dev 2018-08-15 13:46:44 UTC
In a recent optimisation I'm looking to merge at https://github.com/gentoo/gentoolkit/pull/2 , memory usage also decreased significantly (probably because it loads a lot less of Atom instances in memory).  On my machine with gentoolkit 0.4.2, "equery d -a llvm" consumes up to 1.1G (time -f "%M") of memory, and with that patch above, 120M for the same query.

I'd say that this patch would fix the bug...
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2022-07-10 16:22:40 UTC
PR has been merged long ago, but I am getting a new error with current portage