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

Bug 163406

Summary: Bad RC_RETRY_COUNT value in rc-daemon.sh
Product: Gentoo Linux Reporter: Ivar Ylvisaker <ylvisaki>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: minor CC: jcat, Jimmy.Jazz, picander78
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ivar Ylvisaker 2007-01-23 07:50:51 UTC
The following error message has starting appearing when I shut my computer down:

/lib/rcscripts/sh/rc-daemon.sh: line 137: ((: TERM/5/TERM/5: division by 0 (error token is "/5")
Error stopping kdm

Similar errors are reported here:

http://forums.gentoo.org/viewtopic-t-533562-highlight-rcdaemon.html
http://forums.gentoo.org/viewtopic-t-532961-highlight-rcdaemon.html

Here is line 137:

   137         for (( i=0; i<RC_RETRY_COUNT*10; i++ )); do

I did some investigating.  RC_RETRY_COUNT is initially set in rc-daemon.sh to 5.  However, after the following lines are executed, the value on my computer is "TERM/5/TERM/5".

     68                         -R|--retry)
     69                                 unset RC_RETRY_COUNT
     70                                 addvar="RC_RETRY_COUNT"
     71                                 ;;

The value is still set to "TERM/5/TERM/5" when line 137 is executed. The error is the result.

Ivar

Reproducible: Always

Steps to Reproduce:
1. Shutdown or reboot computer
2.
3.

Actual Results:  
Error message

Expected Results:  
No error message

emerge --info:
Portage 2.1.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r4 i686)
=================================================================
System uname: 2.6.19-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System release 1.12.6
Last Sync: Tue, 23 Jan 2007 06:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
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.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=pentium4 -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 apm berkdb bitmap-fonts cli cracklib crypt cups dlloader doc dri dvb dvd dvdread eds elibc_glibc emboss encode esd foomatic foomaticdb gdbm gif gmedia gpm gstreamer gtk gtk2 iconv imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ libwww live mad mikmod mjpeg mmx motif mozilla mp3 mpeg mysql ncurses nls nptl nptlonly nsplugin ogg opengl oss pam pcre pdf perl png pppd python qt qt3 qt4 quicktime readline real realmedia reflection scanner sdl session spell spl sqlite sse ssl tcltk tcpd truetype truetype-fonts type1-fonts udev usb userland_GNU v4l v4l2 video_cards_fglrx video_cards_radeon video_cards_vesa vorbis win32codecs wmp x264 xml xorg xprint xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-01-23 08:05:44 UTC
You need to upgrade to baselayout-1.12.9
Comment 2 jcat 2007-01-23 09:32:09 UTC
I have the same issue, surely just upgrading to the testing version is not a valid fix???  Here's my emerge --info

emerge --info
Portage 2.1.2-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r6 i686)
=================================================================
System uname: 2.6.18-gentoo-r6 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Timestamp of tree: Mon, 22 Jan 2007 09:00:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
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.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -msse2 -msse3 -pipe -fomit-frame-pointer"
CHOST="i686-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/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -msse2 -msse3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/sourceforge /usr/local/overlays/googlecode /usr/portage/local/layman/xeffects /usr/portage/local/layman/xeffects-experimental"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apache2 berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dlloader dri dvb dvd dvdr dvdread eds emboss encode esd fam fbdev firefox flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal howl iconv imap ipod ipv6 isdnlog jpeg ldap libg++ libwww lirc live mad maildir mikmod mmx mozilla mp3 mpeg mysql nas ncurses network nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre perl png ppds pppd python qt qt3 qt4 quicktime readline real reflection rtc sasl sdl session spell spl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts udev unicode vorbis win32codecs x86 xine xml xorg xv xvid xvmc zlib" ALSA_CARDS="snd-intel8x0" 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" DVB_CARDS="usb-a800" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="devinput" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-01-23 10:05:16 UTC
(In reply to comment #2)
> I have the same issue, surely just upgrading to the testing version is not a
> valid fix???  Here's my emerge --info

You're using the "testing version" of xinit.
HINT - both are currently ~ARCH
Comment 4 jcat 2007-01-23 10:22:23 UTC
<EMBARRASSMENT>Ok, it's a fair cop.  I had overlooked that.</EMBARRASSMENT>

Hehehe...  ...I guess it's testing baselayout for me then!
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-01-27 12:15:20 UTC
*** Bug 163886 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-02-07 09:37:16 UTC
*** Bug 165731 has been marked as a duplicate of this bug. ***
Comment 7 David Grant 2007-02-17 04:57:20 UTC
or you can downgrade xinit