Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327695 - sci-misc/boinc-6.10.58 init script crashes immediately
Summary: sci-misc/boinc-6.10.58 init script crashes immediately
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: InVCS
Depends on:
Blocks:
 
Reported: 2010-07-10 15:16 UTC by Mike Hammill
Modified: 2010-08-07 12:56 UTC (History)
7 users (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 Mike Hammill 2010-07-10 15:16:04 UTC
Upgrade to newest boinc-6.10-58.  Start boinc via init script (/etc/init.d/boinc) and it reports "crashed" with rc-status.  Starting init script with -d (debug) flag provides no evidence of why.  Go to /var/lib/boinc and run /usr/bin/boinc_client as root and the new version starts without problem.  I ran dispatch-conf of course before trying the init script and accepted updates to /etc/init.d/boinc. 

Reproducible: Always




I ran into the same problem with amd64 and ppc32.  On x86 I decided to leave the old /etc/init.d/boinc file unchanged after the upgrade, and it started without problem, further pointing to problems in the init script.  For convenience, here is what dispatch-conf gave as the updates:


--- /etc/init.d/boinc   2010-06-16 18:31:44.000000000 +0200
+++ /etc/init.d/._cfg0000_boinc 2010-07-10 16:46:18.000000000 +0200
@@ -57,27 +57,32 @@
        fi
 
        if [ "${ALLOW_REMOTE_RPC}" = "yes" ]; then
-               ARGS="${ARGS} -allow_remote_gui_rpc"
+               ARGS="${ARGS} --allow_remote_gui_rpc"
        fi
 
        if [ -n "${RC_UNAME}" ]; then
-               PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
+               PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' ${ARGS}"
        else
-               PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
+               PARAMS="${ARGS} >> '${LOGFILE}' 2>&1"
        fi
 
        generate_logs
 
-       # sys-apps/util-linux
-       CHRT="/usr/bin/chrt ${SCHED_PARAM}"
+       # sys-apps/util-linux (setup scheduling policy if specified, otherwise blank out
+    if [ "${SCHED_PARAM}" = "" ]; then
+        CHRT=""
+    else
+       CHRT="/usr/bin/chrt ${SCHED_PARAM}"
+    fi
 
        eval ${CHRT} start-stop-daemon \
-               --quiet --start --chdir "${RUNTIMEDIR}" \
-               --pidfile "${PIDFILE}" \
+               --start --quiet --chdir "${RUNTIMEDIR}" \
+        --background \
                --make-pidfile \
-               --exec "${BOINCBIN}" --chuid "${USER}:${GROUP}" \
+               --pidfile "${PIDFILE}" \
+        --chuid "${USER}:${GROUP}" \
                --nicelevel "${NICELEVEL}" \
-               ${PARAMS}
+               --exec "${BOINCBIN}" -- ${PARAMS}
 
        RESULT=$?
Comment 1 Mike Hammill 2010-07-11 07:52:41 UTC
I can confirm that restoring /etc/init.d/boinc to the previous version on adm64 and ppc32 both returned the script to working condition.
Comment 2 Francois Chenier 2010-07-12 22:53:22 UTC
In reply to comment #1)
> I can confirm that restoring /etc/init.d/boinc to the previous version on adm64
> and ppc32 both returned the script to working condition.
 
Strange but it's clear ... this package was never been tested. --background, --stderr and --stdout parameters are now obsolete and this is why this init script does not run. --background is now --daemon and deleted both stderr & stdout and everything works now
Comment 3 Bob Raitz 2010-07-14 09:14:28 UTC
It can't be said that I haven't done my due diligence when it comes to trying to make my BOINC work again. I have been trying everything suggested here, but nothing...nada! 

Can someone, anyone post the FUNCTIONAL script, if such exists, please? I am going nuts trying to get this back up...and nothing is working. I'd pull out my hair, but it's a bit too short.

TIA
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2010-07-14 09:17:50 UTC
Yep i never ever test the baselayout-1 part, so could you guys write patch that will actualy make current verison work under your init system?
Comment 5 Bob Raitz 2010-07-14 09:42:24 UTC
(In reply to comment #4)
> Yep i never ever test the baselayout-1 part, so could you guys write patch that
> will actualy make current verison work under your init system?
> 

What about baselayout-2?
Comment 6 Mike Hammill 2010-07-15 08:53:04 UTC
(In reply to comment #3)
Until this bug gets fixed, you could consider running boinc manually:

cd /var/lib/boinc/
/usr/bin/boinc_client

You can attach to projects, etc., but if you do it as root, note that you'll be running boinc as root.  You could consider changing all permissions to a regular user instead.  

In any case, once this bug is fixed, you can revert to the running via init script by killing boinc, chown -R boinc:boinc /var/lib/boinc, then running the init script as usual.  
Comment 7 Mike Hammill 2010-07-15 08:56:03 UTC
(In reply to comment #5)
> What about baselayout-2?

To clarify, the init.d script does not work in the latest baselayout 2.0.1 (for my tests on amd64, x86, ppc32).  I haven't used baselayout 1 for years.
Comment 8 Bob Raitz 2010-07-15 18:50:38 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > What about baselayout-2?
> 
> To clarify, the init.d script does not work in the latest baselayout 2.0.1 (for
> my tests on amd64, x86, ppc32).  I haven't used baselayout 1 for years.
> 

Ok...so when will it be fixed? 

It's not like I don't expect a whoops every now and again running as ~arch, but this isn't a whoops...this is a total mess! 

I've spent five days now trying everything I know of to fix this mess. I can't even go backwards to an earlier version and get it to run. And to see that there was no testing done before this was dropped on us...well, I'm not impressed in the least.

As for running it manually...that doesn't work either. The client will fire up, but won't attach to setiathome, the project I've running since I set up Gentoo. The GUI won't attach to localhost, and so on.

Color me unimpressed!
Comment 9 Erik Zeek 2010-07-15 19:08:33 UTC
(In reply to comment #8)
> I've spent five days now trying everything I know of to fix this mess. I can't
> even go backwards to an earlier version and get it to run. And to see that
> there was no testing done before this was dropped on us...well, I'm not
> impressed in the least.

The old init script seems to work for me (with the current boinc-6.10.58 on baselayout-2.0.1).  Available here:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-misc/boinc/files/boinc.init?revision=1.19
Comment 10 Bob Raitz 2010-07-16 06:16:58 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I've spent five days now trying everything I know of to fix this mess. I can't
> > even go backwards to an earlier version and get it to run. And to see that
> > there was no testing done before this was dropped on us...well, I'm not
> > impressed in the least.
> 
> The old init script seems to work for me (with the current boinc-6.10.58 on
> baselayout-2.0.1).  Available here:
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-misc/boinc/files/boinc.init?revision=1.19
> 
Not even close.
Comment 11 MT 2010-07-18 14:18:38 UTC
(In reply to comment #9)
> The old init script seems to work for me (with the current boinc-6.10.58 on
> baselayout-2.0.1).  Available here:
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-misc/boinc/files/boinc.init?revision=1.19

thank you very much for reporting, the old init worked also here and fixed the issue.

Comment 12 Tomáš Chvátal (RETIRED) gentoo-dev 2010-07-19 20:31:44 UTC
Please try to recompile boinc and tell me if the initscript work.

No hw for boinc testing in another 14 days or more, so test if you want to have it fixed.
Comment 13 Xavier Vachon 2010-07-19 20:43:06 UTC
(In reply to comment #12)
> Please try to recompile boinc and tell me if the initscript work.
> 
> No hw for boinc testing in another 14 days or more, so test if you want to have
> it fixed.
> 

Recompiled, and the init script worked. Thanks!
Comment 14 Mike Hammill 2010-07-20 14:47:25 UTC
(In reply to comment #12)
I rsynced with the portage tree around 16:00 CET then tested on 
x86_64 (amd64 profile) -- OK!
ppc32 (G4) -- OK!
x86 (P4) -- OK!

Thanks for fixing this, Tomáš! 

BTW, Regarding bug #328999 I had no problems stoping, starting, or restarting boinc using the new init script.
Comment 15 Greg Trigg 2010-07-22 23:37:55 UTC
I had problems until I put the "&" back at the end of this:

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

Was there a reason it was taken out?
Comment 16 Tomáš Chvátal (RETIRED) gentoo-dev 2010-08-07 12:56:45 UTC
Fixed in latest revision.