GNOME Bugzilla – Bug 105338
hang if multiple apps request interaction
Last modified: 2004-12-22 21:47:04 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.
Created attachment 14140 [details] freeze.c (test case)
Created attachment 14442 [details] [review] Probable fixr
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.
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.
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
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!