[systemd-devel] Timer units fail when conditions fail

Thomas Bächler thomas at archlinux.org
Mon Feb 11 06:20:11 PST 2013

Consider the following timer unit:

Description=test timer

OnCalendar=*-*-* *:*:00/10

Combine this with the following service:

Description=test timer test unit


The unit is started every 10 seconds as expected. However, when AC is
unplugged, the timer gets stuck in state TIMER_RUNNING and does not
return to TIMER_WAITING, according to systemctl status. From that point
on, the timer is not triggered again.

The reason seems to be that in unit.c, lines 1057-1065, the service is
treated as if it is already starting and the timer is not notified of
the failure. I am not familiar enough with systemd internals to propose
a fix.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130211/aa316454/attachment.pgp>

More information about the systemd-devel mailing list