Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220671 - portage-2.2_pre6 RuntimeError: Set changed size during iteration
Summary: portage-2.2_pre6 RuntimeError: Set changed size during iteration
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-05-06 20:06 UTC by Andrea Rizzolo
Modified: 2008-06-10 16:08 UTC (History)
0 users

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


Attachments
fix the 'Set changed size during iteration' error (candidates.patch,911 bytes, patch)
2008-05-06 22:13 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Rizzolo 2008-05-06 20:06:37 UTC
hi, emerge gcc (its a live ebuild from dirtyepic overlay) fails with this error:

>>> Completed installing gcc-4.3.1_pre20080506 into /var/tmp/portage/sys-devel/gcc-4.3.1_pre20080506/image/

ecompressdir: bzip2 -9 /usr/share/gcc-data/i686-pc-linux-gnu/4.3.1-pre20080506/man
ecompressdir: bzip2 -9 /usr/share/gcc-data/i686-pc-linux-gnu/4.3.1-pre20080506/info
injecting /usr/lib/gcc/i686-pc-linux-gnu/4.3.1-pre20080410/libstdc++.so.6 into /var/tmp/portage/sys-devel/gcc-4.3.1_pre20080506/image/
Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8786, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8149, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 5360, in merge
    return self._merge(mylist, favorites, mtimedb)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 5677, in _merge
    vartree=vartree, prev_mtimes=ldpath_mtimes)
  File "/usr/lib/portage/pym/portage/__init__.py", line 5324, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2634, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2642, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2056, in treewalk
    self._preserve_libs(srcroot, destroot, myfilelist+mylinklist, counter, inforoot)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 1731, in _preserve_libs
    for x in candidates:
RuntimeError: Set changed size during iteration


Reproducible: Always

Steps to Reproduce:
emerge gcc



Portage 2.2_pre6 (default/linux/x86/2008.0/desktop, gcc-4.2.3, glibc-2.7-r2, 2.6.25-zen1-07742-gb1b47da i686)
=================================================================
System uname: 2.6.25-zen1-07742-gb1b47da i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
Timestamp of tree: Tue, 06 May 2008 18:35:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     9999
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18.50.0.6
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks keeptemp keepwork parallel-fetch preserve-libs sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.unina.it/pub/linux/distributions/gentoo http://gentoo.inode.at/ http://gentoo.modulix.net/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS=""
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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/dirtyepic /usr/portage/local/layman/dottout /usr/portage/local/layman/sunrise /usr/local/portage /usr/portage/local/layman/gentoo-soor-overlay /usr/portage/local/layman/minefield"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cddb cdr cli cracklib crypt curl dbus directfb dri dvb dvd dvdnav dvdr dvdread eds emboss encode esd evo fam fbcon fbcondecor firefox flac fortran gdbm gif glitz gpm gstreamer gtk hal i810 iconv isdnlog jpeg kerberos ldap libnotify lm_sensors mad midi mikmod mmx mp2 mp3 mpeg msn mudflap musepack ncurses newspr nls normalize nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl plugins png ppds pppd python qt3support quicktime rar readline real reflection rss sdl sensors session spell spl sse sse2 ssl ssse3 startup-notification svg svga tcpd threads tiff truetype ubuntu unicode usb v4l v4l2 vesa vorbis wifi win32codecs wma x264 x86 xcomposite xml xorg 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 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="mouse keyboard" KERNEL="linux" LCD_DEVICES="cfontz" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2008-05-06 22:13:03 UTC
Created attachment 152171 [details, diff]
fix the 'Set changed size during iteration' error

I think this patch might fix it but I haven't tested it.
Comment 2 Andrea Rizzolo 2008-05-07 14:09:33 UTC
thank you, it works
Comment 3 Andrea Rizzolo 2008-05-07 15:45:08 UTC
ok, probably something went wrong. after emerge gcc, now emerge 'whatever' fails:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8786, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8149, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 5360, in merge
    return self._merge(mylist, favorites, mtimedb)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 5677, in _merge
    vartree=vartree, prev_mtimes=ldpath_mtimes)
  File "/usr/lib/portage/pym/portage/__init__.py", line 5324, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2637, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2645, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2268, in treewalk
    others_in_slot=others_in_slot)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 1278, in unmerge
    if not self.vartree.dbapi.linkmap.findConsumers(f):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 218, in findConsumers
    raise KeyError("%s not in object list" % obj)
KeyError: '/usr/lib/gcc/i686-pc-linux-gnu/4.3.1-pre20080410/libstdc++.so.6.0.10 not in object list'

probably its not related to the patch..
Comment 4 Andrea Rizzolo 2008-05-23 10:52:45 UTC
*bump* without your patch emerge gcc fails with portage-2.2_pre7 too 
Comment 5 Zac Medico gentoo-dev 2008-05-23 18:52:47 UTC
(In reply to comment #1)
> Created an attachment (id=152171) [edit]
> fix the 'Set changed size during iteration' error

This is in svn r10388.
Comment 6 Luca Longinotti (RETIRED) gentoo-dev 2008-05-31 20:37:45 UTC
Uhmm I had the same error as comment #0 in portage-2.2_pre7 while updating dev-libs/libgcrypt-1.2.4 to 1.4.0-r1, applying the patch here fixed it, but every subsequent emerge fails with that KeyError, so I suppose its related to the patch in comment #1... Is there any patch to fix the KeyError too?
Best regards, chtekk.
Comment 7 Zac Medico gentoo-dev 2008-05-31 20:55:27 UTC
That KeyError from comment #3 looks almost identical to the one in bug #223591, comment #4.
Comment 8 Luca Longinotti (RETIRED) gentoo-dev 2008-06-02 17:27:35 UTC
(In reply to comment #7)
> That KeyError from comment #3 looks almost identical to the one in bug #223591,
> comment #4. 

Indeed it does, but the suggested fix in that bug didn't work (remove all NEEDED.ELF.2 files and regen them with the code from the portage-2.2_pre7-r1.ebuild), I actually did that and I still get the following error right after it finishes merging the package (portage itself in this case):

Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 9044, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 8406, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5588, in merge
    return self._merge(mylist, favorites, mtimedb)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5906, in _merge
    blockers=self._find_blockers(pkg))
  File "/usr/lib64/portage/pym/portage/__init__.py", line 5349, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 2746, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 2754, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 2341, in treewalk
    others_in_slot=others_in_slot)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1315, in unmerge
    consumers = self.vartree.dbapi.linkmap.findConsumers(f)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 220, in findConsumers
    raise KeyError("%s not in object list" % obj)
KeyError: '/usr/lib64/libgcrypt.so.11.4.3 not in object list'

Comment 9 Marius Mauch (RETIRED) gentoo-dev 2008-06-02 18:06:57 UTC
Please keep comments about the KeyError exception on bug #223591
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2008-06-10 16:08:23 UTC
Fixed in or before 2.2_pre8