From 33b846c4b7116b4973e100486ae0b5955e9a1983 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 18 Nov 2014 19:12:01 +0000 Subject: [PATCH 03/13] Log service_start_timeout (aka activation_timeout) when we exceed it Also upgrade it to a warning. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86442 --- bus/activation.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bus/activation.c b/bus/activation.c index 614ce65..08b8fc2 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1433,7 +1433,12 @@ static dbus_bool_t pending_activation_timed_out (void *data) { BusPendingActivation *pending_activation = data; + BusContext *context; DBusError error; + int timeout; + + context = pending_activation->activation->context; + timeout = bus_context_get_activation_timeout (context); /* Kill the spawned process, since it sucks * (not sure this is what we want to do, but @@ -1444,10 +1449,11 @@ pending_activation_timed_out (void *data) dbus_error_init (&error); - bus_context_log_and_set_error (pending_activation->activation->context, - DBUS_SYSTEM_LOG_INFO, &error, DBUS_ERROR_TIMED_OUT, - "Failed to activate service '%s': timed out", - pending_activation->service_name); + bus_context_log_and_set_error (context, DBUS_SYSTEM_LOG_WARNING, &error, + DBUS_ERROR_TIMED_OUT, + "Failed to activate service '%s': timed out " + "(service_start_timeout=%dms)", + pending_activation->service_name, timeout); pending_activation_failed (pending_activation, &error); -- 2.8.1