After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95834 - Log out does not respond immediately, appears to hang
Log out does not respond immediately, appears to hang
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.3.x
Other other
: Normal major
: ---
Assigned To: Session Maintainers
Session Maintainers
: 106454 115162 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-10-15 15:50 UTC by Ittai Balaban
Modified: 2005-07-31 19:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Ittai Balaban 2002-10-15 15:50:11 UTC
Package: gnome-session
Severity: normal
Version: 2.0.5
Synopsis: Log out does not respond
Bugzilla-Product: gnome-session
Bugzilla-Component: gnome-session

Description:
Description of Problem:
Clicking the 'logout' button does nothing. I fixed this by removing my
.gnome2/session file. I'm attaching the "tainted" session file.

Additional Information:
Here's the contents of the bad session file:
--------------------------------------------------------------

[Default]
0,id=117f000001000103469516400000008260000
0,Program=gkrellm
0,CloneCommand=gkrellm 
0,RestartCommand=gkrellm 
1,id=117f000001000103447856400000008470001
1,RestartStyleHint=1
1,Priority=40
1,Program=magicdev
1,CurrentDirectory=/home/ittai
1,CloneCommand=magicdev --sm-config-prefix /magicdev-4MTnOZ/ 
1,RestartCommand=magicdev --sm-config-prefix /magicdev-4MTnOZ/
--sm-client-id 117f000001000103447856400000008470001 
2,id=117f000001000103447856700000008470004
2,RestartStyleHint=2
2,Priority=60
2,Program=pam-panel-icon
2,CurrentDirectory=/home/ittai
2,CloneCommand=/usr/bin/pam-panel-icon 
2,RestartCommand=/usr/bin/pam-panel-icon --sm-client-id
117f000001000103447856700000008470004 
2,Environment=
3,id=117f000001000103447856600000008470003
3,RestartStyleHint=2
3,Priority=40
3,Program=nautilus
3,CurrentDirectory=/home/ittai
3,CloneCommand=nautilus --sm-config-prefix /nautilus-TMdHD0/ 
3,RestartCommand=nautilus --sm-config-prefix /nautilus-TMdHD0/
--sm-client-id 117f000001000103447856600000008470003
file:///home/ittai/music file:///home/ittai 
4,id=117f000001000103447856500000008470002
4,RestartStyleHint=2
4,Priority=40
4,Program=gnome-panel
4,CurrentDirectory=/home/ittai
4,CloneCommand=gnome-panel --sm-config-prefix /gnome-panel-OqkByZ/
--profile default 
4,RestartCommand=gnome-panel --sm-config-prefix /gnome-panel-OqkByZ/
--sm-client-id 117f000001000103447856500000008470002 --profile default 
5,id=117f000001000103447856300000008470000
5,RestartStyleHint=2
5,Priority=20
5,Program=metacity
5,CurrentDirectory=/home/ittai
5,DiscardCommand=rm -f
/home/ittai/.metacity/sessions/1034696015-836-3327347263.ms 
5,CloneCommand=metacity 
5,RestartCommand=metacity --sm-save-file 1034696015-836-3327347263.ms 
num_clients=6

----------------------------------------------------------------------------------




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-10-15 11:50 -------

Reassigning to the default owner of the component, gnome-session-maint@bugzilla.gnome.org.

Comment 1 Mark McLoughlin 2002-10-15 20:53:45 UTC
I'm not exactly sure what you mean. Does this mean clicking on the
logout button on the panel does nothing, or that when the logout
dialog appears and you click OK, nothing happens ?

In either case, though, I can't see how the session file would cause this.
Comment 2 Ittai Balaban 2002-10-15 20:59:30 UTC
I mean that pressing the logout button has no effect. Maybe the
session file has nothing to do with it. The fact is that when this
first happened I tried a few times to manually kill gnome-session,
then to log back in, and still the same problem happened. I tried
rebooting as well, which didn't help. Only when I deleted my session
file the logout worked again.
Maybe it's a random coincidence. I'll try to reconstruct it. More to
come..
Comment 3 Mark McLoughlin 2002-10-15 21:03:21 UTC
Yeah, any more info you can give around whether the session file is
actually casing this would be a great file. I know it its a pain
having to log out to try out this stuff.

Also. Call me stupid, but I can't to be sure which "logout button"
you're talking about

a) logout button on the panel
b) logout button in the logout dialog

Thanks
Comment 4 Ittai Balaban 2002-10-16 00:14:38 UTC
'Logout' button on the panel.
I still haven't checked about the relevance of the session file.
Comment 5 Elijah Newren 2002-11-24 01:13:11 UTC
I was able to get this same behavior today when trying to duplicate
bug #91273.  I put my comments in that bug, so look there for what I
did.  Also, as I mentioned there, this unresponsiveness of the 'Log
Out' on the panel seems to only occur for a limited time which
explains why this bug probably wasn't spotted sooner.  So, this may be
a duplicate of bug 91273, though they are definitely written about
different observed behaviors.

I'm going to reopen this and add myself to the cc list.  I'm also
adding GNOMEVER2.0 and bugsquad keywords and setting Version to 2.0.x.
 I'm not sure where the priority and severity should be, so I'm just
going to set them to High and Major to make them match bug 91273.

