[systemd-bugs] [Bug 86855] New: Reading journal backwards misses entries
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Nov 29 08:39:44 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=86855
Bug ID: 86855
Summary: Reading journal backwards misses entries
Product: systemd
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: major
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: jjk at jjacky.com
QA Contact: systemd-bugs at lists.freedesktop.org
Simple illustration of the problem:
% coredumpctl list COREDUMP_PID=8212
TIME PID UID GID SIG PRESENT EXE
Sat 2014-11-29 13:17:03 CET 8212 1000 100 6 * /usr/bin/Xorg.bin
% coredumpctl list -1 COREDUMP_PID=8212
No match found.
The reason it fails to find a match with -1 is that then
sd_journal_seek_tail()/sd_journal_previous() are used, else it's be
seek_head()/next(); and apparently going backwards doen't work right.
As a test, I did a small program that uses similar matches (COREDUMP_PID=8212
AND MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1), if the loop with the call to
sd_journal_get_data() is done with SD_JOURNAL_FOREACH(j) it works, with
SD_JOURNAL_FOREACH_BACKWARDS(j) no matches are found.
Trying using another set of matches (on a COREDUMP_EXE this time), I get 13
matches going forward, only 12 going backwards.
No idea what's going on, but clearly going backwards in the journal doesn't
work properly.
This is on up-to-date Arch Linux x86_64:
% systemctl --version
systemd 217
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD +IDN
--
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/20141129/d7655639/attachment.html>
More information about the systemd-bugs
mailing list