Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109567 - BOINC! isn't launched without using the --chdir option of start-stop-daemon
Summary: BOINC! isn't launched without using the --chdir option of start-stop-daemon
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-17 06:22 UTC by Benjamin Gaillard
Modified: 2005-10-29 07:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
trivial patch for passing --dir to boinc_client (etc-initd-boinc.diff,307 bytes, patch)
2005-10-21 08:33 UTC, Mark Glines
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Gaillard 2005-10-17 06:22:37 UTC
For about a week now, BOINC! wasn't launched any more on startup.  It seems to
be related to an option (new or changed?) of start-stop-daemon: --chdir.  It
appears that, by default, start-stop-daemon always change current directory to /
but BOINC! needs to be launched in its "home" directory.  So the "cd" command
used above start-stop-daemon is useless.

The solution is rather simple: just change this line:
        setsid start-stop-daemon --quiet --start --exec ${BOINCBIN} \
                --chuid ${USER}:${GROUP} --nicelevel ${NICELEVEL} -- ${ARGS} >
${LOGFILE} 2>&1 &

into that:
        setsid start-stop-daemon --quiet --start --exec ${BOINCBIN} --chdir
${RUNTIMEDIR} \
                --chuid ${USER}:${GROUP} --nicelevel ${NICELEVEL} -- ${ARGS} >
${LOGFILE} 2>&1 &

in the file /etc/init.d/boinc.

Reproducible: Always
Steps to Reproduce:
Just start the daemon: /etc/init.d/boinc start
Actual Results:  
The daemon doesn't start and the log contains:
"Another instance of BOINC is running."
Actually, it tries to create files into / instead of its "home" directory and,
of course, that fails since it runs as a normal user.

Expected Results:  
The daemon "/usr/bin/boinc_client" sound have been launched.

Portage 2.0.53_rc5 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.13-gentoo-r2 i686)
=================================================================
System uname: 2.6.13-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.0_pre9
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -mfpmath=sse -O2 -fweb -frename-registers
-fomit-frame-pointer -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c
/etc/env.d"
CXXFLAGS="-march=pentium4 -mfpmath=sse -O2 -fweb -frename-registers
-fomit-frame-pointer -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo
http://mirror.switch.ch/mirror/gentoo/ http://distfiles.gentoo.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="fr_FR.UTF-8"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acl acpi alsa apache2 apm berkdb bitmap-fonts bzip2
cdparanoia cdr cjk crypt cups curl dga dts dvd dvdr dvdread eds emacs emboss
encode fam ffmpeg flac gcj gdbm gif gstreamer gtk gtk2 hal iconv idn imagemagick
imlib ipv6 java jpeg jpeg2k kde kdeenablefinal libg++ libwww lm_sensors mad
maildir matroska mbox mikmod mmap mmx mmxext mng motif mozilla mp3 mpeg ncurses
nls nptl nvidia ogg oggvorbis openal opengl pam pcre pdflib perl pic png python
qt quicktime readline samba sdl spell sse sse2 ssl svg tcpd tetex threads tiff
truetype truetype-fonts type1-fonts unicode v4l vcd vorbis win32codecs xine xml2
xmms xpm xprint xv xvid xvmc zlib video_cards_nvidia linguas_fr userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Mark Glines 2005-10-21 08:32:49 UTC
I've experienced the same problem.  Passing the "--dir" option to boinc_client
is the way I solved it.  I'll attach a trivial patch with my change, even though
I'm not sure which solution is better in the long term.  (Chroot is probably
cleaner, but doesn't it end up moving the pidfile too?)
Comment 2 Mark Glines 2005-10-21 08:33:51 UTC
Created attachment 71123 [details, diff]
trivial patch for passing --dir to boinc_client
Comment 3 Martin von Gagern 2005-10-24 16:35:56 UTC
I can confirm this bug.
Another possible workaround is to add the following line to /etc/conf.d/boinc:

ARGS="-dir ${RUNTIMEDIR}"

But I agree that this bug should be fixed in the init script in portage, so the
line above is a workaround and not a fix.
Comment 4 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-10-29 07:51:17 UTC
Thanks for reporting, it seems to be a change in behaviour as it did work just  
fine. I have committed boinc-4.72.20050813-r1 with numerous fixes including a  
fix for this issue. I think Benjamin Gaillard's solution was best and so used 
that. Thanks.