Summary: | systemd gets stuck in loop with ConditionACPower in timer activated service | ||
---|---|---|---|
Product: | systemd | Reporter: | mus.svz |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | major | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
backup service
backup timer |
Created attachment 80901 [details]
backup timer
I just tested this again with 209 and it doesn't happen anymore, so this must have been fixed somewhere between 205 and 209. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 80900 [details] backup service I use the attached service and timer units for backup purposes. The service file contains ConditionACPower=yes because I don't want the backup to run when the power isn't plugged in. This works as expected as long as the power is plugged in. If however the service is triggered by the timer while the power is unplugged, systemd gets stuck in a loop. CPU usage by systemd goes up to about 75%, systemd-journal up to 35%, and the journal is flooded with the following message: Jun 16 12:17:42 mus-laptop systemd[1]: Started Backup laptop Every 10 seconds, the following is logged, followed by another few hundred "Started backup-laptop" messages: Jun 16 12:17:52 mus-laptop systemd-journal[178]: Suppressed 16332 messages from /system Jun 16 12:17:52 mus-laptop systemd[1]: Started Backup laptop. Note that this doesn't happen when I trigger the service manually, only if it is triggered by the timer. The loop stops as soon as I stop the timer. "systemctl status backup-laptop" shows the following while it is stuck in the loop: backup-laptop.service - Backup laptop Loaded: loaded (/etc/systemd/system/backup-laptop.service; static) Active: inactive (dead) since Sun 2013-06-16 12:02:23 CEST; 21min ago start condition failed at Sun 2013-06-16 12:24:03 CEST; 2ms ago Main PID: 17667 (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/backup-laptop.service I'm running Arch Linux x64 with systemd 204.