<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - daemon-reload clears bus_name_good bit, reloads kill units with BusName="
   href="https://bugs.freedesktop.org/show_bug.cgi?id=78311">78311</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>daemon-reload clears bus_name_good bit, reloads kill units with BusName=
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>michael+freedesktop@stapelberg.de
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This has originally been reported at <a href="http://bugs.debian.org/746151">http://bugs.debian.org/746151</a>

D-Bus-activated units (i.e. having BusName= non-empty) will lose their
bus_name_good bit after daemon-reloading:

x200 ~ $ systemctl dump | perl -nlE 'say if /joss.service:$/ ... /^->
.*.service/' | grep Bus
    BusName: org.freedesktop.timedate1
    Bus Name Good: yes

x200 ~ $ sudo systemctl daemon-reload
x200 ~ $ systemctl dump | perl -nlE 'say if /joss.service:$/ ... /^->
.*.service/' | grep Bus
    BusName: org.freedesktop.timedate1
    Bus Name Good: no

When using “systemctl reload” on the service and the control command SIGCHLDs,
service_sigchld_event() will call service_enter_running(s, SERVICE_SUCCESS),
but the following if condition will fail and therefore the last branch is taken
instead of the first one:

        if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
            (s->bus_name_good || s->type != SERVICE_DBUS))
                service_set_state(s, SERVICE_RUNNING);
        else if (s->remain_after_exit)
                service_set_state(s, SERVICE_EXITED);
        else
                service_enter_stop(s, SERVICE_SUCCESS);

I am not sure how to properly fix this, which is why I’m creating this report.
Thanks in advance for any fixes :).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>