Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331625 - sci-misc/boinc-6.10.58-r1 : startup script never returns
Summary: sci-misc/boinc-6.10.58-r1 : startup script never returns
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
: 300169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-08 09:18 UTC by Toralf Förster
Modified: 2011-05-23 15:50 UTC (History)
12 users (show)

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


Attachments
init script (acpid,668 bytes, text/plain)
2010-08-17 06:39 UTC, DaggyStyle
Details
right one.... (boinc,3.15 KB, text/plain)
2010-08-17 06:39 UTC, DaggyStyle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2010-08-08 09:18:46 UTC
/etc/init.d/boinc of package sci-misc/boinc-6.10.58 however worked flawlessly.

The process list gives for start script -r1 :

...
 ├─konsole,24042,tfoerste                    
  │   ├─bash,24049
  │   │   └─su,24080,root -
  │   │       └─bash,24083
  │   │           └─runscript.sh,4923 /sbin/runscript.sh /etc/init.d/boinc start
  │   │               └─runscript.sh,4969 /sbin/runscript.sh /etc/init.d/boinc start
  │   │                   └─boinc_client,4970,boinc --allow_remote_gui_rpc
  │   │                       ├─wcg_faah_autodo,4973 -dpf faah15734_ZINC04998428_xEN_3rd_md0772_00.dpf -gpf ZINC04998428

I changed back to the older init.d startup script (fortunately backed up) and it works


Reproducible: Always
Comment 1 DaggyStyle 2010-08-08 13:35:07 UTC
works fine here, can't reproduce it. try emerging it again.
Comment 2 DaggyStyle 2010-08-09 05:25:42 UTC
ok, didn't updated my config files.
confirmed here also
Comment 3 Michael Klapproth 2010-08-10 11:30:14 UTC
Appending an & at multi-line start-stop-daemon construct is a quick & dirty fix.
Comment 4 Dell'Aica Valentino 2010-08-12 11:06:32 UTC
Maybe is related to calling chrt
Comment 5 chrulri 2010-08-16 20:47:52 UTC
Confirmed.

Can you please upload the old init file?
Comment 6 DaggyStyle 2010-08-17 06:39:15 UTC
Created attachment 243307 [details]
init script
Comment 7 DaggyStyle 2010-08-17 06:39:55 UTC
Created attachment 243309 [details]
right one....

don't ask....
Comment 8 Yuri Sevatz 2010-08-29 21:07:51 UTC
(In reply to comment #3)
> Appending an & at multi-line start-stop-daemon construct is a quick & dirty
> fix.
> 

I actually did a diff of the new and old scripts... the first thing that caught my eye was this:

 	if [ -n "${RC_UNAME}" ]; then
 		PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
 	else
-		PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
+		PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1"
 	fi


It seems that ampersand is one of the last things that *used* to be appended to the start-top-daemon ... I tried putting it back (as with the old version) and the desired backgrounding immediately returned.

Not sure if this is how we should go about fixing this, but it's definitely an indication of the problem.
Comment 9 Stefan Bergler 2010-09-10 10:24:23 UTC
(In reply to comment #8)
> (In reply to comment #3)
> > Appending an & at multi-line start-stop-daemon construct is a quick & dirty
> > fix.
....
> It seems that ampersand is one of the last things that *used* to be appended to
> the start-top-daemon ... I tried putting it back (as with the old version) and
> the desired backgrounding immediately returned.

Better try to add a "--background" to start-stop-daemon (see man page of start-stop-daemon). This worked out for me and is better then the '&'.

diff -Naur /tmp/boinc.orig /etc/init.d/boinc 
--- /tmp/boinc.orig	2010-09-10 12:18:04.064000836 +0200
+++ /etc/init.d/boinc	2010-09-10 12:16:34.012252292 +0200
@@ -81,6 +81,7 @@
 		--pidfile "${PIDFILE}" \
 		--chuid "${USER}:${GROUP}" \
 		--nicelevel "${NICELEVEL}" \
+		--background \
 		--exec "${BOINCBIN}" ${PARAMS}
 
 	RESULT=$?

This might be the solution for the ebuild / package ??? ;-)

My boinc version is sci-misc/boinc-6.10.58-r1.

Best Regards,
 Stefan
Comment 10 Dell'Aica Valentino 2010-09-10 12:02:50 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #3)
> > > Appending an & at multi-line start-stop-daemon construct is a quick & dirty
> > > fix.
> ....
> > It seems that ampersand is one of the last things that *used* to be appended to
> > the start-top-daemon ... I tried putting it back (as with the old version) and
> > the desired backgrounding immediately returned.
> 
> Better try to add a "--background" to start-stop-daemon (see man page of
> start-stop-daemon). This worked out for me and is better then the '&'.
> 
> diff -Naur /tmp/boinc.orig /etc/init.d/boinc 
> --- /tmp/boinc.orig     2010-09-10 12:18:04.064000836 +0200
> +++ /etc/init.d/boinc   2010-09-10 12:16:34.012252292 +0200
> @@ -81,6 +81,7 @@
>                 --pidfile "${PIDFILE}" \
>                 --chuid "${USER}:${GROUP}" \
>                 --nicelevel "${NICELEVEL}" \
> +               --background \
>                 --exec "${BOINCBIN}" ${PARAMS}
> 
>         RESULT=$?
> 
> This might be the solution for the ebuild / package ??? ;-)
> 
> My boinc version is sci-misc/boinc-6.10.58-r1.
> 
> Best Regards,
>  Stefan
> 
Your way work but logfile will miss if you background in start-stop-daemon
Comment 11 Toralf Förster gentoo-dev 2010-10-08 09:31:34 UTC
Today I accidentally deleted /etc/init./boinc and therefore re-installed boinc-6.10.58-r1 and realized that the current init.de script doesn't start any boinc application. Instead it returns immediately w/o any further action.
Fortunately I had a copy of the old working init.d script.

Now I'm wondering whether sth. is wrong on my system or whether this is a general problem.

Comment 12 Marcin Mirosław 2011-01-19 10:51:25 UTC
(In reply to comment #9)
>                 --chuid "${USER}:${GROUP}" \
>                 --nicelevel "${NICELEVEL}" \
> +               --background \
>                 --exec "${BOINCBIN}" ${PARAMS}
> 
> This might be the solution for the ebuild / package ??? ;-)

This change allow to finis init script but it seems that boinc doesn't write to logfile (baselayout 1)
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2011-05-22 09:27:54 UTC
*** Bug 300169 has been marked as a duplicate of this bug. ***
Comment 14 Rolf Eike Beer archtester 2011-05-22 14:18:11 UTC
The quick workaround is putting

ARGS="--daemon"

into your /etc/conf.d/boinc.

The correct fix would be to put this into the init script.
Comment 15 Toralf Förster gentoo-dev 2011-05-22 14:35:20 UTC
(In reply to comment #14)
> The quick workaround is putting
> 
> ARGS="--daemon"
> 
> into your /etc/conf.d/boinc.
> 
> The correct fix would be to put this into the init script.

That is not enough (at least with current versin 6.12.26 - you've to add "--" to this line too :

--exec "${BOINCBIN}" -- ${PARAMS}
Comment 16 Tomáš Chvátal (RETIRED) gentoo-dev 2011-05-23 15:50:21 UTC
Fixed in 6.12.26-r1