Bug 1029638

Summary: systemd-journald truncates syslog messages at the first newline character
Product: [Fedora] Fedora Reporter: Andrew J. Schorr <aschorr>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: collura, johannbg, lnykryn, mschmidt, msekleta, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-204-18.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 03:28:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andrew J. Schorr 2013-11-12 19:24:50 UTC
Description of problem:
If you log a syslog message that contains embedded newline characters, journald truncates it at the first newline character.  This became clear because the default snmptrapd logging formats include embedded newline characters.  Most of the message is discarded as a result.

Version-Release number of selected component (if applicable):
systemd-204-17.fc19.x86_64


How reproducible:
Try running this:

bash-4.2$ logger 'this is
> a test message with some
> embedded newlines'

Then observe that only "this is" appears in the journalctl output, and in
/var/log/messages.

In Fedora 14 with rsyslogd, one sees the full message in /var/log/messages:

Nov 12 14:17:14 ti119 schorr: [ID user.notice] this is#012a test message with some#012embedded newlines


Steps to Reproduce:
1. logger 'this is
> a test message with some
> embedded newlines'
2. journalctl -n
3.

Actual results:
[root@ti124 test]# journalctl -n 100 | grep this
Nov 12 14:16:41 ti124 schorr[23125]: this is


Expected results:
The full message with escape sequences for the newline characters.


Additional info:

Comment 1 Michal Schmidt 2013-11-13 09:26:03 UTC
Looks like an issue already fixed in upstream:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=04fefcddb8e71e87abeb0faff0f547eb8ae88a64

Comment 2 Fedora Update System 2013-12-09 03:37:58 UTC
systemd-204-18.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/systemd-204-18.fc19

Comment 3 Fedora Update System 2013-12-10 06:13:11 UTC
Package systemd-204-18.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-204-18.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23072/systemd-204-18.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-12-15 03:28:23 UTC
systemd-204-18.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.