<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - unit file options longer than 2048 characters are truncated"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=85308">85308</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>unit file options longer than 2048 characters are truncated
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

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

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

        <tr>
          <th>Reporter</th>
          <td>bcwaldon@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Create a unit with an option longer than 2048 characters and attempt to start
it. Check `systemctl status` and you are likely to see an error. The unit I
used is a single ExecStart statement trying to echo 2018 periods:

[Service]
ExecStart=/bin/bash -c "echo
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 ......................"


And here are the logs:

Oct 21 23:54:53 core-01 systemd[1]: [/run/systemd/system/foo.service:3] Missing
'='.
Oct 21 23:54:58 core-01 systemd[1]: [/run/systemd/system/foo.service:2] String
is not UTF-8 clean, ignoring assignment: /bin/bash -c "echo
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .......................


Note that the error seems to be telling me I have a malformed option line, but
it clearly chopped off the trailing double quote that would make it valid. I
dug into this a bit, and it looks like shared/config-parser.c's config_parse
uses LINE_MAX, which is defined as 2048 on my system. I tried googling around
for any documentation of what the actual line limit is, and came up empty
handed.

The ideal path forward here is to remove the line length limit. If that is
unreasonable, this limit should at least be documented somewhere obvious.
Additionally, the line length should be checked and logged, as the unrelated
error I ran into ("String is not UTF-8 clean") is a red herring.</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>