Hi Javier. Sorry for the late reply:
On Wed, 2012-06-27 at 20:36 +0200, Javier Fernandez-Sanguino wrote: > For its stop argument, cron uses /lib/lsb/init-functions's killproc. I > believe killproc should remove the pidfile if the processes is killed > properly. ok... weird... > I'm unable to reproduce the behaviour you are seeing. Maybe this is > associated with your environment. At least I wouldn't know about anything special with it... it's rather plain sid, everything updated. > send the > output to this bug report (you can use 'script' to capture all the > output to a file). attached. > Please ensure first that the cron daemon is > started: Was the case. As you see there is one "special" thing, my custom locale en_DE.UTF-8... but this is not so special as it seems,... it's merely the normal en_US local but with dates and some other stuff set to the metric / ISO formats. But I was sceptical anyway so I tried unset LANG /etc/init.d/cron start /etc/init.d/cron stop /etc/init.d/cron stop And the problem occurred again. /etc/environment is empty, and I tried the whole game also with setting LANG=C in /etc/default/locale . If you need further help, do not hesitate to ask. Cheers, Chris
root@heisenberg:~# sh -x /etc/init.d/cron stop + PATH=/bin:/usr/bin:/sbin:/usr/sbin + DESC=cron daemon + NAME=cron + DAEMON=/usr/sbin/cron + PIDFILE=/var/run/crond.pid + SCRIPTNAME=/etc/init.d/cron + test -f /usr/sbin/cron + . /lib/lsb/init-functions + run-parts --lsbsysinit --list /lib/lsb/init-functions.d + [ -r /lib/lsb/init-functions.d/20-left-info-blocks ] + . /lib/lsb/init-functions.d/20-left-info-blocks + FANCYTTY= + [ -e /etc/lsb-base-logging.sh ] + true + [ -r /etc/default/cron ] + . /etc/default/cron + READ_ENV=yes + [ yes = yes ] + parse_environment + [ -r /etc/environment ] + [ -s /etc/environment ] + continue + [ -r /etc/default/locale ] + [ -s /etc/default/locale ] + egrep ^LANG= /etc/default/locale + tail -n1 + cut -d= -f2 + value=en_DE.UTF-8 + [ -n en_DE.UTF-8 ] + eval export LANG=en_DE.UTF-8 + export LANG=en_DE.UTF-8 + [ -n en_DE.UTF-8 ] + [ /etc/default/locale = /etc/environment ] + egrep ^LANGUAGE= /etc/default/locale + tail -n1 + cut -d= -f2 + value= + [ -n ] + [ -n ] + egrep ^LC_ALL= /etc/default/locale + tail -n1 + cut -d= -f2 + value= + [ -n ] + [ -n ] + egrep ^LC_CTYPE= /etc/default/locale + tail -n1 + cut -d= -f2 + value= + [ -n ] + [ -n ] + [ -z -a -e /etc/timezone ] + cat /etc/timezone + TZ=Europe/Berlin + log_daemon_msg Stopping periodic command scheduler cron + [ -z Stopping periodic command scheduler ] + log_daemon_msg_pre Stopping periodic command scheduler cron + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z ] + FANCYTTY=1 + true + /bin/echo -n [....] [....] + [ -z cron ] + /bin/echo -n Stopping periodic command scheduler: cron Stopping periodic command scheduler: cron+ log_daemon_msg_post Stopping periodic command scheduler cron + : + killproc -p /var/run/crond.pid /usr/sbin/cron + local pidfile sig status base name_param is_term_sig OPTIND + pidfile= + name_param= + is_term_sig= + OPTIND=1 + getopts p: opt + pidfile=/var/run/crond.pid + getopts p: opt + shift 2 + base=cron + [ ! /var/run/crond.pid ] + name_param=--pidfile /var/run/crond.pid + sed -e s/^-\(.*\)/\1/ + echo + sig= + echo + sed -e s/^SIG\(.*\)/\1/ + sig= + [ = 15 ] + [ = TERM ] + status=0 + [ ! ] + [ -n ] + /sbin/start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/crond.pid + [ 0 = 1 ] + [ 0 = 0 ] + [ ] + return 0 + log_end_msg 0 + [ -z 0 ] + local retval + retval=0 + log_end_msg_pre 0 + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + RED= + /usr/bin/tput setaf 2 + GREEN= + /usr/bin/tput setaf 3 + YELLOW= + /usr/bin/tput op + NORMAL= + /usr/bin/tput civis + /usr/bin/tput sc + /usr/bin/tput hpa 0 + [ 0 -eq 0 ] + /bin/echo -ne [ ok [ ok + /usr/bin/tput rc + /usr/bin/tput cnorm + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + RED= + /usr/bin/tput setaf 3 + YELLOW= + /usr/bin/tput op + NORMAL= + [ 0 -eq 0 ] + echo . . + log_end_msg_post 0 + : + return 0 + exit 0 root@heisenberg:~# ls -la /var/run/cron* -rw-r--r-- 1 root root 5 Jun 29 12:49 /var/run/crond.pid ---------- 1 root root 0 Jun 29 11:44 /var/run/crond.reboot root@heisenberg:~# cat /var/run/crond.pid 4211 root@heisenberg:~# /etc/init.d/cron status [FAIL] cron is not running ... failed! root@heisenberg:~# ls -la /var/run/cron* -rw-r--r-- 1 root root 5 Jun 29 12:49 /var/run/crond.pid ---------- 1 root root 0 Jun 29 11:44 /var/run/crond.reboot root@heisenberg:~# sh -x /etc/init.d/cron stop + PATH=/bin:/usr/bin:/sbin:/usr/sbin + DESC=cron daemon + NAME=cron + DAEMON=/usr/sbin/cron + PIDFILE=/var/run/crond.pid + SCRIPTNAME=/etc/init.d/cron + test -f /usr/sbin/cron + . /lib/lsb/init-functions + run-parts --lsbsysinit --list /lib/lsb/init-functions.d + [ -r /lib/lsb/init-functions.d/20-left-info-blocks ] + . /lib/lsb/init-functions.d/20-left-info-blocks + FANCYTTY= + [ -e /etc/lsb-base-logging.sh ] + true + [ -r /etc/default/cron ] + . /etc/default/cron + READ_ENV=yes + [ yes = yes ] + parse_environment + [ -r /etc/environment ] + [ -s /etc/environment ] + continue + [ -r /etc/default/locale ] + [ -s /etc/default/locale ] + egrep ^LANG= /etc/default/locale + tail -n1 + cut -d= -f2 + value=en_DE.UTF-8 + [ -n en_DE.UTF-8 ] + eval export LANG=en_DE.UTF-8 + export LANG=en_DE.UTF-8 + [ -n en_DE.UTF-8 ] + [ /etc/default/locale = /etc/environment ] + cut -d= -f2 + egrep ^LANGUAGE= /etc/default/locale + tail -n1 + value= + [ -n ] + [ -n ] + egrep ^LC_ALL= /etc/default/locale + cut -d= -f2 + tail -n1 + value= + [ -n ] + [ -n ] + egrep ^LC_CTYPE= /etc/default/locale + cut -d= -f2 + tail -n1 + value= + [ -n ] + [ -n ] + [ -z -a -e /etc/timezone ] + cat /etc/timezone + TZ=Europe/Berlin + log_daemon_msg Stopping periodic command scheduler cron + [ -z Stopping periodic command scheduler ] + log_daemon_msg_pre Stopping periodic command scheduler cron + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z ] + FANCYTTY=1 + true + /bin/echo -n [....] [....] + [ -z cron ] + /bin/echo -n Stopping periodic command scheduler: cron Stopping periodic command scheduler: cron+ log_daemon_msg_post Stopping periodic command scheduler cron + : + killproc -p /var/run/crond.pid /usr/sbin/cron + local pidfile sig status base name_param is_term_sig OPTIND + pidfile= + name_param= + is_term_sig= + OPTIND=1 + getopts p: opt + pidfile=/var/run/crond.pid + getopts p: opt + shift 2 + base=cron + [ ! /var/run/crond.pid ] + name_param=--pidfile /var/run/crond.pid + echo + sed -e s/^-\(.*\)/\1/ + sig= + echo + sed -e s/^SIG\(.*\)/\1/ + sig= + [ = 15 ] + [ = TERM ] + status=0 + [ ! ] + [ -n ] + /sbin/start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/crond.pid /sbin/start-stop-daemon: warning: failed to kill 4211: No such process + status=1 + [ 1 = 1 ] + [ -z ] + return 0 + log_end_msg 0 + [ -z 0 ] + local retval + retval=0 + log_end_msg_pre 0 + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + RED= + /usr/bin/tput setaf 2 + GREEN= + /usr/bin/tput setaf 3 + YELLOW= + /usr/bin/tput op + NORMAL= + /usr/bin/tput civis + /usr/bin/tput sc + /usr/bin/tput hpa 0 + [ 0 -eq 0 ] + /bin/echo -ne [ ok [ ok + /usr/bin/tput rc + /usr/bin/tput cnorm + log_use_fancy_output + TPUT=/usr/bin/tput + EXPR=/usr/bin/expr + [ -t 1 ] + [ xxterm != x ] + [ xxterm != xdumb ] + [ -x /usr/bin/tput ] + [ -x /usr/bin/expr ] + /usr/bin/tput hpa 60 + /usr/bin/tput setaf 1 + [ -z 1 ] + true + true + /usr/bin/tput setaf 1 + RED= + /usr/bin/tput setaf 3 + YELLOW= + /usr/bin/tput op + NORMAL= + [ 0 -eq 0 ] + echo . . + log_end_msg_post 0 + : + return 0 + exit 0 root@heisenberg:~# ls -la /var/run/cron* -rw-r--r-- 1 root root 5 Jun 29 12:49 /var/run/crond.pid ---------- 1 root root 0 Jun 29 11:44 /var/run/crond.reboot root@heisenberg:~# cat /var/run/crond.pid 4211 root@heisenberg:~# /etc/init.d/cron status [FAIL] cron is not running ... failed! root@heisenberg:~#
smime.p7s
Description: S/MIME cryptographic signature