<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>The code is being run on systemd 247.6. I finally got some debug logs to share (see below). The starting of opticsd.service is held back, waiting for temperature-controller.service, which is good. However, the line right after: Job 721, which is a stop job
for temperature-controller finished with result=done. That seems to trigger the continuation of opticsd.service. I don't have the logs for when Job 107 was started and why Job 721 is created. My guess is that temperature-controller is waiting for coco-wiper-manager
as indicated in Job 722 and Job 809. Could this really be a bug and I am that lucky to stumble into it?</p>
<p><br>
</p>
<p></p>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=StopUnit cookie=1 reply_cookie=0 signature=ss error-name=n/a
error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Trying to enqueue job temperature-controller.service/stop/replace</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Added job temperature-controller.service/stop to transaction.</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Job 107 temperature-controller.service/start finished, result=canceled</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=1 reply_cookie=0 signature=uoss error-name=n/a
error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Installed new job temperature-controller.service/stop as 721</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Enqueued job temperature-controller.service/stop as 721</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/temperature_2dcontroller_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged
cookie=2 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/temperature_2dcontroller_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged
cookie=3 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobNew cookie=4 reply_cookie=0 signature=uos error-name=n/a
error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=method_return sender=org.freedesktop.systemd1 destination=n/a path=n/a interface=n/a member=n/a cookie=5 reply_cookie=1 signature=o error-name=n/a error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: opticsd.service: starting held back, waiting for: temperature-controller.service</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Job 721 temperature-controller.service/stop finished, result=done</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=6 reply_cookie=0 signature=uoss error-name=n/a
error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Failed to read pids.max attribute of cgroup root, ignoring: No data available</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: opticsd.service: Forked /usr/bin/udevadm as 561</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/opticsd_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=7 reply_cookie=0
signature=sa{sv}as error-name=n/a error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Sent message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/opticsd_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=8 reply_cookie=0
signature=sa{sv}as error-name=n/a error-message=n/a</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: opticsd.service: Changed dead -> start-pre</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Starting Optics daemon...</div>
...
<p></p>
<p><br>
</p>
<p></p>
<div></div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Keeping job coco-wiper-manager.service/start because of temperature-controller.service/start</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Installed new job temperature-controller.service/start as 722</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Enqueued job temperature-controller.service/start as 722</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: starting held back, waiting for: coco-wiper-manager.service</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Trying to enqueue job temperature-controller.service/stop/replace</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: Added job temperature-controller.service/stop to transaction.</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Job 722 temperature-controller.service/start finished, result=canceled</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Installed new job temperature-controller.service/stop as 809</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Enqueued job temperature-controller.service/stop as 809</div>
<div>Dec 22 18:03:17 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Job 809 temperature-controller.service/stop finished, result=done</div>
<div>Dec 22 18:03:18 axis-b8a44f278c56 systemd[1]: temperature-controller.service: Trying to enqueue job temperature-controller.service/start/replace</div>
<p></p>
<p><br>
</p>
<p>Best Regards,</p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
Christopher Wong
<div><br>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Andrei Borzenkov <arvidjaar@gmail.com><br>
<b>Sent:</b> Tuesday, December 21, 2021 8:24:35 AM<br>
<b>To:</b> Christopher Wong; systemd-devel@lists.freedesktop.org<br>
<b>Subject:</b> Re: [systemd-devel] After= and Wants= doesn't seem to have an effect</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 20.12.2021 17:05, Christopher Wong wrote:<br>
>> # /etc/systemd/system/iris-detection.service<br>
>> [Unit]<br>
>> Description=Iris detection<br>
>> PartOf=opticsd.service<br>
> <br>
> <br>
> How can you tell that it is a loop? iris-detection.service doesn't have any After= as you stated below.<br>
<br>
Yes, sorry, you are right.<br>
<br>
> Is it due to the PartOf=opticsd.service?<br>
> <br>
<br>
I do not think so. Still, loop is possible due to some other dependencies, it is also<br>
possible that actual unit definitions are different (e.g. units files have been changed<br>
after systemd read them).<br>
<br>
Running with debig log level may give some more hints.<br>
<br>
> <br>
> Best Regards,<br>
> <br>
> Christopher Wong<br>
> <br>
> ________________________________<br>
> From: systemd-devel <systemd-devel-bounces@lists.freedesktop.org> on behalf of Andrei Borzenkov <arvidjaar@gmail.com><br>
> Sent: Monday, December 20, 2021 1:27:42 PM<br>
> To: systemd-devel@lists.freedesktop.org<br>
> Subject: Re: [systemd-devel] After= and Wants= doesn't seem to have an effect<br>
> <br>
> On 20.12.2021 15:06, Christopher Wong wrote:<br>
>> # /etc/systemd/system/iris-detection.service<br>
>> After=temperature-controller.service<br>
>><br>
>> # /usr/lib/systemd/system/temperature-controller.service<br>
>> After=iris-detection.service<br>
> <br>
> This is loop and systemd is free to break it by ignoring some dependency.<br>
> <br>
<br>
</div>
</span></font>
</body>
</html>