Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vixie-cron refuses to stop [SOLVED-really this time]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sun Dec 29, 2013 1:41 am    Post subject: vixie-cron refuses to stop [SOLVED-really this time] Reply with quote

Below seems to be solved by upgrading kernel to 3.12.6 ...


What I run

Code:
/etc/init.d/vixie-cron stop


I get back this insolent reply:

Code:
 * Stopping vixie-cron ...
 * start-stop-daemon: 1 process refused to stop
 * Failed to stop vixie-cron                        [ !! ]
 * ERROR: vixie-cron failed to stop


I can kill vixie-cron and then start it successfully but I need
to have control of my services (obviously).

I've re-emerged vixie-cron but this does not help; can't reboot at the
moment ...

any advice would be appreciated
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)


Last edited by albright on Sat Jan 04, 2014 10:59 pm; edited 3 times in total
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Dec 29, 2013 9:22 am    Post subject: Reply with quote

There a --debug option you can pass to /etc/init.d/vixie-cron (or any other service) that will spit out a lot of information. Thud, you can use /etc/init.d/vixie-cron --debug syop to see where it is failing.

You may also want to switch to sys-process/cronie as well.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sun Dec 29, 2013 2:22 pm    Post subject: Reply with quote

thanks for that but cronie has exactly the same problem

(rebooting does not help btw)

using the --debug option for stop: (nothing leaps out pointing to the problem)

Quote:

/etc/init.d/cronie --debug stop
+ _conf_d=/etc/init.d/../conf.d
+ _c=cronie
+ '[' -n cronie -a cronie '!=' cronie ']'
+ unset _c
+ sourcex -e /etc/init.d/../conf.d/cronie.default
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/init.d/../conf.d/cronie.default ']'
+ return 1
+ sourcex -e /etc/init.d/../conf.d/cronie
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/init.d/../conf.d/cronie ']'
+ . /etc/init.d/../conf.d/cronie
++ CRONDARGS=
+ unset _conf_d
+ sourcex -e /etc/rc.conf
+ '[' -e = -e ']'
+ shift
+ '[' -e /etc/rc.conf ']'
+ . /etc/rc.conf
++ rc_shell=/sbin/sulogin
++ unicode=YES
++ rc_tty_number=12
+ '[' -n '' ']'
++ command -v cgroup_add_service
+ '[' cgroup_add_service = cgroup_add_service ']'
+ cgroup_add_service /sys/fs/cgroup/openrc
+ for d in '/sys/fs/cgroup/*'
+ '[' -f '/sys/fs/cgroup/*/tasks' ']'
+ openrc_cgroup=/sys/fs/cgroup/openrc
+ '[' -d /sys/fs/cgroup/openrc ']'
+ cgroup_add_service /sys/fs/cgroup/systemd/system
+ for d in '/sys/fs/cgroup/*'
+ '[' -f '/sys/fs/cgroup/*/tasks' ']'
+ openrc_cgroup=/sys/fs/cgroup/openrc
+ '[' -d /sys/fs/cgroup/openrc ']'
++ command -v cgroup_set_limits
+ '[' cgroup_set_limits = cgroup_set_limits ']'
+ cgroup_set_limits
+ local blkio=
+ '[' -n '' ']'
+ local cpu=
+ '[' -n '' ']'
+ local cpuacct=
+ '[' -n '' ']'
+ local cpuset=
+ '[' -n '' ']'
+ local devices=
+ '[' -n '' ']'
+ local memory=
+ '[' -n '' ']'
+ local net_prio=
+ '[' -n '' ']'
+ return 0
+ sourcex /etc/init.d/cronie
+ '[' /etc/init.d/cronie = -e ']'
+ . /etc/init.d/cronie
++ command=/usr/sbin/crond
++ command_args=
++ pidfile=/var/run/crond.pid
+ unset _d
+ unset _f
+ '[' -n '' ']'
+ '[' -n stop ']'
+ '[' stop = depend ']'
+ for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands' '$extra_stopped_commands'
+ '[' describe = stop ']'
+ for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands' '$extra_stopped_commands'
+ '[' start = stop ']'
+ for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands' '$extra_stopped_commands'
+ '[' stop = stop ']'
++ command -v stop
+ '[' stop = stop ']'
+ yesno
+ '[' -z '' ']'
+ return 1
+ for _cmd in '$extra_stopped_commands'
+ '[' cgroup_cleanup = stop ']'
+ unset _cmd
+ case $1 in
+ verify_boot
+ '[' '!' -e /run/openrc/softlevel ']'
+ return 0
++ command -v stop_pre
+ '[' '' = stop_pre ']'
+ stop
++ service_get_value command
+ local startcommand=/usr/sbin/crond
++ service_get_value pidfile
+ local startpidfile=/var/run/crond.pid
++ service_get_value procname
+ local startprocname=
+ command=/usr/sbin/crond
+ pidfile=/var/run/crond.pid
+ procname=
+ '[' -n /usr/sbin/crond -o -n '' -o -n /var/run/crond.pid ']'
+ ebegin 'Stopping cronie'
* Stopping cronie ...
+ start-stop-daemon --stop --exec /usr/sbin/crond --pidfile /var/run/crond.pid
* start-stop-daemon: 1 process refused to stop
+ eend 1 'Failed to stop cronie'
* Failed to stop cronie [ !! ]
+ exit 1
* ERROR: cronie failed to stop

