Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101240 - race condition in portage.unmerge()
Summary: race condition in portage.unmerge()
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 136244
  Show dependency tree
 
Reported: 2005-08-03 12:04 UTC by Carsten Lohrke (RETIRED)
Modified: 2006-09-06 14:20 UTC (History)
0 users

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 Carsten Lohrke (RETIRED) gentoo-dev 2005-08-03 12:04:38 UTC
--- !empty dir /usr/kde/3.4/etc
--- !empty dir /usr/kde/3.4
--- !empty dir /usr/kde
--- !empty dir /usr
>>> Regenerating /etc/ld.so.cache...
>>> Regenerating /etc/ld.so.cache...
>>> Auto-cleaning packages ...

 kde-base/cervisia
    selected: 3.4.1
   protected: 3.4.2
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging kde-base/cervisia-3.4.1...
waiting for lock on /var/db/pkg/kde-base/-MERGING-cervisia-3.4.1.portage_lockfile
No package files given... Grabbing a set.
/usr/lib/portage/bin/ebuild.sh: line 1686:
/var/db/pkg/kde-base/cervisia-3.4.1/cervisia-3.4.1.ebuild: No such file or directory

!!! ERROR: kde-base/cervisia-3.4.1 failed.
!!! Function , Line 1686, Exitcode 1
!!! error sourcing ebuild
!!! If you need support, post the topmost build error, NOT this status message.

!!! FAILED prerm: 1
Comment 1 Brian Harring (RETIRED) gentoo-dev 2005-08-04 00:42:30 UTC
provide emerge info, command that triggered it.
comments on parallel kind of make me think this probably an invalid, since
parallel emerge execution is playing russian roulete somewhat.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2005-08-04 03:44:44 UTC
> provide emerge info, command that triggered it.

Oh well, you can see the Portage version in the summary. I ran two concurrent
emerge processes (different ebuilds of course). The one that did _not_ the
cervisia-3.4.2 update tried to unmerge cervisia-3.4.1 and produced the above
output. I guess both processes entered unmerge phase at the same time and
Portage is missing some check to avoid that it tries to unmerge the same
ebuildmore than once.

>comments on parallel kind of make me think this probably an invalid, since
parallel emerge execution is playing russian roulete somewhat.

I don't see why this should be invalid. A Portage version that can't deal with
concurrent emerge processes simply is buggy. :] Also there have been a couple of
improvements lately iirc, so I wanted to play roulette to give Portage some
testing in this regard.



Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.4.28-gentoo-r9 i686)
=================================================================
System uname: 2.4.28-gentoo-r9 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache cvs distlocks fixpackages keeptemp keepwork noclean
nostrip sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo
ftp://ftp.berlios.de/pub/gentoo-deutsch
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X X509 acl acpi acpi4linux activefilter alsa antlr
apache1 apm arts artswrappersuid auctex audiofile avi bash-completion bcel
berkdb bitmap-fonts cddb cdparanoia cdr chroot clisp cmucl crypt cscope css cups
curl devmap dga directfb divx4linux dnd doc dv dvb dvd dvdr editor edl eds emacs
emboss encode ext-png ext-zlib faad fam fbcon ffmpeg firebird flac foomaticdb
foreign-package fortran gcj gcl gd gdbm ggi gif glut gphoto2 gpm graphviz
gstreamer gtk2 hbci idl imagemagick imap imlib innodb jack jack-tmpfs javascript
jpeg junit kde ladcca lcms ldap lesstif libg++ libwww lirc live lm_sensors log4j
ltsp lzo mad maildir matroska mbox md5sum mikmod mmx mng mozilla moznocompose
moznoirc moznomail mozsvg mp3 mpeg mupad-noscilab musepack mysql nas ncurses
network nls oav ogg oggvorbis openal opengl oss pam pcap pdflib perl pg-hier php
physfs plotutils png pnp postgres ppds python qt quicktime readline real regexp
rtc ruby samba sasl scanner sdl skey slang slp snmp sox speex spell sqlite sse
ssl subversion svg svga tcpd tetex theora tiff transcode truetype truetype-fonts
type1-fonts usb vim-with-x vorbis win32codecs wmf xalan xerces xine xml2 xv xvid
yaz zeo zeroconf zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-04 07:02:01 UTC
Portage has never 'officially' supported running in parallel.  IMHO the fixes to
stable to make this work are far too many for it to be considered.  Portage-2.0
was not designed to be run in a parallel fashion.
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2005-08-04 07:36:06 UTC
(In reply to comment #3)
> Portage has never 'officially' supported running in parallel.

That doesn't make the bug invalid. If you don't think so, I don't understand why
it has not been blocked in between.


> IMHO the fixes to stable to make this work are far too many for it to be
considered.

O.k.
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2006-09-06 09:14:10 UTC
Just ra into this again. What makes it worse is that it caused the prerm phase to fail.


 net-p2p/bittorrent
    selected: 4.2.2
   protected: 4.4.0
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging net-p2p/bittorrent-4.2.2...
waiting for lock on /var/db/pkg/net-p2p/bittorrent-4.2.2.portage_lockfile
No package files given... Grabbing a set.
/usr/lib/portage/bin/ebuild.sh: line 1451: /var/db/pkg/net-p2p/bittorrent-4.2.2/bittorrent-4.2.2.ebuild: No such file or directory

!!! ERROR: net-p2p/bittorrent-4.2.2 failed.
Call stack:
  ebuild.sh, line 1451:   Called die

!!! error sourcing ebuild
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! FAILED prerm: 1


If you still don't intend to do something about it with regards to the current code base - I for one think, it is needed - mark as later, not as won't fix, please.
Comment 6 Zac Medico gentoo-dev 2006-09-06 13:23:20 UTC
This is fixed in svn r4418.
Comment 7 Zac Medico gentoo-dev 2006-09-06 14:20:10 UTC
This has been released in 2.1.1_rc1-r6.