Summary: | sys-apps/portage-2.1.6.7: IOError: [Errno 11] Resource temporarily unavailable (while writing to stdout) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexey Vladykin <vladykin> |
Component: | [OLD] Development | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dabbott, infobox.oleg, pacho, toolchain |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=456296 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 268228 | ||
Attachments: | handle stdout EAGAIN errors due to subprocesses setting O_NONBLOCK |
Description
Alexey Vladykin
2009-03-31 20:19:22 UTC
I can confirm this one on my server. Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.26-hardened-r9.stu x86_64) ================================================================= System uname: Linux-2.6.26-hardened-r9.stu-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2376-with-glibc2.2.5 Timestamp of tree: Sat, 04 Apr 2009 08:00:17 +0000 app-shells/bash: 3.2_p39 dev-lang/python: 2.5.2-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.63 sys-devel/automake: 1.7.9-r1, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=k8 -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /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 -pipe -march=k8 -pipe -msse3" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ " LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j10" 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" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 apache2 authdaemond bash-completion berkdb bzip2 cli cracklib crypt ctype cups dri fortran gd gdbm gif gpm hardened iconv idn isdnlog ithreads jpeg midi mmx mod_php mudflap multilib mysql ncurses nls nptl nptlonly nptonly openmp pam pcre perl png pppd python readfile readline reflection sasl session simplexml snmp sockets spl sse sse2 ssl sysfs tcpd threads tiff unicode xml xorg xsl zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106cmipci 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" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Same here: ?ortran runtime warning: Positive width required in format. At line 50 Traceback (most recent call last): File "/usr/bin/emerge", line 40, in <module> retval = _emerge.emerge_main() File "//usr/lib/portage/pym/_emerge/__init__.py", line 15715, in emerge_main myopts, myaction, myfiles, spinner) File "//usr/lib/portage/pym/_emerge/__init__.py", line 14659, in action_build retval = mergetask.merge() File "//usr/lib/portage/pym/_emerge/__init__.py", line 10723, in merge rval = self._merge() File "//usr/lib/portage/pym/_emerge/__init__.py", line 11024, in _merge self._main_loop() File "//usr/lib/portage/pym/_emerge/__init__.py", line 11161, in _main_loop self._poll_loop() File "//usr/lib/portage/pym/_emerge/__init__.py", line 9540, in _poll_loop handler(f, event) File "//usr/lib/portage/pym/_emerge/__init__.py", line 2428, in _output_handler buf.tofile(files.stdout) IOError: [Errno 11] Resource temporarily unavailable Portage 2.2_rc28 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-tuxonice-r8 i686) ================================================================= System uname: Linux-2.6.28-tuxonice-r8-i686-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-glibc2.0 Timestamp of tree: Sun, 05 Apr 2009 12:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.4.4-r14, 2.5.2-r7 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.3-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.3.5 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -pipe -O2" 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/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config" 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/udev/rules.d" CXXFLAGS="-march=prescott -pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unmerge-orphans userfetch userpriv" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="en_US.utf8" LDFLAGS="-Wl,-O1" LINGUAS="en cs ru uk" 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/synce /usr/portage/local/layman/kde-testing /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acl acpi adns alsa apache2 arts audiofile automount bash-completion berkdb bluetooth branding bzip2 cairo calendars caps cdparanoia cdr chm cli cracklib crypt cups curl curlwrappers custom-optimization cvs dbus dhcp dri dts dvd dvdr dvdread eds emboss encode escreen esd evo fam fbcon ffmpeg firefox flac fortran gcj gdbm gif glut gpm gstreamer gtk gtk2 hal iconv icq ieee1394 imap imlib inotify ipv6 isdnlog jabber java javascript jikes jingle jpeg junit kde kdeprefix kipi laptop lash ldap libnotify libwww lm_sensors log4j logitech-mouse logrotate mad madwifi matroska mcal midi mikmod mime mozilla mp3 mpeg mplayer mudflap mysql ncurses nls nntp nocd nodrm nptl nptlonly nsplugin ntfs obex ogg openal opengl openmp osc oscar oss pam pcmcia pcre pdf perl php png postgres ppds pppd prelude python qt3 qt3support qt4 quicktime rdesktop readline reflection reiserfs samba scanner sdl session shorten soap sockets spell spl sqlite sqlite3 ssl startup-notification subversion svg synaptics sysfs tcpd test theora threads tidy tiff truetype unicode usb vhosts videos vorbis wifi win32codecs x86 xcomposite xine xml xorg xosd xprint xulrunner xv xvid xvmc 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_dbdauthn_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" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs ru uk" USERLAND="GNU" VIDEO_CARDS="vesa v4l intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS reassigning. (fortran testsuite is wigging portage out) This is quite strange because normally stdout just blocks as long as necessary. It leads me to suspect that the test suite is doing something it shouldn't be doing. It seems as if one of the gfortran tests is putting stdout into non-blocking mode. This is a bad idea, as explained in detail here: http://homepages.tesco.net/~J.deBoynePollard/FGA/dont-set-shared-file-descriptors-to-non-blocking-mode.html I'll make portage respond to the EAGAIN error by putting the file descriptor back into blocking mode and trying again (according to the linked website, this is the same way that bash handles it). Created attachment 187755 [details, diff]
handle stdout EAGAIN errors due to subprocesses setting O_NONBLOCK
This patch works for me. If it's as /tmp/stdio_noblock.patch then it can be applied as follows:
patch /usr/lib/portage/pym/_emerge/__init__.py /tmp/stdio_noblock.patch
If anybody can find were the gcc testsuite is setting O_NONBLOCK mode then please file a bug for gcc upstream because it's extremely poor practice. This is fixed in 2.2_rc29. This is fixed in 2.1.6.12. |