[systemd-devel] kernel messages not making it to journal

Lennart Poettering lennart at poettering.net
Tue Jun 16 08:56:32 UTC 2020


On Mo, 01.06.20 19:11, Chris Murphy (lists at colorremedies.com) wrote:

> dmesg shows this:
>
> [   22.947118] systemd-journald[629]: File
> /var/log/journal/26336922e1044e80ae4bd42e1d6b9099/user-1000.journal
> corrupted or uncleanly shut down, renaming and replacing.

journald itself logs about most things to kmsg, and for a select few
things also to its own journals. But there's the general problem: in
some conditions where we cannot write to disk or where we encounter
corrupted files we cannot safely write to disk, hence we don't and
only write to kmsg.

We genreally also write out everything from kmsg to disk, but ther we
actually filter the stuff we wrote there ourselves, to avoid busy
loops.

It#'s a bit of a tricky situation: when things are fucked we need to
be very careful what we do to not make things worse.

> [   22.953883] systemd-journald[629]: Creating journal file
> /var/log/journal/26336922e1044e80ae4bd42e1d6b9099/user-1000.journal on
> a btrfs file system, and copy-on-write is e
>
> But journalctl does not show it at all. Seems like it might be a bug,
> I expect it to be recorded in the journal, not only found in dmesg.

I figure in this case we should probably generate a log message in the
main journal file, since only the user one was corrupted.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list