HomeDefectsLIN1022-3059
Fixed

LIN1022-3059 : sd_journal_next returns one entry per journal file after sd_journal_seek_tail

Created: Jan 16, 2023    Updated: Apr 2, 2023
Resolved Date: Feb 26, 2023
Found In Version: 10.22.33.5
Fix Version: 10.22.33.6
Severity: Standard
Applicable for: Wind River Linux LTS 22
Component/s: Userspace

Description


The following systemd issue has been reported by the community:
https://github.com/systemd/systemd/issues/9934
It seems to be an older report:
https://bugzilla.redhat.com/show_bug.cgi?id=979487

To put it shortly, it appears that calling sd_journal_next() after calling sd_journal_seek_tail(), returns some older entries that are not correlated with anything that might have appeared since the sd_journal_seek_tail() call. The reported noticed that sd_journal_next() will return one entry per journal in the above scenario.

There is a workaround for this, namely to use sd_journal_previous_skip (..., 1) call after
the sd_journal_seek_tail:
https://github.com/commaai/openpilot/pull/23319/commits/3b9b2924406196411c693d6f5e66112452d884a9

Our customer is already aware of this workaround but they want a proper fix for this issue.

Defect for LTS19: https://jira.wrs.com/browse/LIN1019-8089

Steps to Reproduce

The following systemd issue has been reported by the community:
[https://github.com/systemd/systemd/issues/9934]
It seems to be an older report:
[https://bugzilla.redhat.com/show_bug.cgi?id=979487]

To put it shortly, it appears that calling sd_journal_next() after calling sd_journal_seek_tail(), returns some older entries that are not correlated with anything that might have appeared since the sd_journal_seek_tail() call. The report noticed that sd_journal_next() will return one entry per journal in the above scenario.

There is a workaround for this, namely to use sd_journal_previous_skip (..., 1) call after
the sd_journal_seek_tail:
[https://github.com/commaai/openpilot/pull/23319/commits/3b9b2924406196411c693d6f5e66112452d884a9]