Comment 13 for bug 716167

Revision history for this message
Aurélien Gâteau (agateau) wrote : Re: [Bug 716167] Re: Unknown process not responding on shutdown

On Tuesday 15 March 2011 22:58:01 you wrote:
> This bug is related to bug #706248.
> After much debugging, it seems the problem is related to how we are
> registering unity-2d-launcher and unity-2d-panel with gnome-session. We
> are registering with gnome-session such that these two application can be
> restarted automatically by the session when they crash.
>
> The registration code is in libunity-2d-
> private/src/gnomesessionclient.cpp in method connectToSessionManager().
> On logout, the method queryEndSession() is called. Note that
> endSession() and stop() methods NEVER get called which doesn't seem
> correct.
>
> I was able to make the "Unknown process" dialog go away (at least couldn't
> make it fail in my testing) by changing the dbus call in queryEndSession()
> to async instead of sync, i.e.
> QDBusPendingCall call = iface.asyncCall("EndSessionResponse", true,
> ""); instead of:
> QDBusReply<void> reply = iface.call("EndSessionResponse", /* is_okay= */
> true, /* reason= */ "");

Makes sense. I am going to apply something like this.
>
> But even in changing call to async, the long delay still occurs on
> logout (bug 706248) so clearly we are still not doing something
> correctly. Commenting out the impl in connectToSessionManager() fixes
> both problems, but then launcher and panel won't restart on crash.

I recently noticed the launcher takes a long time to shutdown. I wonder if
this could be related.
>
> I'm looking at nautilus and metacity, which both get restarted by the
> session to see how they register/unregister. It's not apparent to me how
> they do it. I couldn't find any code in either that was responsible for
> registering, certainly they are not doing it how we are. So my big
> question is, does anyone know how nautilus/metacity are auto-restarted
> because I think we should do it the same way as they do not have the
> problems we have.

metacity session code is in core/session.c, but it uses the old, X11-based,
protocol which I have been told should be avoided. Quite a few applications do
it the way we do so I think we are on the right track but this kind of bug is
difficult to track, and I probably haven't looked at it long enough yet.