[systemd-bugs] [Bug 85308] New: unit file options longer than 2048 characters are truncated
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 21 16:59:55 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=85308
Bug ID: 85308
Summary: unit file options longer than 2048 characters are
truncated
Product: systemd
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: bcwaldon at gmail.com
QA Contact: systemd-bugs at lists.freedesktop.org
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.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141021/4feb49d4/attachment-0001.html>
More information about the systemd-bugs
mailing list