Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192766 - Portage exits randomly and spontaneously with "Alarm clock" message
Summary: Portage exits randomly and spontaneously with "Alarm clock" message
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-17 05:02 UTC by Stephan Sokolow
Modified: 2008-03-02 13:44 UTC (History)
1 user (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 Stephan Sokolow 2007-09-17 05:02:57 UTC
On my system, Portage exits randomly and spontaneously with an "Alarm clock" message which, as far as I can tell, means an uncaught SIGALRM.

I've observed the problem in revdep-rebuild during the "assigning files to packages" step, and in directly-called emerge, but --debug gives no additional information on where in the "Calculating world dependencies" step it fails, and I have yet to trigger it during a compile since starting to use --debug.

I'm not sure what would be throwing or catching SIGALRM in portage, so my search for the problem dead-ended with `strings /lib/libc.so.6`.

As for the solution, despite a lot of googling, and some asking in #gentoo @ FreeNode, I have been unable to find a single clue.

Reproducible: Sometimes
Comment 1 Stephan Sokolow 2007-09-17 06:03:15 UTC
Oops. I forgot this.

Portage 2.1.2.12 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.22-gentoo-r5-20070811 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r5-20070811 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 17 Sep 2007 05:30:09 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r2
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
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
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"
CXXFLAGS="-march=k8 -O2 -pipe -ggdb"
DISTDIR="/usr/portage_bulk/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userfetch"
GENTOO_MIRRORS="http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/"
LANG="en_CA.utf8"
LC_ALL="en_CA.utf8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage_bulk/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=280"
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="/usr/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/pythonhead"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac aalib acl acpi addbookmarks adns adplug agg aim alias alsa amd64 amr amuled animgif anthy ao aotuv apache2 asf audacious audiofile autoipd autoreplace avahi bash-completion berkdb bidi bitmap-fonts bittorrent blender-game bookmarks bzip2 cairo calendar caps cdda cddb cdio cdparanoia cdr chardet cjk cli connectionstatus contactnotes contrarius cracklib cran crypt cscope css ctype cups curl curlwrappers cvs d daap dba dbus dga dia directfb discard-path diskio divx doc dri dts dvd dvdr dvdread elf emacs emboss emovix enca encode epydoc esd evo examples exif expat extrafilters fam fame fastcgi fasttrack fbcon ffmpeg fftw firefox flac flash flatfile fltk fluidsynth flup force-cgi-redirect fortran fpx ftp gadu gd gdbm ggi gif gimp glade glep glib glitz glsa glut gmedia gmp gnutella gnutls gphoto2 gpm graphviz gs gtk gtk2 guile gzip-el hal hddtemp highlight history howl howl-compat hpn html httpd iconv icq idn ifp imagemagick imap imlib immqt-bc inifile inkjar innodb inquisitio ipod ipv6 irc isdnlog ithreads jabber jack javascript jbig jce jikes jingle joystick jpeg json junit jython kde kdeenablefinal kerberos kig-scripting kipi kqemu ladcca latex lcms ldap leim lesstif libcaca libgda libnotify libvisual libwww lirc live lm_sensors logrotate lua lzo lzw mad matroska mbrola md5sum mdnsresponder-compat memlimit metalink mhash midi migemo mikmod mime ming mjpeg mmap mmx mng mod modplug mozbranding mozdevelop mozilla mozsvg mp2 mp3 mp4 mpeg mpi mplayer msn mtp mudflap mule musepack musicbrainz mysql mysqli nas ncurses net network nforce2 nis njb nls no-old-linux nodrm notify nowlistening nptl nptlonly numeric nvidia ocaml odk offensive ogg openal openft opengl openid openmp oscar oss ots pam pango pch pcntl pcre pdf perl php pic pmu png pnm portage portaudio posix postgres postscript pppd python qt3 qt3support qt4 quicktime readline realmedia reflection restrict-javascript rpm rtc rtsp samba sasl savepwd scanner screen script sdl sdl-image sensord session sharedext shorten shout sid simplexml skey skins slang slp smux sndfile snmp soap sockets socks5 sound soundex sox speex spell spl sql sqlite sqlite3 srt sse sse2 ssl statistics stream subversion suhosin svg sysfs sysvipc tcltk tcpd tetex texteffect themes theora threads threadsafe tidy tiff timidity tokenizer tordns translator truetype truetype-fonts tta type1-fonts unicode usb utempter utf8 utils v4l v4l2 vcd verse vlm vnc vorbis wavpack webdav webpresence winpopup wma wmf wmp wxwindows x264 xattr xcb xchatdccserver xcomposite xforms xine xinerama xml xmlreader xmlrpc xmlwriter xorg xpm xprint xscreensaver xsl xv xvid xvmc yaepg yahoo yaz yv12 zeroconf zip zlib" ALSA_CARDS="intel_hda" 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="evdev joystick keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="streamzap" USERLAND="GNU" VIDEO_CARDS="fbdev nvidia nv vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2007-09-17 22:51:43 UTC
Any ideas from you guys?
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-09-17 23:20:31 UTC
Not without seeing the exact error message with context.
Comment 4 Zac Medico gentoo-dev 2007-09-18 02:18:41 UTC
(In reply to comment #0)
> I'm not sure what would be throwing or catching SIGALRM in portage,

There are exactly 2 places where portage uses SIGALRM and neither one of them is in the code path for calculating dependencies. The alarms are used to implement timeouts for rsync and elog and those alarms are carefully canceled with finally blocks. The spurious SIGALRM that you seem to be experiencing must originate from somewhere other than the portage codebase.
Comment 5 Stephan Sokolow 2007-09-18 05:40:24 UTC
Now that I think about it, most likely. I've seen it happen in the middle of a compile. (Right between two gcc lines)

However, it doesn't stop the compile. It just causes portage to exit once the compile is done rather than merging the result. I forget whether it does the 'make install'. 

Since hitting enter during subsequent compilation redraws the command prompt, I can only assume the compiles following the "Alarm clock" are because the build system is running in a background process unaffected by SIGALRM. Probably has something to do with my use of MAKEOPTS="-j3".
Comment 6 Stephan Sokolow 2007-09-19 23:10:25 UTC
Here's a new one...

. done!
[ebuild     U ] sys-apps/man-pages-2.64 [2.63] USE="nls" 1,799 kB
[ebuild  N    ] media-libs/libsvg-0.1.4  359 kB
[ebuild     U ] net-firewall/iptables-1.3.8-r1 [1.3.5-r4] USE="ipv6 -extensions -imq -l7filter -static" 169 kB
[ebuild     U ] app-office/openoffice-2.3.0 [2.2.1] USE="cairo cups dbus firefox gtk kde ldap odk pam sound webdav -binfilter -debug -eds -gnome -gstreamer -java -mono -seamonkey -xulrunner% (-branding%)" LINGUAS="en -af -ar -as_IN -be_BY -bg -bn -br -bs -ca -cs -cy -da -de -dz -el -en_GB -en_US -en_ZA -eo -es -et -fa -fi -fr -ga -gl -gu_IN -he -hi_IN -hr -hu -it -ja -km -ko -ku -lt -lv -mk -ml_IN -mr_IN -nb -ne -nl -nn -nr -ns -or_IN -pa_IN -pl -pt -pt_BR -ru -rw -sh_YU -sk -sl -sr_CS -ss -st -sv -sw_TZ -ta_IN -te_IN -tg -th -ti_ER -tn -tr -ts -uk -ur_IN -ve -vi -xh -zh_CN -zh_TW -zu" 174,872 kB

Total: 8 packages (3 upgrades, 1 new, 4 reinstalls), Size of downloads: 177,197 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage

Would you like to merge these packages? [Yes/No] Alarm clock
ssokolow@monolith ~ $
Comment 7 Stephan Sokolow 2007-10-19 18:22:42 UTC
Update: Now it more commonly kills the compile on the spot rather than when the compile phase completes. Might that inconsistency have something to do with my running -j3 parallel make on a dual-core system?
Comment 8 Stephan Sokolow 2007-10-19 18:33:55 UTC
I just checked pkgcore and it has the same problem. On the test run, the compile continued beyond the Alarm Clock message as it sometimes does with Portage, but pkgcore gave some extra output...

[... GCC and make output from the compile phase ...]
Alarm clock
coms error, read failed: backing out of daemon.
ssokolow@monolith ~ $
[... more GCC and make output ...]
/usr/lib64/python2.5/site-packages/pkgcore/bin/ebuild-env/ebuild.sh: line 19: echo: write error: Broken pipe
coms error, read failed: backing out of daemon.

Any ideas now?
Comment 9 Zac Medico gentoo-dev 2007-10-19 18:44:21 UTC
(In reply to comment #8)
> /usr/lib64/python2.5/site-packages/pkgcore/bin/ebuild-env/ebuild.sh: line 19:
> echo: write error: Broken pipe
> coms error, read failed: backing out of daemon.

That's just another symptom that says nothing about what's triggering the alarm signal.  It seems like you'll have to use strace or something like that trace the source of those spurious alarm signals. I'm removing the dev-portage alias since it's clearly outside the scope of portage.
Comment 10 Wulf Krueger (RETIRED) gentoo-dev 2008-03-02 13:33:29 UTC
 (In reply to comment #8)
> I just checked pkgcore and it has the same problem. 

Re-open this bug when you have the strace output as requested in comment 9. Please attach it as a file to this bug.
Comment 11 Stephan Sokolow 2008-03-02 13:44:44 UTC
Noted. I'm low on time, so it may take a while, but I've added it to my TODO list.