Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231801 - emerge crashes when calculating dependencies as unprivileged user while a parallel instance is cleaning a package
Summary: emerge crashes when calculating dependencies as unprivileged user while a par...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 594002 658024 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-14 19:43 UTC by Ivan D Vasin
Modified: 2018-06-13 05:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan D Vasin 2008-07-14 19:43:18 UTC
The title says it all. I don't remember this ever happening in the past (pre 2.2), though I may have just been lucky. This seems to happen every time portage tries to calculate dependencies while another portage instance is cleaning a package. The former instance crashes with the following error:

These are the packages that would be merged, in order:

Calculating dependencies  
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 9434, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 8609, in action_build
    mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 1921, in __init__
    pkg_cache=self._pkg_cache)
  File "/usr/lib/portage/pym/_emerge/__init__.py", line 1014, in __init__
    metadata = dict(izip(mykeys, real_dbapi.aux_get(cpv, mykeys)))
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 691, in aux_get
    raise KeyError(mycpv)
KeyError: 'sys-kernel/zen-sources-2.6.26_rc8-r10'

(Here, the other portage instance was in the middle of cleaning sys-kernel/zen-sources-2.6.26_rc8-r10')

Reproducible: Always

Steps to Reproduce:
1. emerge -C foopkg
2. in another shell: emerge -p barpkg


Expected Results:  
I expect that when the cleaning instance starts cleaning, it should remove the package from consideration in any newer portage instance's calculation of dependencies.

Portage 2.2_rc1 (default-linux/x86/2006.1, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-rc8-zen1.0 i686)                                                                           
=================================================================                       
System uname: Linux-2.6.26-rc8-zen1.0-i686-Intel-R-_Pentium-R-_M_processor_1.86GHz-with-glibc2.0                                                                                
Timestamp of tree: Mon, 14 Jul 2008 13:45:01 +0000                                      
ccache version 2.4 [enabled]                                                            
app-shells/bash:     3.2_p39                                                            
dev-java/java-config: 1.3.7, 2.1.6-r1                                                   
dev-lang/python:     2.5.2-r5                                                           
dev-python/pycrypto: 2.0.1-r6                                                           
dev-util/ccache:     2.4-r7                                                             
sys-apps/baselayout: 2.0.0                                                              
sys-apps/openrc:     0.2.5-r1                                                           
sys-apps/sandbox:    1.2.18.1-r3                                                        
sys-devel/autoconf:  2.13, 2.62-r1                                                      
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.1-r1        
sys-devel/binutils:  2.18-r3                                                            
sys-devel/gcc-config: 1.4.0-r4                                                          
sys-devel/libtool:   2.2.4                                                              
virtual/os-headers:  2.6.25-r4                                                          
ACCEPT_KEYWORDS="x86 ~x86"                                                              
CBUILD="i686-pc-linux-gnu"                                                              
CFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer"                                
CHOST="i686-pc-linux-gnu"                                                               
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/shutdown /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"                                                    
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/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"                                                 
CXXFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -fvisibility=hidden"                                                                      
DISTDIR="/usr/portage/distfiles"                                                        
EMERGE_DEFAULT_OPTS=""                                                                  
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"                                                  
GENTOO_MIRRORS="ftp://gentoo.wpi.edu/gentoo  ftp://ftp.gtlib.gatech.edu/pub/gentoo  http://distfiles.gentoo.org"                                                                
INSTALL_MASK=""                                                                         
LANG="en_US.UTF-8"                                                                      
LC_ALL="en_US.UTF-8"                                                                    
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"                           
LINGUAS="en en_US"                                                                      
MAKEOPTS="-j2"                                                                          
PKGDIR="/usr/portage/packages"                                                          
PORTAGE_RSYNC_EXTRA_OPTS=""                                                             
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/local/portage/layman/zen-overlay /usr/local/portage/layman/sabayon /usr/local/portage/layman/enlightenment /usr/local/portage/layman/kdesvn-portage /usr/local/portage"                                                                           
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"                                 
USE="7zip X Xaw3d a52 aac aalib acpi administrator aim akode alias alsa amarok amazon amr animgif ansi ao apache2 apm applet artswrappersuid aspnet2 async asyncns athena audacious audiofile autoipd automount avahi avalon-framework avalon-logkit backtrace bash-completion bcmath bdf berkdb bidi big-tables binfilter bittorrent blas blender-game bluetooth boost branding bzip2 cairo calendar caps captury cardbus cblas cdaudio cdda cddb cdinstall cdio cdparanoia cdr chm chroot clamav clearcase cli clisp colordiff connectionstatus console contentcache corba cpudetection cpufreq cracklib crypt cscope css ctype cups cupsddk curl curlwrappers cursors cviewer cvs cvsgraph daap dbus device-mapper devil dia directfb disassembler disk-partition divx djbfft djvu dnd dri dts dvd dvdr dvdread dynamicplugin eap-tls ecc emacs emerald emovix enca encode enscript eolconv epydoc equalizer erandom exif expat extra-cardsets extraengine fam fame fastbuild fasttrack fat fbcon fbcondecor fbsplash ffmpeg fftw finger firefox fits flac flash flatfile flexresp2 fltk fontconfig foomaticdb fortran fpx freetype ftp fuse g15 gd gdbm gif gimpprint git glade glib glibc-omitfp glitz glut gmedia gmp gnutella gnutls gpgme gphoto2 gpm graphviz gs gsm gstreamer gtk gtkhtml hal hash haskell hddtemp hdri highlight history hou howl-compat hpnhtmlhandbook http httpd icons iconv icq icu id3 id3tag idn ieee1394 image imagemagick inifile inkjar inline innodb inode inotify ipod ipv6 isdnlog ithreads j2me jabber jack java java-internal java5 javascript jbig jce jikes jingle jms jmx joystick jpeg jpeg2k kcal kde kde4 kdeenablefinal kdehiddenvisibility kdm kerberos kig-scripting kqemu ladspa lame lapack latex lcms ldap ldap-sasl libcaca libffi libgcrypt libnotify libsamplerate libsexy libssh2 libtommath libvisual libwww live lm_sensors logitech-mouse lzo mad magic maps math matroska md5sum mdnsresponder-compat mhash midi mikmod mime ming mjpeg mmap mmx mmxext mng modplug mono moonlight motif mozdom mozembed moznopango mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer mtp mudflap multiuser musepack music musicbrainz mysql mysqli ncurses nepomuk net netboot netjack network network-cron networkmanager new-clx nfs nis nls nntp no-helper nocd normalize nova nowin nowlistening nptl nptlonly nsplugin ntfs numeric nvidia offensive ogg openal openexr opengl openmp openssl opensslcrypt oscar pam pangopccts pch pcmcia pcntl pcre pdf perfprofiling perl perlsuid php physfs plasma plib plotutils plugins pmu png pnm pop posix postproc postscript ppds pppd prediction prelude psyco pulseaudio pyste python qt-copy qt-static qt3 qt3support qt4 query-browser quicktime rar rdesktop react readline real realmedia reflection reiser4 reiserfs remix replaygain replytolist rtc rtsp samba sasl scenarios sdl sdl-image semantic-desktop sensord server session shorten simplexml skins slang slp smime sms smtp sndfile snmp snortsam soap sockets socks5 sou sound soundex sounds sox speex spell spl sql sqlite sqlite3 srp srt sse sse2 ssl startup-notification statistics stream subversion suhosin suid svg svga svgz swat swig syslog sysvipc szip taglib tagwriting tcl tcpd tetex texteffect textures tga themes theora threads thunderbird tidy tiff timestats tk tokenizer tomsfastmath toolbar toolkit-scroll-bars tordns translator trayicon truetype tunepimp twolame unicode upnp usb userlocales userpriv vcd vcdx vhosts videos vim vim-pager vim-syntax vim-with-x visualization vlm vnc vncviewer voice vorbis vorbis-psy vpopmail wavpack webdav webpresence wifi win32codecs winbind wireshark wma wmf wmp wordexp workbench wxwindows x264 x86 xanim xattr xcb xcomposite xemacs xface xfce xforms xft xine xinerama xinetd xml xmldoclet xmlreader xmlrpc xmlwriter xorg xosd xpm xrender xscreensaver xsl xulrunner xv xvid xvmc xvnc yv12 zip zlib zoran" ALSA_CARDS="hda-intel" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_defaultauthz_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 joystick" KERNEL="linux" LCD_DEVICES="g15 ncurses text xosd" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Tom Bicer 2008-12-27 17:46:47 UTC
Boot with Gentoo provided kernel try again.
Comment 2 Zac Medico gentoo-dev 2008-12-27 18:11:53 UTC
(In reply to comment #0)
> The title says it all. I don't remember this ever happening in the past (pre
> 2.2), though I may have just been lucky. This seems to happen every time
> portage tries to calculate dependencies while another portage instance is
> cleaning a package. The former instance crashes with the following error:
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies  
> 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 9434, in emerge_main
>     myopts, myaction, myfiles, spinner)
>   File "/usr/lib/portage/pym/_emerge/__init__.py", line 8609, in action_build
>     mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
>   File "/usr/lib/portage/pym/_emerge/__init__.py", line 1921, in __init__
>     pkg_cache=self._pkg_cache)
>   File "/usr/lib/portage/pym/_emerge/__init__.py", line 1014, in __init__
>     metadata = dict(izip(mykeys, real_dbapi.aux_get(cpv, mykeys)))
>   File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 691, in aux_get
>     raise KeyError(mycpv)
> KeyError: 'sys-kernel/zen-sources-2.6.26_rc8-r10'
> 
> (Here, the other portage instance was in the middle of cleaning
> sys-kernel/zen-sources-2.6.26_rc8-r10')

I guess this traceback happened in an emerge process that didn't have root privileges. Otherwise, it would have been able to obtain a lock on /var/db/pkg in order to ensure that the parallel emerge processes wouldn't modify it during this section of code.

(In reply to comment #1)
> Boot with Gentoo provided kernel try again.

I doubt that it has anything to do with the kernel. The error is normal if the dependency calculation is run by an unprivileged user.
Comment 3 Zac Medico gentoo-dev 2018-06-13 05:33:04 UTC
*** Bug 594002 has been marked as a duplicate of this bug. ***
Comment 4 Zac Medico gentoo-dev 2018-06-13 05:34:16 UTC
*** Bug 658024 has been marked as a duplicate of this bug. ***