Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345455 - sys-apps/portage-2.2* with ipc USE-flag leave ebuild-ipc processes hanging around at "out of disk space" error
Summary: sys-apps/portage-2.2* with ipc USE-flag leave ebuild-ipc processes hanging ar...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Depends on: 344555
  Show dependency tree
Reported: 2010-11-14 21:22 UTC by Petr Polezhaev
Modified: 2011-01-13 22:25 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Petr Polezhaev 2010-11-14 21:22:07 UTC
When disk space on /var/tmp/portage filesystem runs out, portage will bail out with python backtrace, complaining about "No free space left on device". fuser -c will show then ebuild-ipc process still hanging around and blocking filesystem from being unmount.

Bad for someone, who uses tmpfs on /var/tmp/portage for speed or ssd-disk reasons, but forgets to unmount it before compiling something like openoffice.

Reproducible: Always

Steps to Reproduce:
1. mount none -t tmpfs -o size=200m
2. ebuild /usr/portage/<some big ebuild, like openoffice> merge
3. fuser -c /var/tmp/portage

Portage 2.2.0_alpha4 (default/linux/amd64/10.0/desktop, gcc-4.4.5, glibc-2.12.1-r3, 2.6.36-gentoo-nord-oss-2.2 x86_64)
                        System Settings
System uname: Linux-2.6.36-gentoo-nord-oss-2.2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6600_@_2.20GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 13 Nov 2010 23:45:03 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r2
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4
sys-devel/make:      3.82
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
Repositories: gentoo rion enlightenment-niifaq niifaq sunrise x11 kde-sunset science vmware local
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -march=native -mtune=native -msse4.1 -floop-interchange -floop-strip-mine -floop-block"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
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/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"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -msse4.1 -floop-interchange -floop-strip-mine -floop-block"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=2"
FEATURES="assume-digests binpkg-logs candy distlocks fixlafiles fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
LDFLAGS="-Wl,--as-needed -Wl,--sort-common -Wl,-O1 -Wl,--hash-style=gnu"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/rion /var/lib/layman/enlightenment-niifaq /var/lib/layman/niifaq /var/lib/layman/sunrise /var/lib/layman/x11 /var/lib/layman/kde-sunset /var/lib/layman/science /var/lib/layman/vmware /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm hal iconv idn ipv6 jpeg lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell sse sse2 ssl ssse3 startup-notification svg sysfs tcpd threads tiff truetype unicode usb vim vim-syntax vorbis x264 xcb xcomposite xml xorg xulrunner xv xvid zlib zsh-completion" 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 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" CAMERAS="canon" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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" 

                        Package Settings

sys-apps/portage-2.2.0_alpha4 was built with the following:
USE="(ipc) (multilib) -build -doc -epydoc -python3 (-selinux)" LINGUAS="-pl"
Comment 1 Zac Medico gentoo-dev 2010-11-15 03:23:23 UTC
The ebuild-ipc program has a 15 second timeout. If the processes are still hanging around after 15 seconds then it's not functioning correctly.
Comment 2 Petr Polezhaev 2010-11-15 18:33:04 UTC
Well, you're partially right. My testcase is somewhat not precise.

If I'll run _single_ emerge process - all fine, ipc goes away after some timeout.
But when I'm running few processes at once, for example
emerge -1 openoffice
emerge -e -1 @world

And after both process will fail (at same time), none of ebuild-ipc's will not perish anymore after any timeout.
And once I've got message from failing emerge -1 openoffice
 * waiting for lock on fd 7 ... [ ok ]

If you will run more emerge processes, especially with -j* option, you will get more "zombie" ipc's
Comment 3 Petr Polezhaev 2010-11-18 20:24:06 UTC
Also, this could happen with any other python-backtrace-error. For example, recently, I've encountered it, while running emerge openafs-kernel at one console and making ebuild openafs-kernel- clean at another, accidentally.

It had lead to python-fail at first console, complaining about disappeared build.log and left one stale python-ipc process. Futhermore, merges after that found this python-ipc process as stale one, complaining about it at every merge phase.
Comment 4 Zac Medico gentoo-dev 2011-01-13 22:25:23 UTC
It seems like we just need to exert more control over nested subprocesses, as in bug 344555.