Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24930 - setiathome-3.08-r1 init script fails when seti exits abnormaly
Summary: setiathome-3.08-r1 init script fails when seti exits abnormaly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-20 17:24 UTC by John Frazier
Modified: 2004-01-26 21:20 UTC (History)
3 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 John Frazier 2003-07-20 17:24:37 UTC
The init script trys to kill seti when exiting, and if the proccess is not there
anymore, because seti exits, crashes, or was given a kill command, the init
script exits without marking the service stopped. Preventing the start

a workaround requires:
cd /opt/setiathome/
rm lock.sah pid.sah
./setiathome
/etc/init.d/setiathome restart

then the init script will recover and restart seti, including a second thread.
So I think the problem is not related to the remaining lock and pid files, just
having a process named "setiathome" availible to kill.
If the killall command fails the stop command fails too, the stop command should
still succeed since seti is not running.


Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/setiathome start
2. killall setiathome
3. /etc/init.d/setiathome stop
4. /etc/init.d/setiathome start

Actual Results:  
$/etc/init.d/setiathome stop
 * Stopping SETI@home...
setiathome: no process killed                                   [ !! ]

$/etc/init.d/setiathome start
 * WARNING:  "setiathome" has already been started.


Expected Results:  
$/etc/init.d/setiathome stop
 * Stopping SETI@home... 
setiathome: no process killed                              [ ok ] 

$/etc/init.d/setiathome start
 * Starting SETI@home...                                   [ ok ] 

app-sci/setiathome-3.08-r1
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-07-21 10:55:48 UTC
try
/etc/init.d/xxx zap start 
Comment 2 John Frazier 2003-07-27 02:19:55 UTC
thanks martin, that is much easier than starting by hand, and I also discovered that other init scripts have this "problem" too. 

I came across this because setiathome tends to exit every day or two for me. Why not start seti in a loop? as seen at:
http://setiathome.berkeley.edu/unix.html

John
Comment 3 Jussi Sirpoma 2003-09-16 07:48:03 UTC
setiathome also exits if a network operation fails, so it is quite common for it to exit without a stop request.
Comment 4 SpanKY gentoo-dev 2004-01-26 21:20:31 UTC
ok, theres a new wrapper script that runs setiathome in a loop and when it dies, restarts it

as for the stop behavior, that's 'normal' ... which is to say, the stop() function should really only work when a daemon hasnt exited abnormally ... otherwise, how would you know it did freak out ? :)