Bug 50177

Summary: systemd-journalctl -f -o cat fails with "Failed to get data: No such file or directory" if logged message haven't MESSAGE= part
Product: systemd Reporter: Maksim Melnikau <maxposedon>
Component: generalAssignee: Lennart Poettering <lennart>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Maksim Melnikau 2012-05-21 07:51:13 UTC
systemd-journalctl -o cat stumble on messages without MESSAGE=part; instead of skipping them or printing \n (like echo <nothing>)

Steps to reproduce:
1. # systemd-journalctl -f -n 1 -o cat
2. % cat bug.c  
#include <systemd/sd-journal.h>
int main() {
    return sd_journal_send("NO_MESSAGE=1", NULL);
}
3. % gcc -O0 -Wall -std=gnu99 -g3 -lsystemd-journal example.c -o example
4. % ./bug
5. # systemd-journalctl -f -n 1 -o cat 
Failed to get data: No such file or directory

==================

# systemd-journalctl --version
systemd 44
gentoo
+PAM +LIBWRAP -AUDIT -SELINUX -SYSVINIT -LIBCRYPTSETUP
Comment 1 Lennart Poettering 2012-09-18 09:13:15 UTC
Fixed in git.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.