Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282808 - portage-2.2_rc40 intermittent KeyError in PollScheduler._poll_loop
Summary: portage-2.2_rc40 intermittent KeyError in PollScheduler._poll_loop
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 210077 288499
  Show dependency tree
Reported: 2009-08-26 15:35 UTC by Helmut Jarausch
Modified: 2009-10-11 01:03 UTC (History)
1 user (show)

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

handle the KeyError (poll_keyerror.patch,732 bytes, patch)
2009-09-05 01:28 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2009-08-26 15:35:56 UTC
I'm afraid this bug report isn't of much help, since I cannot reproduce it.
The command
emerge -av1 -j4 --keep-going  kde-base/kde-meta

failed having emerged 111 of 254 packages with
Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/", line 1412, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/", line 457, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/portage/pym/_emerge/", line 820, in merge
    rval = self._merge()
  File "/usr/lib64/portage/pym/_emerge/", line 1125, in _merge
  File "/usr/lib64/portage/pym/_emerge/", line 1265, in _main_loop
  File "/usr/lib64/portage/pym/_emerge/", line 126, in _poll_loop
    handler, reg_id = event_handlers[f]
KeyError: 5

Reproducible: Couldn't Reproduce

emerge --info
Portage 2.2_rc40 (default/linux/amd64/2008.0/desktop, gcc-4.3.4, glibc-2.10.1-r0, 2.6.30-gentoo-r4 x86_64)
System uname: Linux-2.6.30-gentoo-r4-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-2.0.1
Timestamp of tree: Wed, 26 Aug 2009 05:45:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.6.2-r1, 3.1.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
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.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-mtune=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-mtune=native -O2 -pipe"
FEATURES="assume-digests buildpkg distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
LINGUAS="en de"
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="/usr/local/portage /usr/local/portage/layman/java-overlay"
USE="3dnow 3dnowext 3dnowprefetch X a52 aac acl acpi alsa amd64 atm avahi berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dts dvd dvdr eds emboss encode esd evo fam ffmpeg fftw firefox flac fortran fuse gdbm gfortran gif gimp gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog jpeg kde lapack lcms libnotify mad mikmod mmx mmxext mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sdl session smp spell spl sqlite sqlite3 sse sse2 sse3 sse4a ssl startup-notification svg sysfs tcl tcpd threads thunar tiff tk truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid 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="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 wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="radeonhd radeon"
Comment 1 Helmut Jarausch 2009-08-26 15:52:16 UTC
It seems to be reproducible.
I've just tried to emerge the remaining packages, again with
emerge -av1 -j4 --keep-going  kde-base/kde-meta
and I get the same error after - now - 76 of 140 packages have been emerged.
Comment 2 Zac Medico gentoo-dev 2009-08-29 07:15:25 UTC
It seems like some sort of logic error, but it's odd that it's being reported now since the relevant logic hasn't changed for a long time (it's the same code that's in stable portage-2.1.6.x).
Comment 3 Zac Medico gentoo-dev 2009-09-05 01:28:29 UTC
Created attachment 203172 [details, diff]
handle the KeyError

If this patch is saved as /tmp/poll_keyerror.patch, then it can be applied as follows:

  patch /usr/lib/portage/pym/_emerge/ /tmp/poll_keyerror.patch
Comment 4 Zac Medico gentoo-dev 2009-09-20 00:22:26 UTC
This is fixed in 2.2_rc41.
Comment 5 Zac Medico gentoo-dev 2009-10-11 01:03:13 UTC
This is fixed in 2.1.7.