From c3b2326e94ac2b2f498ddc1b3e156961d0c786b6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 18 Nov 2014 19:12:01 +0000 Subject: [PATCH 06/11] 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 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bus/activation.c b/bus/activation.c index 9610c04..4a3bf4a 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1467,7 +1467,9 @@ static dbus_bool_t pending_activation_timed_out (void *data) { BusPendingActivation *pending_activation = data; + BusContext *context; DBusError error; + int timeout; /* Kill the spawned process, since it sucks * (not sure this is what we want to do, but @@ -1478,13 +1480,16 @@ pending_activation_timed_out (void *data) dbus_error_init (&error); + context = pending_activation->activation->context; + timeout = bus_context_get_activation_timeout (context); + dbus_set_error (&error, DBUS_ERROR_TIMED_OUT, "Activation of %s timed out", pending_activation->service_name); - bus_context_log (pending_activation->activation->context, - DBUS_SYSTEM_LOG_INFO, - "Failed to activate service '%s': timed out", - pending_activation->service_name); + bus_context_log (context, DBUS_SYSTEM_LOG_WARNING, + "Failed to activate service '%s': timed out " + "(service_start_timeout=%dms)", + pending_activation->service_name, timeout); pending_activation_failed (pending_activation, &error); -- 2.1.3