Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 252572

Summary: emerge never ending dependendency calculatioins
Product: Portage Development Reporter: Peter Volkov (RETIRED) <pva>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 210077, 216231    
Attachments: make.conf
portage.tbz2
output of emerge -dav
fix infinite loop triggered by unresolvable blockers

Description Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:11:33 UTC
I'm not sure what information I should provide here. The issue is emerge hangs on:

 # emerge -av compiz-fusion

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

Calculating dependencies \

infinitely (spinner is rotating at the same time).
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:15:02 UTC
Created attachment 176417 [details]
make.conf

This is make.conf. It was the last file I've modified before I've started to experience this issue. This only change I did was adding hal USE flag there. If I remove hal USE flag dependency calculation succeeds. If it's not.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:16:36 UTC
Created attachment 176418 [details]
portage.tbz2
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:17:08 UTC
Comment on attachment 176418 [details]
portage.tbz2

this is contents of /etc/portage directory to the moment.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:17:54 UTC
And in the /var/lib/portage/world file I have only:
app-editors/vim
app-portage/eix
dev-util/ccache
sys-apps/iproute2
sys-apps/pciutils
x11-libs/cairo
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 09:19:22 UTC
 # emerge --info
Portage 2.1.6.3 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.27-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-glibc2.2.5
Timestamp of tree: Thu, 25 Dec 2008 08:05:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  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:   1.5.26
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -ggdb"
DISTDIR="/vt/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="ccache collisioin-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed"
LINGUAS="ru en en_GB en_US"
MAKEOPTS="-j4"
PKGDIR="/vt/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="/vt/portage/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl amd64 bzip2 cairo caps cli cracklib crypt cups dbus djvu dri glitz gtk hal iconv ipv6 isdnlog ithreads jpeg midi mmx mudflap multilib ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre png pppd readline reflection session spl sse sse2 ssl svg sysfs tiff truetype unicode xcb xorg 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 6 Zac Medico gentoo-dev 2008-12-26 09:57:51 UTC
Can you post --debug output for the calculation that doesn't stop. Obviously you'll have to cut it off somewhere, but the output will probably establish some sort of looping pattern that will help us diagnose the problem.
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2008-12-26 12:23:52 UTC
Created attachment 176435 [details]
output of emerge -dav

It calculates dependencies rather fast, then hangs and puts dots at random times into output.
Comment 8 Zac Medico gentoo-dev 2008-12-26 20:05:07 UTC
The debug output shows two unresolved blockers that seem to be triggering the bug:

  sys-apps/hal-0.5.11-r1 blocks >=sys-fs/udev-125
  sys-fs/cryptsetup-1.0.5-r1 blocks >=sys-fs/udev-126

Hopefully I'll be able to reproduce it and make a patch pretty soon.
Comment 9 Zac Medico gentoo-dev 2008-12-26 20:56:50 UTC
Created attachment 176467 [details, diff]
fix infinite loop triggered by unresolvable blockers

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

  patch /usr/lib/portage/pym/_emerge/__init__.py /tmp/blocker_loop.patch

I haven't been able to reproduce the problem yet, but hopefully this patch solves it.
Comment 10 Peter Volkov (RETIRED) gentoo-dev 2008-12-27 07:02:56 UTC
With this patch emerge outputs the following error:

 # emerge -av compiz-fusion

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

Calculating dependencies... done!


[nomerge      ] x11-wm/compiz-fusion-0.7.8  USE="-emerald -gnome -kde -unsupported"
[nomerge      ]  x11-apps/ccsm-0.7.8-r1
[nomerge      ]   dev-python/compizconfig-python-0.7.8
[nomerge      ]    x11-libs/libcompizconfig-0.7.8
[nomerge      ]     x11-wm/compiz-0.7.8  USE="cairo dbus gtk svg -fuse -gnome -kde -kde4"
[nomerge      ]      x11-base/xorg-server-1.5.3  USE="hal ipv6 nptl xorg (-3dfx) -debug -dmx -kdrive -minimal -sdl -tslib" INPUT_DEVICES="evdev synaptics -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -keyboard -magellan -microtouch -mouse -mutouch -palmax -penmount -spaceorb -summa -tek4957 -tslib -ur98 -vmmouse -void -wacom" VIDEO_CARDS="intel -apm -ark -ast -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -mach64 -mga -neomagic (-newport) (-nsc) -nv -nvidia -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -vesa -vga -via -vmware -voodoo (-xgi)"
[nomerge      ]       x11-drivers/xf86-input-evdev-2.1.0  USE="hal -debug"
[ebuild  N    ]        sys-apps/hal-0.5.11-r1  USE="X crypt -acpi -apm -debug -dell -disk-partition -doc -laptop (-selinux)"
[ebuild  N    ]         dev-python/pyxf86config-0.3.34-r1
[ebuild  N    ]          x11-base/xorg-server-1.5.3  USE="hal ipv6 nptl xorg (-3dfx) -debug -dmx -kdrive -minimal -sdl -tslib" INPUT_DEVICES="evdev synaptics -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -keyboard -magellan -microtouch -mouse -mutouch -palmax -penmount -spaceorb -summa -tek4957 -tslib -ur98 -vmmouse -void -wacom" VIDEO_CARDS="intel -apm -ark -ast -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -mach64 -mga -neomagic (-newport) (-nsc) -nv -nvidia -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -vesa -vga -via -vmware -voodoo (-xgi)"

 * Error: circular dependencies:

('ebuild', '/', 'sys-apps/hal-0.5.11-r1', 'merge') depends on
  ('ebuild', '/', 'dev-python/pyxf86config-0.3.34-r1', 'merge') (hard)
('ebuild', '/', 'x11-base/xorg-server-1.5.3', 'merge') depends on
  ('ebuild', '/', 'sys-apps/hal-0.5.11-r1', 'merge') (hard)
('ebuild', '/', 'dev-python/pyxf86config-0.3.34-r1', 'merge') depends on
  ('ebuild', '/', 'x11-base/xorg-server-1.5.3', 'merge') (hard)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.

So probably circular dependencies were root cause for this problem and with this patch problem visible. Although problem is fixed I'll hold back further merges in case you want me to test anything else. Or, Zac, are you satisfied with this fix? (I am :) )
Comment 11 Zac Medico gentoo-dev 2008-12-27 07:14:02 UTC
Yes, I'm satisfied with it. Thanks for testing. :)
Comment 12 Zac Medico gentoo-dev 2008-12-28 01:24:54 UTC
This is fixed in 2.1.6.4 and 2.2_rc20.