Bug 50177 - systemd-journalctl -f -o cat fails with "Failed to get data: No such file or directory" if logged message haven't MESSAGE= part
Summary: systemd-journalctl -f -o cat fails with "Failed to get data: No such file or ...
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 07:51 UTC by Maksim Melnikau
Modified: 2012-09-18 09:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.