Bug 1378865

Summary: Qt based applications get killed in Gnome before confirmation for Logout/Shutdown/Restart
Product: Red Hat Enterprise Linux 7 Reporter: jigar <jraising>
Component: qtAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 7.2CC: ajipatil, jgrulich, jkoten, rstrode, salmy, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 09:53:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1393395, 1420851, 1479818    

Description jigar 2016-09-23 12:10:44 UTC
Description of problem:

Selecting Logout from Gnome Shell causes a Logout dialog to appear. *When this dialog is rendered*,  many Qt-based application windows will disappear immediately. If the user then cancels out of the dialog, those applications are still gone even though no actual action to log out has been taken. Inspecting the running processes shows that some may still be running, so it's possible they aren't killed immediately, just unmapped by X.

The Shutdown/Restart dialog has the same problem behavior.
Other Gnome Shell modal popups (e.g. the command line available from Alt+F2) do not.

It is reproducible in Red Hat Enterprise Linux 7.2 with custom applications written in Qt 4.8.5. (Some of these are launched in /etc/xdg/autostart to provide domain-specific menus and controls on the desktop.)

Version-Release number of selected component (if applicable): gnome-shell-3.14.4-37


How reproducible: Always


Steps to Reproduce:

1. Install RHEL7.2 Server using the "Server with GUI" preset.
2. Install the qt-x11 and qt-devel packages from the DVD.
3. Launch Qt Designer (designer-qt4 from the command line).
4. Select Logout or Shutdown from the Gnome top-right menu. (Alternative: invoke gnome-session-quit from the terminal.)
5. Designer window will disappear immediately.
6. Cancel out of the dialog.
7. Note that the Designer window is still missing.

Actual results: User logout attempt kills the qt based applications on Gnome before confirmation for Logout/Shutdown/Restart.


Expected results: User can cancel out of a Logout or Shutdown dialog without degrading the state of currently running applications; applications should only be killed when Logout or Shutdown operation is confirmed.



Additional info: The bug is also reproducible upstream in latest version of Fedora

Comment 2 Florian Müllner 2016-09-28 00:35:25 UTC
(In reply to jigar from comment #0)
> Selecting Logout from Gnome Shell causes a Logout dialog to appear. *When
> this dialog is rendered*,  many Qt-based application windows will disappear
> immediately.

This doesn't appear to be a problem with the dialog by itself:
$ gdbus call --session --dest org.gnome.Shell \
             --object-path /org/gnome/SessionManager/EndSessionDialog \
             --method org.gnome.SessionManager.EndSessionDialog.Open 0 0 30 '[]'

Monitoring the org.gnome.SessionManager name, it appears that qt has some integration with gnome-session (in particular inhibitors). I suspect that the issue is that this integration is faulty, but let's start moving to gnome-session (which handles the actual session phases and inhibitors) for further investigation.

Comment 27 Jan Grulich 2017-08-29 10:19:12 UTC
Fixed with qt-4.8.7-1.el7.

Comment 32 errata-xmlrpc 2018-04-10 09:53:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0682