Bug 65818 - systemd gets stuck in loop with ConditionACPower in timer activated service
Summary: systemd gets stuck in loop with ConditionACPower in timer activated service
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium major
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 10:27 UTC by mus.svz
Modified: 2014-02-20 18:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
backup service (191 bytes, text/plain)
2013-06-16 10:27 UTC, mus.svz
Details
backup timer (115 bytes, text/plain)
2013-06-16 10:28 UTC, mus.svz
Details

Description mus.svz 2013-06-16 10:27:44 UTC
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.
Comment 1 mus.svz 2013-06-16 10:28:06 UTC
Created attachment 80901 [details]
backup timer
Comment 2 mus.svz 2014-02-20 18:08:34 UTC
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.