]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journald: downgrade event source priority of kmsg to same as native/syslog inputs
authorLennart Poettering <lennart@poettering.net>
Wed, 23 Apr 2025 09:26:58 +0000 (11:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 May 2025 13:39:57 +0000 (15:39 +0200)
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.

src/journal/journald-kmsg.c

index d2942315ef5d0f5e91b149a83647508fe3e4a276..96ee2320de25ab5b65d60b095720654f291cafd2 100644 (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");