debugging systemd ordering cycle

283 views
Skip to first unread message

Patrick Schleizer

unread,
Jul 25, 2016, 10:25:21 PM7/25/16
to qubes...@googlegroups.com
context:
- https://github.com/QubesOS/qubes-issues/issues/2193
- https://github.com/QubesOS/qubes-issues/issues/2198
- https://github.com/QubesOS/qubes-issues/issues/2194

Apparently not simple. I would appreciate suggestions on debugging
systemd ordering [and also dependency] cycles.

Something I found....

You need a newer version of systemd that provides systemd-analyze with
the verify command. systemd from jessie-backports works.

For 'dot': sudo apt-get install graphviz

>From http://unix.stackexchange.com/a/227963/49297

systemd-analyze verify default.target |&
perl -lne 'print $1 if m{Found.*?on\s+([^/]+)}' |
xargs --no-run-if-empty systemd-analyze dot |
dot -Tsvg >cycle.svg

The resulting graphic is so huge that I cannot make head or tail of it.

Cheers,
Patrick

Marek Marczykowski-Górecki

unread,
Jul 26, 2016, 4:43:41 AM7/26/16
to Patrick Schleizer, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Yes, I've tried this already.

Anyway I have already fixed those cycles - will push it in few hours.
And both qubes-db.service and qubes-mount-dirs.service will be before
local-fs.target, which is ordered before basic.target, so no extra
dependencies should be needed for services using qubes-db.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXlyK4AAoJENuP0xzK19cs6wIH/1n3Jag3cY0PL1H07rsMIq2O
Wy4LfBomNTSLc7VlS5B5ZSG4gMU/3YcGUeAo62JKBwN/9UupfpEVK5VPlOp895qG
Vez0Wf9bVm2ukWX0k5hT6Zh57gCDG9Sl0gVURpj7F90HOWEhvU1p5N6tVBg+lGEC
9XsjbyhrMS860+Ozrdx0pkytzyie6JjUVxZW/eu75coVfXiuCwtv/1tyX1+sv9hc
CVtTOp+EWw14hazXPbv3regA0uHPGv6wOwr5Y83VOMuBRZjPVTfbx/zMQFl6Nlhi
SN0UMMeop3xqBzywONVRIIe2/pa1F/gnZXrZlzMalmPX254PfsDsM7xxY/yrniM=
=aak7
-----END PGP SIGNATURE-----

Rusty Bird

unread,
Jul 26, 2016, 10:42:39 AM7/26/16
to qubes...@googlegroups.com, Patrick Schleizer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Patrick,

> I would appreciate suggestions on debugging systemd ordering [and
> also dependency] cycles.

If the cycle is relatively short, you could try opening a couple of
terminal windows and running "systemctl show" commands on each of the
mentioned units, to look at interesting property values with drop-ins
and defaults included:

systemctl show -p After,Before,Wants,Requires,RequiresOverridable \
-p Requisite,RequisiteOverridable,BindsTo,PartOf \
-p Conflicts,DefaultDependencies <unit> |
grep --color=never =.

Rusty
-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJXl3bOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfQEIQAJB+i90kiMm4nn11VUS73EJw
bVVsvSOf3BdFaeJMnnT2+1suEtalN8Ounm++4dwHN0/G2OLkps4xVzIdgG1MFknH
+a6jvd+dF9LFcKoL1Rxp7xFmQsvAJ1VTz8LSoDThEtaqVlSsaVnXicFFxWfpCn8d
pd7nWmAArFUszea+30uL6JA781kTc0vBBYNyPx4RQwAAtbHHbIi1cC4ra/8m0bGD
SbTb+DDziFtpAtJk+X8cxnVb8PXj+I5q+aMGvsRN4zZ3YbkkamIVlLi35on8rRxh
29RqUWeJphnCPaHzBFLiCciKUGtiIy5hiVBp4uxYmDfesti8QB3X3jTyVE7H3FDC
NnCUYPAHJU69Bh+QUxx5heA1U/N4dNzhX25tL9jI6YhK1MVbqHKRLTDH+bs9eg6k
G5VMAdVFKAijoY+c40SVrNorWUj7UPNXzQMV8XoUeNCoRAgZydc7w2q/pDoElleJ
x1r8zkCqRqVnjnS2tcLGx65tM9kBr1BdsiiMtgr1uUYnHmyoNEjteDgFJ32XvQXJ
vB/l/xmP6c12CUfQLBFzcwmn4HVwpQN6FJhOLeXAI/LU9xfLiItWQTiU6TBovIvO
o+dVPm+/aw7jXhuaZU3JMaeC+iQJO4nRKQIxkeSt/nouI6GMz8heS1BAWXDHFlpu
FRso3UXifvAPdVkWPIR9
=+j4J
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages