[Pkg-clamav-devel] Bug#824042: gets into kill/restart loop

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Wed May 18 23:02:53 BST 2016


On 2016-05-12 19:47:17 [-0300], Felipe Sateler wrote:
> > This functionality will come with systemd 230:
> > https://github.com/systemd/systemd/pull/3148 , so nothing out of the
> > box yet.
> >
> > A more involved solution (but working right now) would be to have
> > OnFailure=clamav-failed.service and have clamav-failed.service stop
> > the socket.
> 
> For clarification: this would stop the socket only on failure. A
> simpler solution that would stop the socket always would be to have
> 
> ExecStopPost=/bin/systemctl --no-block stop clamav-daemon.socket
> 
> On the service. If clamav-daemon never exits on its own, then this
> might be a better solution

Thank you very much for your feedback.
So there is something Joey can try/use for now. In the longterm we need
think if we want to keep the socket activation. I think it was
introduced so freshclam can kick clamd to start after initial
instalation (once the virus database was donwloaded). Sadly it did not
work as expected because systemd evalutated the "condition" only once.
>From the bug history it is fixed for systemd in unstable but not stable.

Now with the background of getting killed repeatedly by OOM it makes me
wonder if we still want that. Adding RestartOnFailure with a delay of 1
minute or so to clamav-daemon.service would probably do the job, too.

Sebastian




More information about the Pkg-systemd-maintainers mailing list