Bug 1158206

Summary: Job timers.target/start deleted to break ordering cycle starting with basic.target/start
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 21CC: johannbg, jsynacek, lnykryn, msekleta, s, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kmod-18-4.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-12 02:38:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
systemd-analyze dump - gzipped
none
journalctl -b - gzipped none

Description Orion Poplawski 2014-10-28 20:10:46 UTC
Description of problem:

On boot I see:

Oct 27 15:20:00 vmf21.cora.nwra.com systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start

Version-Release number of selected component (if applicable):
systemd-216-5.fc21.x86_64
systemd-216-11.fc22.x86_64

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-10-28 20:36:05 UTC
'systemd-analyze dump' and 'journalctl -b' please.

Comment 2 Orion Poplawski 2014-10-28 20:42:46 UTC
Created attachment 951530 [details]
systemd-analyze dump - gzipped

Comment 3 Orion Poplawski 2014-10-28 20:43:43 UTC
Created attachment 951531 [details]
journalctl -b - gzipped

Comment 4 Zbigniew Jędrzejewski-Szmek 2014-10-28 21:11:19 UTC
That's strange. In the dump, timers.target is before basic.target and everything seems alright.

Comment 5 Orion Poplawski 2014-10-31 16:07:30 UTC
From /usr/lib/systemd/systemd --test --system | grep -Fi cycle:

Found ordering cycle on basic.target/start
Found dependency on timers.target/start
Found dependency on mandb.timer/start
Found dependency on time-sync.target/start
Found dependency on ntpdate.service/start
Found dependency on network.target/start
Found dependency on NetworkManager-wait-online.service/start
Found dependency on basic.target/start
Breaking ordering cycle by deleting job timers.target/start
Job timers.target/start deleted to break ordering cycle starting with basic.target/start

Does that help?

Comment 6 Zbigniew Jędrzejewski-Szmek 2014-10-31 16:27:35 UTC
http://cgit.freedesktop.org/systemd/systemd/commit/?id=919699ec301ea507e might be related.

Comment 7 Orion Poplawski 2014-10-31 17:48:03 UTC
Made that change, but still the same.

Comment 8 Zbigniew Jędrzejewski-Szmek 2014-11-02 17:00:58 UTC
OK, so the problem is that mandb.timer is Persistent=yes, which means systemd wants to have time synchronized before starting it, but also adds it implicitly to timers.target and thus to start it during early boot. Together this is impossible.

An easy (as systemd maintainer) solution would be to blame mandb, since they introduce the loop, strictly speaking. But current semantics just wrong and easy to get wrong, even for Persistent=no timers, since the dependency on timers.target is added automatically.

Looking at all the timer units available in F21, apart from systemd-readahead-done.timer and mdadm-last-resort@.timer, both of which specify DefaultDependencies=no, so are not part of timers.target anyway, none of them actually want to be part of early boot. So I'm inclined to just let timers.target lose the timing relationship with basic.target.

Patch sent to the mailing list ('unit: do not order timers.target before basic.target').

Comment 9 Zbigniew Jędrzejewski-Szmek 2014-11-02 17:34:32 UTC
Also http://cgit.freedesktop.org/systemd/systemd/commit/?id=14fe721b5f.

Comment 10 Fedora Update System 2014-11-03 13:24:12 UTC
kmod-18-4.fc21,systemd-216-7.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kmod-18-4.fc21,systemd-216-7.fc21

Comment 11 Fedora Update System 2014-11-04 14:21:27 UTC
kmod-18-4.fc21,systemd-216-9.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kmod-18-4.fc21,systemd-216-9.fc21

Comment 12 Fedora Update System 2014-11-05 13:17:27 UTC
kmod-18-4.fc21,systemd-216-10.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kmod-18-4.fc21,systemd-216-10.fc21

Comment 13 Fedora Update System 2014-11-05 19:24:59 UTC
Package kmod-18-4.fc21, systemd-216-10.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kmod-18-4.fc21 systemd-216-10.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14307/kmod-18-4.fc21,systemd-216-10.fc21
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2014-11-07 05:32:19 UTC
Package kmod-18-4.fc21, systemd-216-11.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kmod-18-4.fc21 systemd-216-11.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14307/kmod-18-4.fc21,systemd-216-11.fc21
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2014-11-12 02:38:23 UTC
kmod-18-4.fc21, systemd-216-11.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.