_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sun Dec 29, 2013 2:31 pm    Post subject: Reply with quote

here's some more info

if I use the start-stop-daemon directly it fails to stop cronie,
but if I use "-s 9" it kills the process successfully (status
of cronie then is "crashed").

I guess that is unsurprising but why won't the standard termination
signal work?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 30, 2013 1:52 am    Post subject: Reply with quote

start-stop-daemon gets the pid from /var/run/crond.pid (note that /var/run should be a symlink to /run). Verify the contents of that file contain the correct pid.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Mon Dec 30, 2013 2:14 am    Post subject: Reply with quote

Quote:
start-stop-daemon gets the pid from /var/run/crond.pid (note that /var/run should be a symlink to /run). Verify the contents of that file contain the correct pid.


yes, it is the correct pid

(how would start-stop-daemon with signal 9 kill cronie otherwise? but YES, I checked
the pid number ...)
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jan 04, 2014 7:23 pm    Post subject: Reply with quote

OK - this problem is back;

it seems that I can restart an affected service once (maybe twice) and
then after that I get the "process refused to stop" error

this is very frustrating and I fear it may be a symptom of a seriously
messed up system
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Sat Jan 04, 2014 8:43 pm    Post subject: Reply with quote

With either cron running, what does this show you?:
Code:

start-stop-daemon -v -t --stop --exec /usr/sbin/cron --pidfile /var/run/cron.pid


How about the output of:
Code:

ls -al /var/run /run/cron.pid /usr/sbin/cron
ps aux | grep -i [c]ron
cat /run/cron.pid

_________________
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jan 04, 2014 9:13 pm    Post subject: Reply with quote

thanks for taking a look; I take it you mean the crond pid / exec (rather than cron)

if so, here's the output

Quote:
olorin etc # start-stop-daemon -v -t --stop --exec /usr/sbin/crond --pidfile /var/run/crond.pid
* Will stop /usr/sbin/cron
* Will stop PID in pidfile `/var/run/crond.pid'
* Will stop processes of `/usr/sbin/cron'
* Would send signal 15 to PID 17778


Quote:
olorin etc # ls -al /var/run /run/crond.pid /usr/sbin/crond
-rw-r--r-- 1 root root 6 Jan 4 16:07 /run/crond.pid
-rwxr-xr-x 1 root root 52624 Dec 29 08:55 /usr/sbin/crond
lrwxrwxrwx 1 root root 4 Nov 20 2012 /var/run -> /run


Quote:
olorin etc # ps aux | grep -i [c]ron
root 17778 0.0 0.0 121036 1248 ? Ss 16:07 0:00 /usr/sbin/crond


Quote:
olorin etc # cat /run/crond.pid
17778

_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sat Jan 04, 2014 9:25 pm    Post subject: Reply with quote

Seems like something is masking the signals that shut vixie-cron down. Are any other services acting this way?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jan 04, 2014 9:57 pm    Post subject: Reply with quote

Quote:
Are any other services acting this way?


as far as I can tell ALL services are affected

I can restart once; second time it fails as above

I guess that's a big clue, but I remain clueless :)
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sat Jan 04, 2014 9:59 pm    Post subject: Reply with quote

Are you running nvidia-drivers by any chance? And if you are, what version?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jan 04, 2014 10:35 pm    Post subject: Reply with quote

Quote:
Are you running nvidia-drivers by any chance? And if you are, what version?


well, now that you mention it, yes I am: hard masked version: 331.20

you're not going to tell me that a video driver is blocking service restart ??? :o
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sat Jan 04, 2014 10:43 pm    Post subject: Reply with quote

albright wrote:
you're not going to tell me that a video driver is blocking service restart ??? :o


Of course not...

but do you want to guess why it's hard-masked?

https://devtalk.nvidia.com/default/topic/633706/linux/recent-drivers-cause-applications-to-hang-not-start-at-all-or-compilation-failures/

Downgrade to 319.76 and watch your problems disappear.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1602
Location: Just over the horizon

PostPosted: Sat Jan 04, 2014 10:45 pm    Post subject: Reply with quote

Here's the local forum topic on it as well:

https://forums.gentoo.org/viewtopic-t-973248-highlight-nvidiadrivers.html

Drove a lot of people (including me) nuts trying to figure it out.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat Jan 04, 2014 10:59 pm    Post subject: Reply with quote

many thanks for that - I must keep on top of things better :)

that is a strange bug!
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Thu Feb 06, 2014 2:20 am    Post subject: Reply with quote

albright wrote:
thanks for taking a look; I take it you mean the crond pid / exec (rather than cron)


Oddly enough, no. :? equery f vixie-cron literally shows /usr/sbin/cron. I have no /usr/sbin/crond. I'm using udev (w/ OpenRC), but not systemd. Is it possible you have another cron daemon installed conflicting? Mine is, sys-process/vixie-cron-4.1-r14, which I took from the title of your posting to be same. It's also the only *vixie* related name showing in the portage tree.
_________________
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum