When trying to build some applications which use python based build tools (like scons and waf) the build will stall randomly (no new progress will be made and there is no cpu usage; the build just sits there doing nothing). This seems to be an issue in sandbox (happens with both emerge and plaudis). I was able to get past this issue by disabling sandbox. I do not get this issue when I build the packages manually (not using a PM). This issue only seems to occur on systems where python is built with >=gcc-4.3.3. I've tried python-2.5 and python-2.6 and I get this issue with both. This issue does not seem to happen when python is built with gcc-4.1.2. I get this error with sandbox 1.5 and 1.6. If more info is needed let me know. Reproducible: Always Steps to Reproduce: 1. emerge gcc-4.3.3 2. emerge python 3. emerge xmms2-9999 (from pro-audio overlay) Actual Results: The build will stall in random locations, sometimes its not so random and will fail in the same place over and over, other times it will make more progress but then still fail. Expected Results: The build should finish as expected.
Please post your "emerge --info".
I can confirm this issue with some packages using waf and/or scons One example would be jack-audio-connection-kit-1.9.2 from pro-audio overlay. Portage 2.2_rc27 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29 x86_64) ================================================================= System uname: Linux-2.6.29-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5600+-with-glibc2.2.5 Timestamp of tree: Wed, 25 Mar 2009 01:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p10-r1 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.5.4-r2 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.3 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r1 sys-apps/sandbox: 1.5 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.2 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.28-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -msse3 -fno-ident -fweb -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon64 -O2 -msse3 -fno-ident -fweb -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="candy ccache collision-protect distlocks fixpackages parallel-fetch prelink preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS=" ftp://ftp.gentoo.mesh-solutions.com/gentoo" LANG="de_DE.UTF-8" LC_ALL="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" LINGUAS="en de" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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/portage/local/layman/java-overlay /usr/portage/local/layman/webapps-experimental /usr/portage/local/layman/gentoo-gis /usr/portage/local/layman/sunrise /usr/portage/local/layman/enlightenment /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/nouveau /usr/local/overlays/gimpel /home/tom/cvs/gimpel/ecomp /home/tom/cvs/gimpel/qt-snapshots /home/tom/cvs/proaudio/trunk/overlays/proaudio /usr/portage/local/paludis/kde-testing /home/tom/cvs/multilib-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowex X acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode evo fam fbcon firefox gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jack jpeg kdeenablefinal kdehiddenvisibility lib32 libnotify mad midi mikmod mmx mmxext mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png ppds pppd pthreads python qt3 qt3support qt4 quicktime readline reflection sdl session shadow spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd threads tiff truetype unicode usb userlocales vorbis xcb xml xorg xulrunner xv zlib" ALSA_CARDS="ice1712 ice1724" 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 log_forensic" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
PS: the emerge --info shows sandbox-1.5, but 1.6 exhibits the same problems.
post a package that doesnt require some random overlay so that i can reproduce
looks like it's caused by threaded apps which contend for sandbox resources. not too many build utils are threaded which is why this isnt normally executed. python must put its thread into some unwakable state and when libsandbox goes to sleep waiting for the mutex, the thread never ways up again. http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=4ff12b76f2ebf13ac079e733635fcea832631966 i imagine backing out the pthread changes will make things "work". but that just puts sandbox back into the state i was proactively preventing: random sandbox violations being missed or random memory corruption. will probably have to convert to a spinlock so as to not annoy apps.
fixed in git ... classical problem of threads+forks+locks causing deadlocks http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=4f5ba92246606723806c0585393f21244d44036c