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 105338 - hang if multiple apps request interaction
hang if multiple apps request interaction
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
2.2.x
Other Linux
: Normal major
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-05 21:47 UTC by Daniel Elstner
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
freeze.c (test case) (2.38 KB, text/plain)
2003-02-05 21:48 UTC, Daniel Elstner
  Details
Probable fixr (894 bytes, patch)
2003-02-19 12:47 UTC, Arvind S N
none Details | Review

Description Daniel Elstner 2003-02-05 21:47:36 UTC
I'm experiencing reproducable hangs if at the same time multiple
applications request an interaction during save_yourself.  There seems to
be a race condition involved since it doesn't always happen, but it's
fairly easy to trigger.

The attached test case demonstrates the problem.  It always requests an
interaction during save_yourself (this is also what gedit does).  Start 2
or 3 instances and try running gnome-session-save a few times.  If that
doesn't trigger the hang try executing gnome-session-save after starting
each single instance (this seemed to force it; but perhaps it was by pure
chance, dunno).

If it hangs, the debug output shows that interact_callback() never gets
called thus the interaction key won't be returned.  The whole desktop is
frozen until a 'killall freeze'.  Also, I get this error message in
~/.gnome-errors:

XSMP error:  Offending minor opcode    = 6 (Interact)
             Offending sequence number = 11
             Error class               = BadState
             Severity                  = CanContinue

At first I thought it's a problem with multiple instances of the same app.
 But gedit + freeze or multiple renamed copies of freeze seem to trigger
the hang too.

This might as well be a GnomeClient bug; I have no clue.
Comment 1 Daniel Elstner 2003-02-05 21:48:44 UTC
Created attachment 14140 [details]
freeze.c (test case)
Comment 2 Arvind S N 2003-02-19 12:47:58 UTC
Created attachment 14442 [details] [review]
Probable fixr
Comment 3 Arvind S N 2003-02-19 12:53:13 UTC
Mark: the interact_list getting sorted seems to be a problem here.
Seems to be a timing issue on invoking SmsInteract() for the same
client in quick succession. Just my 2 cents ;-)

Daniel: Could you please apply this patch and test it out.
It works for me here.
Comment 4 Mark McLoughlin 2003-02-24 04:05:29 UTC
Arvind: yes that sorting seems bogus alright - should be fine to
remove it. Don't forget to remove the sorting function too.

Daniel: it'd be really helpful if you could let us know if this sorts
out the problem for you. Thanks for the precise test case, though.
Comment 5 Arvind S N 2003-02-25 08:44:52 UTC
Fixed in HEAD. Thanks.

2003-02-25  Arvind Samptur <arvind.samptur@wipro.com>
        * manager.c: (interact_request) : Removed the bogus
        sorting of the interact list. Fixes the problem of
        desktop hang when multiple apps request interaction
        Fixes #105338
Comment 6 Daniel Elstner 2003-03-16 17:10:48 UTC
Sorry for the extraordinary delay.  I just checked out the latest
gnome-session and indeed it doesn't hang anymore.

Much thanks for your work!