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

Re: systemd+anacron breaks cron jobs?



On Mon, 03 Dec 2018, Kamil Jońca wrote:
> >> Dec 03 00:23:54 alfa systemd[1]: anacron.service: State 'stop-sigterm' timed out. Killing.
> > See, someone or some script told systemd to stop anacron (or maybe to
> > stop-and-start/restart it).  THIS is causing the undesired behavior.
> 
> Dec 03 00:22:24 alfa systemd[1]: Stopping Run anacron jobs...
> Dec 03 00:22:24 alfa anacron[8919]: Received SIGUSR1
> Dec 03 00:23:54 alfa systemd[1]: anacron.service: State 'stop-sigterm' timed out. Killing.

Looks like something asked systemd to send sigusr1 to anacron, which is
"clean exit" for anacron.  Since the anacron package told systemd to use
"killmode mixed", it waits for a while, then proceeds to SIGKILL
everything in the group because they took too long to die.

It is a bug, but on anacron, not systemd.  systemd is doing exactly what
it was (mis)configured to do by the anacron package.

And something *is* asking anacron to restart or to stop.  Look at your
log rotation scripts (and also anacron's).

> I have NO scripts which kill anacron. IMO it is systemd thing.

What happens when the anacron service is stopped/restarted under systemd
is different from non-systemd anacron, but that's because the anacron
package misconfigured systemd, so it would be a "systemd thing as
(mis)configured by the package".

But something is triggering that service stop/restart/force-reload
(can't tell which from the logs), and it is not systemd.  systemd is
obeying orders from some other system component.

-- 
  Henrique Holschuh


Reply to: