journald: downgrade event source priority of kmsg to same as native/syslog inputs

So far we schduled kmsg events at higher priority than native/syslog
ones. But that's quite problematic, since it means that kmsg events can
drown out native/syslog log events. And this actually shows up in some
CI tests.

Address that, and schedule all three sources at the same priority, so
that the earlier event always is processed first, regarding which
protocol is used.
This commit is contained in:
Lennart Poettering
2025-05-13 15:39:57 +02:00
parent c8aff47a9c
commit a7550558fb
+1 -1
View File
@@ -410,7 +410,7 @@ int server_open_dev_kmsg(Server *s) {
if (r < 0)
return log_error_errno(r, "Failed to add /dev/kmsg fd to event loop: %m");
r = sd_event_source_set_priority(es, SD_EVENT_PRIORITY_IMPORTANT+10);
r = sd_event_source_set_priority(es, SD_EVENT_PRIORITY_NORMAL+5);
if (r < 0)
return log_error_errno(r, "Failed to adjust priority of kmsg event source: %m");