Comment 6 Elijah Newren 2002-11-25 06:09:08 UTC
Oops, I forgot to mark this as new.  Doing that now.
Comment 7 Thomas Benson 2003-06-10 15:35:02 UTC
I am seeing this behavior in a recent CVS build as well.  On my
machine, GNOME has to be up for about 2 minutes before Log Out will
respond.  If I boot and immediately hit Actions->Log Out, nothing
happens.  About 2 minutes later, the Log Out window pops up (without
me choosing Actions->Log Out again).  After that time, Log Out
responds immediately.

This also appears to be reported in bug 106454 (filed against gdm). 
Note that I do not run gdm.  This should probably have the GNOMEVER2.3
keyword as it is still present in CVS HEAD (I can't add it).
Comment 8 Elijah Newren 2003-06-10 15:46:49 UTC
Thanks for the update.  I just changed the version to 2.3.x (CVS HEAD
wasn't a listed option) and changed the keyword GNOMEVER2.0 to
GNOMEVER2.3.  I also added a comment to bug 106454--I think it's a
duplicate of this bug, but I'm not totally sure so I'm going to let
someone else mark it.
Comment 9 Thomas Benson 2003-06-10 23:27:59 UTC
I looked through the code and I think I have a pretty good idea why
this is happening, but I'm not sure how to fix it (I looked at this
code for the first time today, so this may be wrong).

In gnome-session/manager.c, there is a start_list that contains the
processes to be started when GNOME starts.  These entries are popped
off the list and passed to start_client, which starts them and puts
them on the pending_list until they are registered.  They are given a
timeout (purge_delay, which defaults to 2 minutes) via gtk_timeout_add
to register themselves before being moved to a purge list.  The
register callback is added in new_client, which I assume is a callback
from ICE.  On my machine, gnome-smproxy, metacity, gnome-panel, and
nautilus all get passed into new_client and are thus registered
properly.  However, my applets do not.  Since they do not register,
they stay on the pending_list, so the save_state stays set to
STARTING_SESSION.  This is the state of the system when I press
Actions -> Log Out.  Since the save_state is not MANAGER_IDLE, when
the request comes through save_yourself_request, it gets queued on the
save_request_list.  It stays on that list until the applets get purge
called on them, which then calls update_save_state.  purge removes
them from the pending list, and update_save_state changes the
save_state to MANAGER_IDLE when the pending_list empties.  Once this
happens, update_save_state notices the outstanding request on
save_request_list and pops up the Log Out box (this is why I only had
to press Log Out once and it was honored 2 minutes later).

I have confirmed this by changing the purge_delay, which changes how
long I have to wait, and by processing the save request immediately in
save_yourself_request despite the save_state being set to
STARTING_SESSION.  The latter approach allowed me to log out
immediately, but it's not really a solution as I shouldn't log out if
the session is really still starting.

The best solution would probably be if new_client was called for the
applets and they were properly registered.  But that seems to be a
callback associate with X, so I have no idea why it's not triggering
for the applets.  Any ideas?
Comment 10 Mark McLoughlin 2003-06-11 10:40:37 UTC
Ah, okay. I see. The applets had previously been saved into the
session file but they don't support session management anymore. So
when you go to log out, the session manager waits for them to respond
until the purge delay is up .. but of course they never do respond.

The quick workaround for that is to remove the applets from the
session file. They should never have been there.

But, this behaviour is clearly wrong and needs to be fixed - i.e. the
behaviour that things get stuck if we have non-session managed clients
in the session file.


One thing, though. Does this only happen if you go to log out straight
after logging in ... or does it always happen ?

I would expect the non-repsonding clients to get purged two minutes
after the session managers starts and for the session manager to go to
idle then.

Maybe its that they are not getting purged properly and that when you
go to log out the session manager sends them a SaveYourself even
though it shouldn't ?
Comment 11 Thomas Benson 2003-06-11 12:42:59 UTC
It only happens if I attempt to log out immediately after logging in
(or at least before purge_delay is up).  After purge_delay is up, they
do get purged and the save_state goes back to IDLE, so log out works
correctly after that point.
Comment 12 George Lebl 2003-08-04 20:52:37 UTC
*** Bug 106454 has been marked as a duplicate of this bug. ***
Comment 13 Mark McLoughlin 2004-02-04 09:14:26 UTC
*** Bug 115162 has been marked as a duplicate of this bug. ***
Comment 14 Luis Villa 2004-02-19 22:21:53 UTC
Mark, is this still a problem?
Comment 15 Ittai Balaban 2004-02-20 02:23:37 UTC
BTW this has not happened to me ever since I switched to 2.4.x series.
Comment 16 Luis Villa 2004-05-05 14:16:10 UTC
Thomas, is this still relevant? At any rate, given that it only happens if you
try to log out in the first two minutes of the session, I'm moving it down.
Comment 17 Thomas Benson 2004-05-05 14:58:33 UTC
I haven't been able to recreate it for quite some time (probably since switching
to 2.4.x).  I don't know if it is fixed or if I just failed to recreate it though.
Comment 18 Mark McLoughlin 2004-05-13 07:50:58 UTC
Okay, sounds like this has fixed itself. Go gnome-session ! :/