reopen 675081
thanks

Hi,

We've encountered the exact same issue on several of our squeeze machines:
logrotate kills proftpd instead of restarting it but the patch used in
1.3.5~rc1-2 does not fix the issue.

Before the patch, it only happened ~5 times out of 100 machines running ProFTPd
over ~2 years so I guess it's not common since that makes a mean time between
failure (MTBF) of 40 years (100*2/5).

We've applied the following patch but it only made things worst:

*** proftpd.00  2013-02-01 11:08:07.000000000 +0100
--- proftpd     2013-02-01 11:09:11.446049737 +0100
***************
*** 108,114 ****
                log_end_msg 0
        else
                SIGNAL="KILL"
!               start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
"$PIDFILE"
                if [ $? != 0 ]; then
                        log_end_msg 1
                        [ $2 != 0 ] || exit 0
--- 108,114 ----
                log_end_msg 0
        else
                SIGNAL="KILL"
!               start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile 
"$PIDFILE" --retry=TERM/10/KILL/5
                if [ $? != 0 ]; then
                        log_end_msg 1
                        [ $2 != 0 ] || exit 0
***************
*** 174,180 ****
      force-reload|restart)
        if [ "x$RUN" = "xyes" ] ; then
            signal stop 1
-           sleep 2
            start
        else
            if [ "x$INETD" = "xyes" ] ; then
--- 174,179 ----


48 proftpd were killed out of 100 which makes a MTBF of 2 days!

I guess the issue is that start-stop-daemon waits 5 seconds after sending
SIGKILL but the OS can take more than that to really kill the process if it is
under heavy load which often happens during cron.daily.

Maybe we should tell start-stop-daemon to wait 'forever' until the process is
really dead before we restart it?

According to start-stop-daemon(8), the options should be:

start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE" 
--retry=TERM/10/KILL/forever

Please tell me what you think.
-- 
 ,''`.
: :' :      Cyril Bouthors
`. `'         Debian.org
  `-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to