GNOME Bugzilla – Bug 769387
X11: Race condition when managing windows
Last modified: 2021-07-05 13:44:57 UTC
There is an apparent race condition in the X11 code that sets up a window for management. This manifests with the Oracle database installer and potentially other Java Swing applications, and leads to dialogs getting the wrong size (too small, typically zero internal width or height). See e.g. http://dba.stackexchange.com/questions/60631/oracle-11g-installation-stuck-at-installation for a screenshot. This happens whenever the application opens its second dialog in my tests, and it's not possible to resize the dialogs either; there doesn't seem to be any workaround apart from blind keyboard interaction. I suspect this was introduced with the removal of server grabs in bug 721345.
Created attachment 332483 [details] Mutter verbose log of good/bad manage Verbose log from Mutter. I've marked the point at which I open a dialog successfully with: ========== BEGIN good dialog management ========== And a dialog that opens at the wrong size with: ========== BEGIN bad dialog management ==========
Created attachment 332484 [details] xtrace log xtrace of client app interaction with X11 on good/bad dialog open. The first instance of 'My Oracle Support' in a ChangeProperty indicates the first attempt, which is successful. The second instance gets a bad size.
Created attachment 332486 [details] [review] 0001-x11-core-Fix-race-condition-when-managing-windows.patch Naïve attempt at a fix. This reintroduces part of the code to support server grabs that was removed in bug 733068, and protects the minimum critical section with a grab. It works around resulting hangs by short-circuiting some of the keybindings code when the server is grabbed. Unpalatable, but seems to solve the problem.
I'd like to turn this into a proper fix, but I'm not sure how to proceed. I'm aware that grabs were taken out for a reason, but the manage section looks extremely racey to me. Thoughts?
This sounds a bit like bug 759492 . Is this reproducible on git master?
The grab changes from bug 721345 were introduced on the gnome-3-10 branch just prior to mutter 3.10.3. The bug discussed here was first discovered and patched in SLE 12 with mutter 3.10.4. The latest version I've verified it with is mutter 3.20.3, which has the fix for bug 759492. I'll see if I can verify it with a more recent version.
Looks like this'll have to wait at least a week.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.