Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196440 (Deadlock_Condition) - portage-2.1.3.9 - lockfile deadlock on parallel unmerge
Summary: portage-2.1.3.9 - lockfile deadlock on parallel unmerge
Status: RESOLVED FIXED
Alias: Deadlock_Condition
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High minor
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 19:17 UTC by Yogesh Sharma
Modified: 2013-02-15 21:49 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 Yogesh Sharma 2007-10-19 19:17:14 UTC
I was able to create a deadlock via a race condition involving two emerges trying to create a lockfile at the same time.  This was caused when two unemerges where trying to start at the same time and both tried to create lockfiles at the same time.  One unemerge tried to create a lockfile twice (possibly overwriting the other emerge's lockfile?).  In order to get either process to continue i had to stop one of the unemerges and restart it after the other unemerge was completed.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 19:22:58 UTC
Post emerge --info output or at least portage version, please.

Comment 2 Yogesh Sharma 2007-10-19 19:41:44 UTC
Sorry about that i thought i had included this info

MasterServer ~ # emerge --info
Portage 2.1.3.9 (selinux/2007.0/x86, gcc-4.1.2, glibc-2.5-r4, 2.6.22-hardened-r3 i686)
=================================================================
System uname: 2.6.22-hardened-r3 i686 Intel(R) Pentium(R) 4 CPU 3.06GHz
Timestamp of tree: Fri, 19 Oct 2007 18:30:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-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
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe -fomit-frame-pointer -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /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/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -pipe -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages loadpolicy metadata-transfer parallel-fetch sandbox selinux sesandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo ftp://ftp.ndlug.nd.edu/pub/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=" "
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi aiglx alsa apache2 apm arts artworkextra aspnet2 audiofile berkdb bitmap-fonts bzip2 cairo cddb cdr cjk cli cracklib crypt ctype cups curl dbus djvu dlloader dri dvd dvdr dvdread esd exif fam ffmpeg firefox flac font-server fortran fuse gcj gd gdbm gif glitz gnome gphoto2 gpm gtk hal hardened hardenedphp iconv ipv6 isdnlog java jpeg jpeg2k kdehiddenvisibility midi mozbranding mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl pic png povray pppd python qt3 qt4 readline real reflection samba selinux session slang spell spl ssl tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb utempter vorbis widescreen win32codecs x86 xcomposite xine xml xorg xscreensaver xv xvid 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Zac Medico gentoo-dev 2007-10-20 01:04:57 UTC
When it deadlocked, did both emerge processes say "waiting for lock on /var/db/.pkg.portage_lockfile"?

I think I've seem a similar deadlock before when doing tests for bug #121819, but it was difficult to trigger so it wasn't a high priority to fix it. I'd still like to get it fixed though.
Comment 4 Yogesh Sharma 2007-10-20 14:30:58 UTC
Yes both processes said "waiting for lock on
/var/db/.pkg.portage_lockfile" ... Actually the second process had that message twice in a row.  The specifics of how i triggered it was by having an emerge uDNa world copying files to the system while i was trying to unemerge a version of hardened sources.  Unemerging hardened sources had to wait on the lockfile to begin and when the other emerge goes to unemerge the old version (emerge -c) it enters the race condition with the other unemerge.
Comment 5 Zac Medico gentoo-dev 2013-02-15 21:49:02 UTC
Please re-open if this problem still exists.