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

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - if unit's process exits non-zero no more logging for that unit until reboot"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=81019">81019</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>if unit's process exits non-zero no more logging for that unit until reboot
          </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>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>p.staszewski@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </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>If you have a unit that Execs a process that doesn't handle SIGTERM, that is
exists non-zero on it, logging will stop working after first `systemctl stop`
or `systemctl restart`.

There will be logging since the initial start (either by `systemctl start` or
if start on boot if `enable`d) till the non-zero exit. After that `start`ing or
`restart`ing will succeed but no logging will be performed. This will be
regardless of Standard*= options, as I have tested them.

I haven't tested if logging will work if the Execed process craps out and dies
non-zero (that is 'dies on its own', as oppossed to any of the `systemctl`
commands), but above behaviour is still a bug. Logging should *always* work,
regardless of the exit status and exit conditions. I do logging not because I
fancy having TB of data, but because I want *error* situations to be written
down. And a process exiting non-zero should not mean 'no more logging for this
unit during this boot!'.

Versions and stuff:

Linux rpi 3.12.23-1-ARCH #1 PREEMPT Fri Jun 27 01:32:04 MDT 2014 armv6l
GNU/Linux
local/libsystemd 214-2.1

Service file:
[Unit]
Description=DNS blackhole
After=network.target

[Service]
ExecStart=/home/user/adhole -t 250ms 192.168.0.3 192.168.0.21 blacklist.txt
WorkingDirectory=/home/user
Restart=always

[Install]
WantedBy=multi-user.target

AdHole that doesn't do SIGTERM:
<a href="https://github.com/drbig/adhole/tree/6b464386a99c50474eba5c735bb833c998cffddd">https://github.com/drbig/adhole/tree/6b464386a99c50474eba5c735bb833c998cffddd</a>

AdHole that does SIGTERM:
<a href="https://github.com/drbig/adhole/blob/a18f491c82bd0d485c69c290583329781cf94d24">https://github.com/drbig/adhole/blob/a18f491c82bd0d485c69c290583329781cf94d24</a></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>