From a7620f5dd16f0386b8ddeadfcd4e89da4050beef Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Jan 2025 13:56:58 +0100 Subject: [PATCH 1/2] bus-wait-for-jobs: fix service result table We were missing one service result (oom-kill), and the ratelimit one is called differently. Correct that so that we generate proper log messages for these cases. --- src/shared/bus-wait-for-jobs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/shared/bus-wait-for-jobs.c b/src/shared/bus-wait-for-jobs.c index e12189f298b..f28b42b5637 100644 --- a/src/shared/bus-wait-for-jobs.c +++ b/src/shared/bus-wait-for-jobs.c @@ -161,14 +161,15 @@ static void log_job_error_with_service_result(const char* service, const char *r static const struct { const char *result, *explanation; } explanations[] = { - { "resources", "of unavailable resources or another system error" }, - { "protocol", "the service did not take the steps required by its unit configuration" }, - { "timeout", "a timeout was exceeded" }, - { "exit-code", "the control process exited with error code" }, - { "signal", "a fatal signal was delivered to the control process" }, - { "core-dump", "a fatal signal was delivered causing the control process to dump core" }, - { "watchdog", "the service failed to send watchdog ping" }, - { "start-limit", "start of the service was attempted too often" }, + { "resources", "of unavailable resources or another system error" }, + { "protocol", "the service did not take the steps required by its unit configuration" }, + { "timeout", "a timeout was exceeded" }, + { "exit-code", "the control process exited with error code" }, + { "signal", "a fatal signal was delivered to the control process" }, + { "core-dump", "a fatal signal was delivered causing the control process to dump core" }, + { "watchdog", "the service failed to send watchdog ping" }, + { "start-limit-hit", "start of the service was attempted too often" }, + { "oom-kill", "of an out-of-memory (OOM) siutation" }, }; _cleanup_free_ char *service_shell_quoted = NULL; @@ -205,7 +206,7 @@ static void log_job_error_with_service_result(const char* service, const char *r extra: /* For some results maybe additional explanation is required */ - if (streq_ptr(result, "start-limit")) + if (streq_ptr(result, "start-limit-hit")) log_info("To force a start use \"%1$s reset-failed %2$s\"\n" "followed by \"%1$s start %2$s\" again.", systemctl, From 390dffb862af5791a33abef08011f87818249975 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Jan 2025 14:04:52 +0100 Subject: [PATCH 2/2] man: also fix documentation of start-limit-hit --- man/org.freedesktop.systemd1.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index b95f68b4a55..1fc925fe4a7 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -4838,9 +4838,10 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { code. signal indicates that a service process exited with an uncaught signal. core-dump indicates that a service process exited uncleanly and dumped core. watchdog indicates that a service did not send out watchdog ping messages - often enough. start-limit indicates that a service has been started too frequently - in a specific time frame (as configured in StartLimitInterval, - StartLimitBurst). + often enough. start-limit-hit indicates that a service has been started too + frequently in a specific time frame (as configured in StartLimitInterval, + StartLimitBurst). oom-kill indicates that a service was + terminated due to an out-of-memory (OOM) situation. ControlGroup indicates the control group path the processes of this service unit are placed in.