Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550558 - dev-python/pkgconfig-1.1.0 - emerge hangs swapping 72GB
Summary: dev-python/pkgconfig-1.1.0 - emerge hangs swapping 72GB
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-27 13:27 UTC by Juergen Rose
Modified: 2015-06-21 09:25 UTC (History)
3 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 Juergen Rose 2015-05-27 13:27:44 UTC
'emerge dev-python/pkgconfig' hangs at:
...
>>> Emerging (7 of 18) dev-python/pkgconfig-1.1.0::gentoo
 * pkgconfig-1.1.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                       [ ok ]
>>> Unpacking source...
>>> Unpacking pkgconfig-1.1.0.tar.gz to /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Preparing source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
 * python3_3: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python3.3 setup.py build



'top' shows that python-3.3 needs at least 15GB resident and 72GB virtual memory:

top - 14:55:36 up 8 days,  5:14,  2 users,  load average: 2.40, 2.34, 1.95
Tasks: 207 total,   4 running, 203 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.7 us, 18.6 sy,  0.0 ni, 66.2 id, 14.1 wa,  0.4 hi,  0.0 si,  0.0 st
KiB Mem : 16177204 total,   135936 free, 15923884 used,   117384 buff/cache
KiB Swap: 10066328+total, 55198252 free, 45465028 used.    93708 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
   59 root      20   0       0      0      0 R  98.0  0.0  10:27.88 kswapd0
 9849 portage   20   0 72.123g 0.015t   4164 R  17.2 97.0   5:32.38 python3.3
10327 rose      20   0   46208   2380   1904 R   0.7  0.0   0:01.60 top
Comment 1 Juergen Rose 2015-05-27 13:36:40 UTC
Killing 'emerge dev-python/pkgconfig' and restarting 'emerge -uvDN world', the same issue happens.
Comment 2 Juergen Rose 2015-05-27 13:51:44 UTC
What is the relation between dev-python/pkgconfig-1.1.0 and dev-python/python-pkgconfig-1.1.0?
Comment 3 Juergen Rose 2015-05-27 14:04:26 UTC
(In reply to Juergen Rose from comment #2)
> What is the relation between dev-python/pkgconfig-1.1.0 and
> dev-python/python-pkgconfig-1.1.0?

I identified:

root@lynx:/root(15)# eix dev-python/python-pkgconfig
[I] dev-python/python-pkgconfig [1]
     Available versions:  (~)1.1.0 {test PYTHON_TARGETS="python2_7 python3_3"}
     Installed versions:  1.1.0(11:20:18 AM 11/25/2014)(-test PYTHON_TARGETS="python2_7 python3_3")
     Homepage:            https://github.com/matze/pkgconfig
     Description:         pkgconfig is a Python module to interface with the pkg-config command line tool

[1] "sage-on-gentoo" /var/lib/layman/sage-on-gentoo
root@lynx:/root(16)# eix dev-python/pkgconfig
* dev-python/pkgconfig
     Available versions:  (~)1.1.0 {test PYTHON_TARGETS="pypy python2_7 python3_3 python3_4"}
     Homepage:            https://pypi.python.org/pypi/pkgconfig/ http://github.com/matze/pkgconfig
     Description:         Interface Python with pkg-config
Comment 4 Juergen Rose 2015-05-27 14:39:51 UTC
At the next system 'emerge -v1 pkgconfig' fails with:
...
>>> Installing (157 of 609) dev-python/pkgconfig-1.1.0::gentoo
 * checking 21 files for package collisions
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). See
 * http://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how to
 * solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 *      /usr/lib64/python3.3/site-packages/pkgconfig/pkgconfig.py
 *      /usr/lib64/python3.3/site-packages/pkgconfig/__init__.py
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/PKG-INFO
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/top_level.txt
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/dependency_links.txt
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/SOURCES.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/PKG-INFO
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/top_level.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/dependency_links.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/SOURCES.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig/pkgconfig.py
 *      /usr/lib64/python2.7/site-packages/pkgconfig/__init__.py
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * dev-python/python-pkgconfig-1.1.0:0::sage-on-gentoo
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/PKG-INFO
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/SOURCES.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/dependency_links.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig-1.1.0-py2.7.egg-info/top_level.txt
 *      /usr/lib64/python2.7/site-packages/pkgconfig/__init__.py
 *      /usr/lib64/python2.7/site-packages/pkgconfig/pkgconfig.py
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/PKG-INFO
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/SOURCES.txt
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/dependency_links.txt
 *      /usr/lib64/python3.3/site-packages/pkgconfig-1.1.0-py3.3.egg-info/top_level.txt
 *      /usr/lib64/python3.3/site-packages/pkgconfig/__init__.py
 *      /usr/lib64/python3.3/site-packages/pkgconfig/pkgconfig.py
 * 
 * Package 'dev-python/pkgconfig-1.1.0' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.

