Comment 4 for bug 1295237

Revision history for this message
Charles Kerr (charlesk) wrote :

Looks like what's happening here is indicator-datetime is blocking for 25 seconds inside of libnotify's notify_notification_show() call, waiting for unity-notifications to respond.

> (process:6560): Indicator-Datetime-DEBUG: ClockWatcher 0xbe92d450 calling pulse() due to clock minute_changed
> (process:6560): libnotify-WARNING **: Failed to connect to proxy
> (process:6560): Indicator-Datetime-WARNING **: Unable to show snap decision for 'Alarm': Timeout was reached

Those last three lines of that log are the interesting part. The code being triggered is this:

====

    auto nn = notify_notification_new(title, body.c_str(), icon_name);
    if (mode == NOTIFY_MODE_SNAP)
    {
        notify_notification_set_hint_string(nn, "x-canonical-snap-decisions", "true");
        notify_notification_set_hint_string(nn, "x-canonical-private-button-tint", "true");
        notify_notification_add_action(nn, "show", _("Show"), on_snap_show, data, nullptr);
        notify_notification_add_action(nn, "dismiss", _("Dismiss"), on_snap_dismiss, data, nullptr);
        g_signal_connect(G_OBJECT(nn), "closed", G_CALLBACK(on_snap_closed), data);
    }
    g_object_set_data_full(G_OBJECT(nn), "snap-data", data, snap_data_destroy_notify);

    GError * error = nullptr;
    notify_notification_show(nn, &error);
    if (error != NULL)
    {
        g_warning("Unable to show snap decision for '%s': %s", body.c_str(), error->message);
        g_error_free(error);
        data->show(data->appointment);
    }

In libnotify, notify_notification_show() calls its helper function _notify_get_proxy(), which calls g_dbus_proxy_new_for_bus_sync(). g_dbus_connection_send_message_with_reply_unlocked() uses a default timeout of 25 seconds, which is consistent with what davmor2's seeing:

[11:38:20] <davmor2> charles: it went off at 16:35:26 rather than 16:35:00

Another indication that this is where the 25 seconds went is the error message returned by gio, which matches the one in the log. send_message_with_reply_timeout_cb()'s message is "Timeout was reached"