Bug 4753 - tl-xinit doesn't terminate on account of a dead X server
Summary: tl-xinit doesn't terminate on account of a dead X server
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.11.0
Assignee: Pierre Ossman
URL:
Keywords: aleta_tester, relnotes
: 5999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-15 13:46 CEST by Pierre Ossman
Modified: 2019-11-27 16:10 CET (History)
3 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2013-07-15 13:46:16 CEST
Although the comment in the code states otherwise, tl-xinit will not terminate a session because just the X server dies. It will wait until the client is also dead.

Although the client almost always terminates when the X server goes away, this isn't always the case. So we should make sure a missing Xvnc is also sufficient.


One note though is that we probably want to run xlogout.d in this scenario as well. Unfortunately we have no way of forcing this to happen, but we could at least give it a few seconds and hope it runs.
Comment 1 Pierre Ossman cendio 2018-03-06 14:04:27 CET
A lot of work was done on tl-xinit on bug 5696, but unfortunately this issue still remains. Tested with the current nightly build and 'bash -c "sleep 1000"' as the session command.
Comment 2 Pierre Ossman cendio 2019-11-20 09:36:57 CET
*** Bug 5999 has been marked as a duplicate of this bug. ***
Comment 4 Pierre Ossman cendio 2019-11-22 15:33:37 CET
For reference, this bug was introduced in r21424 as part of bug 357.
Comment 6 Pierre Ossman cendio 2019-11-22 16:11:24 CET
Fixed now.

Make sure to test both X server terminating first, and client terminating first.

Bonus points for testing with the other ignoring SIGTERM as well.
Comment 8 Alex Tanskanen cendio 2019-11-27 16:10:52 CET
To test that it's fixed, I started a client. In the client, I paused a process (e.g, "gnome-session-binary") and from the server I terminated Xvnc and verified that no other processes from the client was running in the background.

Another check I did was to paused Xvnc from the client. From the server I terminated gnome that was running on the client and checked that it did indeed close the client without having client processes in the background.

To make sure that this fix didn't break anything, I terminated the session in different ways and verified that the session was terminated. I did the following tests: 

  1) Terminate session by logging out normally
  2) Set the -MaxDisconnectionTime 60 and with until client got disconnected
  3) Terminate client from tlwebadmin interface
  4) Terminate Xvnc from server
  5) Selecting "End existing session" from the tl client

Note You need to log in before you can comment on or make changes to this bug.