>>> Failed to install dev-python/pkgconfig-1.1.0, Log file:
Comment 5 Juergen Rose 2015-05-27 15:02:01 UTC
The installed /usr/lib64/python3.3/site-packages/pkgconfig/* files are from [sage-on-gentoo overlay] dev-python/python-pkgconfig-1.1.0:

root@impala:/root(18)# qfile -v /usr/lib64/python3.3/site-packages/pkgconfig/pkgconfig.py
dev-python/python-pkgconfig-1.1.0 (/usr/lib64/python3.3/site-packages/pkgconfig/pkgconfig.py)

which is a depency of [sage-on-gentoo overlay] sage-6.7:

oot@impala:/root(19)# emerge -pv --depclean python-pkgconfig

Calculating dependencies... done!
  dev-python/python-pkgconfig-1.1.0 pulled in by:
    sci-mathematics/sage-6.7 requires dev-python/python-pkgconfig

>>> No packages selected for removal by depclean
Comment 6 Juergen Rose 2015-05-27 16:48:07 UTC
Now the next system swaps emerging dev-python/pkgconfig, which hangs at:

>>> Emerging (4 of 16) dev-python/pkgconfig-1.1.0::gentoo
 * pkgconfig-1.1.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                           [ ok ]
>>> Unpacking source...
>>> Unpacking pkgconfig-1.1.0.tar.gz to /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Preparing source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
 * python3_3: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python3.3 setup.py build

while top shows:

top - 18:42:26 up 5 days, 10:07,  2 users,  load average: 2.49, 2.16, 1.23
Tasks: 163 total,   2 running, 161 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5.8 us, 14.2 sy,  0.0 ni,  4.3 id, 75.1 wa,  0.0 hi,  0.5 si,  0.0 st
KiB Mem :  3972156 total,    35364 free,  3861780 used,    75012 buff/cache
KiB Swap: 12582908 total,  3439192 free,  9143716 used.    52472 avail Mem 

  PID USER    PR  NI    VIRT    RES  SHR S  %CPU %MEM     TIME+ COMMAND
   28 root    20   0       0      0    0 D  21.9  0.0   1:27.75 kswapd0
 1959 portage 20   0 12.123g 3.558g 4100 D  17.9 93.9   1:36.63 python3.3
    7 root    20   0       0      0    0 S   0.3  0.0   4:48.81 rcu_sched
    1 root    20   0  117164   1428 1356 D   0.0  0.0   0:16.24 systemd
    2 root    20   0       0      0    0 S   0.0  0.0   0:00.16 kthreadd
    3 root    20   0       0      0    0 S   0.0  0.0   0:10.69 ksoftirqd/0
    5 root     0 -20       0      0    0 S   0.0  0.0   0:00.00 kworker/0:0H
Comment 7 Casey Webster 2015-05-28 16:04:31 UTC
I am observing the same behavior emerging pkgconfig-1.1.0.  I have 24 GB physical RAM and emerging this package exhausts this memory, starts swapping and is then OOM killed.

 # emerge --info
Portage 2.2.18 (python 3.4.1-final-0, default/linux/amd64/13.0/desktop, gcc-5.1.0, glibc-2.20-r2, 4.0.1-gentoo-convect-systemd x86_64)
=================================================================
System uname: Linux-4.0.1-gentoo-convect-systemd-x86_64-Intel-R-_Core-TM-_i7_CPU_X_990_@_3.47GHz-with-gentoo-2.2
KiB Mem:    24682980 total,  19118004 free
KiB Swap:    4194236 total,   2717852 free
Timestamp of repository gentoo: Thu, 28 May 2015 14:00:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.2.5-r6::gentoo, 3.4.1::gentoo
dev-util/cmake:           2.8.12.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.9.2::gentoo, 5.1.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 0

qt
    location: /var/lib/layman/qt
    masters: gentoo
    priority: 1

enlightenment
    location: /var/lib/layman/enlightenment
    masters: gentoo
    priority: 2

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 3

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 4

my_local_overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 5

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA DOOM3 dlj-1.1 google-talkplugin Oracle-BCLA-JavaSE AdobeFlash-10.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/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="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.cs.wmich.edu/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-march=native -O2 -pipe -ggdb -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb branding bzip2 cairo cdda cdr cli cracklib crypt cups curl cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fortran gd gdbm gif gimp glamor gnuplot gpm graphviz gsl gtk hdf hdf5 iconv icu imagemagick imap ipv6 ithreads jabber jpeg jpeg2k lapack latex lcms ldap libnotify lm_sensors lto mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses netcdf nls nptl ogg opengl openmp pam pango pcre pdf perl php plotutils png policykit posix ppds pulseaudio python qt3support qt4 qt5 raw readline romio sdl session smp sockets sound spell sse sse2 sse3 ssl startup-notification subversion svg systemd szip tcpd threads tiff truetype udev udisks unicode upower usb vnc vorbis wxwidgets x264 xcb xft xinerama xkb xml xscreensaver xv xvid zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DRACUT_MODULES="systemd lvm mdraid" 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 ublox 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_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_4 python2_7" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" 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"
USE_PYTHON="2.7 3.4"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2015-05-29 06:23:18 UTC
(In reply to Juergen Rose from comment #2)
> What is the relation between dev-python/pkgconfig-1.1.0 and
> dev-python/python-pkgconfig-1.1.0?

former is in the tree, later is not official. It doesn't even follow the official upstream name.
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2015-05-29 06:25:04 UTC
I cannot reproduce it. Can someone try to connect strace and see what is going on?
Comment 10 Juergen Rose 2015-05-29 09:46:48 UTC
(In reply to Justin Lecher from comment #8)
> (In reply to Juergen Rose from comment #2)
> > What is the relation between dev-python/pkgconfig-1.1.0 and
> > dev-python/python-pkgconfig-1.1.0?
> 
> former is in the tree, later is not official. It doesn't even follow the
> official upstream name.

'dev-python/python-pkgconfig' disappeared from the sage-on-gentoo overlay. I removed it from my installations.

Nevertheless '/usr/bin/python3.3 setup.py build' needs this huge amount of memory, starts to swap the system


root@caiman:/root(46)# emerge -v1 dev-python/pkgconfig

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/pkgconfig-1.1.0::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4" 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-python/pkgconfig-1.1.0::gentoo
 * pkgconfig-1.1.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking pkgconfig-1.1.0.tar.gz to /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work
>>> Preparing source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0 ...
 * python3_3: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python3.3 setup.py build

(-----     here the swapping starts --------)

top - 11:20:46 up 1 day, 13:06,  2 users,  load average: 1.34, 1.41, 1.61
Tasks: 201 total,   2 running, 199 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3.5 us,  4.9 sy,  0.0 ni, 79.3 id, 11.3 wa,  0.9 hi,  0.0 si,  0.0 st
KiB Mem : 16177204 total,   157280 free, 15927268 used,    92656 buff/cache
KiB Swap: 10066328+total, 50331640 free, 50331640 used.   104540 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 3550 portage   20   0 96.123g 0.015t   4276 D  37.2 97.2  14:00.73 python3.3
   56 root      20   0       0      0      0 S   9.6  0.0 152:16.87 kswapd0
  573 root       0 -20       0      0      0 S   3.3  0.0   5:28.52 kworker/5:1H

(-----   and fails (problably exceeding my 100GB swap space))

Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 152, in save_modules
    yield saved
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 193, in setup_context
    yield
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 237, in run_setup
...
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 429, in _remap_input
    self._violation(operation, os.path.realpath(path), *args, **kw)
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 385, in _violation
    raise SandboxViolation(operation, args, kw)
setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('/var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0-python3_3/nose.egg-info', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 108, in dump
    return pickle.dumps(type), pickle.dumps(exc)
_pickle.PicklingError: Can't pickle <class 'setuptools.sandbox.SandboxViolation'>: it's not the same object as setuptools.sandbox.SandboxViolation

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 108, in dump
    return pickle.dumps(type), pickle.dumps(exc)
_pickle.PicklingError: Can't pickle <class 'setuptools.sandbox.UnpickleableException'>: it's not the same object as setuptools.sandbox.UnpickleableException
...
    DirectorySandbox(setup_dir).run(runner)
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 267, in run
    return func()
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 236, in runner
    _execfile(setup_script, ns)
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "/var/tmp/portage/dev-python/pkgconfig-1.1.0/temp/easy_install-r15yz_/nose-1.3.6/setup.py", line 123, in <module>
  File "/var/tmp/portage/dev-python/pkgconfig-1.1.0/temp/easy_install-r15yz_/nose-1.3.6/setup3lib.py", line 140, in setup
  File "/usr/lib64/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
...
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 110, in dump
    return cls.dump(cls, cls(repr(exc)))
  File "/usr/lib64/python3.3/site-packages/setuptools/sandbox.py", line 110, in dump
    return cls.dump(cls, cls(repr(exc)))
MemoryError
 * ERROR: dev-python/pkgconfig-1.1.0::gentoo failed (compile phase):
 *   (no error message)
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2015-05-29 09:54:26 UTC
which setuptools version are you using? Do other python packages have similar problems?
Comment 12 Juergen Rose 2015-05-29 11:16:40 UTC
(In reply to Justin Lecher from comment #11)
> which setuptools version are you using? Do other python packages have
> similar problems?

I am using at all of my systems dev-python/setuptools-16.0. On the systems where the installation of dev-python/pkgconfig-1.1.0 works is also sci-mathematics/sage-6.7 (i.e. there are some older python packages like numpy-1.8.2, sphinx-1.2.2, bottleneck-0.8.0, matplotlib-1.3.1).
On the systems where the installation of dev-python/pkgconfig-1.1.0 fails this memory problem sage is not installed (therefore some python packages have newer versions: numpy-1.9.2, sphinx-1.3.1, bottleneck-1.0.0, matplotlib-1.4.3).

I don't see similar memory problems with other python packages.

How can I apply strace? I did 'strace -f - strace.log emerge -v1 dev-python/pkgconfig'. But I suppose you are interested in something like 'strace -f /usr/bin/python3.3 setup.py build'. How can I do the later.
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2015-05-29 12:32:17 UTC
(In reply to Juergen Rose from comment #12)

> How can I apply strace? I did 'strace -f - strace.log emerge -v1
> dev-python/pkgconfig'. But I suppose you are interested in something like
> 'strace -f /usr/bin/python3.3 setup.py build'. How can I do the later.

you need to find out the PID of the build process and then just do

strace -p PID
Comment 14 Mike Gilbert gentoo-dev 2015-05-29 14:45:29 UTC
I can reproduce this under the following conditions:

1. Remove dev-python/nose.
2. Set FEATURES="-network-sandbox".

At that point, the build process will try to install nose from pypi, and that somehow causes this massive memory leak.
Comment 15 Mike Gilbert gentoo-dev 2015-05-29 14:47:30 UTC
FYI, I figured that out due to this line in Juergen's log:

setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('/var/tmp/portage/dev-python/pkgconfig-1.1.0/work/pkgconfig-1.1.0-python3_3/nose.egg-info', 511) {}
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2015-05-29 14:54:02 UTC
Thanks for debugging!!

+  29 May 2015; Justin Lecher <jlec@gentoo.org> pkgconfig-1.1.0.ebuild:
+  Drop nose requirement from setup.py, bug #550558
+