Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328693 - emerging app-i18n/canna-3.7_p3-r1 in background hangs
Summary: emerging app-i18n/canna-3.7_p3-r1 in background hangs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-17 08:04 UTC by Joe Breuer
Modified: 2021-04-18 22:01 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 Joe Breuer 2010-07-17 08:04:42 UTC
I was running 'emerge -bDNauvt world' on my system, with EMERGE_DEFAULT_OPTS="-j --load-average=4" set.

The output of the emerge would always stop updating after some time/some packages built and installed.

After a few iterations of this, I noticed 'canna' always being in the vincinity of *installations* (not builds) being performed shortly before the hang.

I tried to install canna (the just-built binary package) seperately using "emerge -kbDNauvt -1 -j1 canna"; which showed a file collision on "/var/lib/canna/dic/canna/.keep_app-i18n_canna-0"; this file was shown not to be owned by any package.

[I have "collisions against un-owned files" turned on as I do not want emerge to accidently overwrite things I need to have installed without an ebuild - i.e. portage having no knowledge of its being there.]

BUG: The first-mentioned parallel emerge should display this error and exit cleanly, not hang.


I then proceeded to install canna overwriting the colliding file using 'FEATURES="-collision-protect" emerge -kbDNauvt -1 -j1 canna'.

This proceeded to install the canna package; after unmerging the old version the following notice is shown:

 *
 * Restarting Canna
 *
 * Starting canna...     [ ok ]

And here the ebuild would, again, hang.

On a hunch I typed "/etc/init.d/canna stop" in a different terminal, which caused the hangig ebuild to proceed with:

>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
 *
 * Updating dics.dir for Canna ...
 *
 * Added //var/lib/canna/dic/dics.d/00canna.dics.dir.
 *
 * Done.
 *
 *
 * Canna dictionary format has been changed.
 * You should rebuild app-dict/canna-* after emerge.
 *
>>> Regenerating /etc/ld.so.cache...
... followed by the file collision message.
Then, the emerge command exited cleanly.

BUG: The canna ebuild should not hang on update when canna is running.
[I suspect the newly-started canna daemon from the ebuild to net be "detached enough" from its controlling environment, thereby blocking the further execution of the ebuild.]


Reproducible: Always

Steps to Reproduce:
[Conjecture, I did not try to reproduce this]

1. Have canna running on your system
2. update canna using 'emerge -bDNauvt world' or 'FEATURES="-collision-protect" emerge -kbDNauvt -1 -j1 canna'
3. observe emerge hanging after some time

Actual Results:  
Both above-mentioned emerges of canna hang.

Expected Results:  
emerge successfully installs canna; or failing to do so should exit displaying a specific error message.

Hm. Now I'm not so sure whether this is a bug against the canna ebuild or rather against portage itself: It should not be possible for an ebuild to make it misbehave in this opaque way.


Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-i686-Intel-R-_Core-TM-2_Duo_CPU_E8600_@_3.33GHz-with-gentoo-1.12.13
Timestamp of tree: Thu, 15 Jul 2010 04:45:03 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /usr/share/X11/xkb"
CXXFLAGS="-march=core2 -O2 -pipe -momit-leaf-frame-pointer"
DISTDIR="/var/portage-distfiles"
EMERGE_DEFAULT_OPTS="-j --load-average=4"
FEATURES="assume-digests buildpkg ccache collision-protect distcc distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://gentoo.mneisen.org/ http://gentoo.wheel.sk/ http://gentoo.mirror.pw.edu.pl/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j -l 6"
PKGDIR="/var/portage-packages/gencd"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/jmbreuer /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr chardet cjk cli consolekit cracklib crypt css cups curl cxx dbus dga dri dts dv dvd dvdr emboss encode exif fam fame fastcgi ffmpeg firefox flac flash fluidsynth foomaticdb gcj gd gdbm gif gimp glitz glut gphoto2 gpm gstreamer gtk hal iconv icu ieee1394 imap imlib innodb ipv6 java jce jpeg kde kerberos kpathsea lame lcms ldap leim libgda libnotify libsamplerate lm_sensors lzo mad mbox mikmod mjpeg mmx mmxext mng modplug modules mono mp3 mp4 mpeg mudflap mule ncurses network network-cron nis nls nptl nptlonly nsplugin nvidia offensive ogg openexr opengl openmp pam pango pcap pcre pda pdf perl plotutils png ppds pppd python qt3support qt4 rdesktop readline reflection rtc samba sasl sdk sdl semantic-desktop session shout slang slp sndfile socks5 sound sox spell spl sqlite sse sse2 ssl ssse3 startup-notification subversion svg sysfs tcpd theora tiff tk truetype trusted unicode usb vdpau vim-syntax vorbis webdav wma wmf x264 x86 xanim xcb xcomposite xemacs xiph xml xorg xscreensaver xulrunner 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 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 cgi cgid 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="keyboard mouse wacom evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" RUBY_TARGETS="ruby18" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-07-19 16:29:48 UTC
Looks like it could be caused by something in this block of code:

pkg_prerm() {
    if [ -S /tmp/.iroha_unix/IROHA ] ; then
        # make sure cannaserver get stopped because otherwise
        # we cannot stop it with /etc/init.d after emerge -C canna
        einfo
        einfo "Stopping Canna for safe unmerge"
        einfo
        /etc/init.d/canna stop
        touch "${T}"/canna.cookie
    fi
}

I don't see why the ebuild should care to stop the daemon - looks like the user's responsibility to me.