Bug 1763619

Summary: Assertion failure when system journal rotation fails
Product: Red Hat Enterprise Linux 8 Reporter: David Tardon <dtardon>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dtardon, systemd-maint-list
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-239-19.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:45:06 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:
Embargoed:

Description David Tardon 2019-10-21 08:04:04 UTC
This bug was initially created as a copy of Bug #1619543

I am copying this bug because: 
It's still a bug in 8.x.


Description of problem:

The system journal rotation may fail when flushing to /var in the following piece of code:

int server_flush_to_var(Server *s) {
[...]
                server_rotate(s);
                server_vacuum(s);

                if (!s->system_journal) {
                        log_notice("Didn't flush runtime journal since rotation of system journal wasn't successful.");
                        r = -EIO;
HERE ---->              goto finish;
                }
[...]
finish:
        journal_file_post_change(s->system_journal);
[...]
This leads to calling journal_file_post_change with NULL pointer argument, causing the following assertion to fail:

void journal_file_post_change(JournalFile *f) {
        assert(f);
        [...]
}


Version-Release number of selected component (if applicable):

systemd-219 -> latest upstream


How reproducible:

Don't know


Additional info:

Upstream PR: https://github.com/systemd/systemd/pull/9893

Comment 1 David Tardon 2019-10-21 10:30:24 UTC
PR: https://github.com/systemd-rhel/rhel-8/pull/32

Comment 3 Lukáš Nykrýn 2019-10-22 14:25:56 UTC
fix merged to github master branch -> https://github.com/systemd-rhel/rhel-8/pull/32 -> post

Comment 7 errata-xmlrpc 2020-04-28 16:45:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1794