[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#394543: init script broken in various ways



Package: mldonkey-server
Version: 2.8.1-1
Severity: important

Basically, the stop action of the init script doesn't seem to want to
stop the daemon, or if it does, only after a long time after the script
finishes.  For example:

whitehawk:~# /etc/init.d/mldonkey-server start
Starting MLDonkey: mlnet.
whitehawk:~# ps ax | grep mlnet
 1827 ?        SN     0:00 /usr/bin/mldonkey_server --start --daemon --pidfile /var/run/mldonkey/mlnet.pid --chdir /var/lib/mldonkey --chgid mldonkey --umask 0002 --nice 10 --max-alive 48 --chuid mldonkey
 1832 ?        RN     0:01 /usr/bin/mlnet
 1834 ?        SN     0:00 /usr/bin/logger -t mlnet_error
 1836 ?        SN     0:00 /usr/bin/logger -t mlnet
 1838 pts/1    S+     0:00 grep mlnet
whitehawk:~# /etc/init.d/mldonkey-server stop
Stopping MLDonkey: mlnet.
whitehawk:~# ps ax | grep mlnet
 1827 ?        SN     0:00 /usr/bin/mldonkey_server --start --daemon --pidfile /var/run/mldonkey/mlnet.pid --chdir /var/lib/mldonkey --chgid mldonkey --umask 0002 --nice 10 --max-alive 48 --chuid mldonkey
 1832 ?        RN     0:05 /usr/bin/mlnet
 1834 ?        SN     0:00 /usr/bin/logger -t mlnet_error
 1836 ?        SN     0:00 /usr/bin/logger -t mlnet
 1846 pts/1    S+     0:00 grep mlnet
whitehawk:~# ps ax | grep mlnet
 1827 ?        SN     0:00 /usr/bin/mldonkey_server --start --daemon --pidfile /var/run/mldonkey/mlnet.pid --chdir /var/lib/mldonkey --chgid mldonkey --umask 0002 --nice 10 --max-alive 48 --chuid mldonkey
 1832 ?        RN     0:06 /usr/bin/mlnet
 1834 ?        SN     0:00 /usr/bin/logger -t mlnet_error
 1836 ?        SN     0:00 /usr/bin/logger -t mlnet
 1848 pts/1    S+     0:00 grep mlnet
whitehawk:~# ps ax | grep mlnet
 1827 ?        SN     0:00 /usr/bin/mldonkey_server --start --daemon --pidfile /var/run/mldonkey/mlnet.pid --chdir /var/lib/mldonkey --chgid mldonkey --umask 0002 --nice 10 --max-alive 48 --chuid mldonkey
 1832 ?        RN     0:07 /usr/bin/mlnet
 1834 ?        SN     0:00 /usr/bin/logger -t mlnet_error
 1836 ?        SN     0:00 /usr/bin/logger -t mlnet
 1850 pts/1    S+     0:00 grep mlnet
whitehawk:~# cat /var/run/mldonkey/mlnet.pid
1827
whitehawk:~# /etc/init.d/mldonkey-server stop
Stopping MLDonkey: mlnet.
whitehawk:~# cat /var/run/mldonkey/mlnet.pid
cat: /var/run/mldonkey/mlnet.pid: No such file or directory
whitehawk:~# ps ax | grep mlnet
 1832 ?        RNl    0:10 /usr/bin/mlnet
 1866 pts/1    S+     0:00 grep mlnet

It seems you need at least two tries with stop to make the mldonkey_server
process to go away, but this last mlnet process seems to want to take a very
long time before stopping.

The init script must be written so that before the stop action finishes,
all the relevant processes have actually disappeared.

This half-stopped process also confuses the start action:

whitehawk:~# /etc/init.d/mldonkey-server start
Starting MLDonkey: mlnet file[s] should no exist: /var/lib/mldonkey/mlnet.pid -- delete it first
whitehawk:~# ps ax | grep mlnet
 1832 ?        RNl    0:40 /usr/bin/mlnet
 1874 pts/1    S+     0:00 grep mlnet
whitehawk:~# /etc/init.d/mldonkey-server start
Starting MLDonkey: mlnet file[s] should no exist: /var/lib/mldonkey/mlnet.pid -- delete it first

This shouldn't happen: Either the process is already running, then there
should be no error, or the process is not running, then it should be
started.

Needless to say, the restart action is also broken completely as a
consequence of these problems.



Reply to: