Bug 5999 - tl-xinit does not handle cleanup of session if X server dies/exit
Summary: tl-xinit does not handle cleanup of session if X server dies/exit
Status: CLOSED DUPLICATE of bug 4753
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:
Depends on:
Blocks:
 
Reported: 2016-09-21 09:28 CEST by Henrik Andersson
Modified: 2019-11-20 09:37 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2016-09-21 09:28:24 CEST
The main loop in tl-xinit waits for changes of subprocesss exits and signals (client and server). When client exits/signaled the main loop is exited and a cleanup of session is performed. However when server exits or is signaled we assume that the client will die due to X is killed which is not the case if client processes is not dependent on X server, such as upstart on ubuntu.

lightdm and gdm does not assume this behaviour and reacts when X server is exit/signaled.
Comment 1 Henrik Andersson cendio 2016-09-21 09:59:12 CEST
Here follows xinit.log for profile with only a xterm which will die when X server is gone.

	Executing start program command: xterm
	xterm: fatal IO error 104 (Connection reset by peer) or KillClient on X server ":1"
	XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
	tl-while-x11: lost Xserver connection, terminating child 9100 ...
		after 116 requests (116 known processed) with 2 events remaining.
	tl-while-x11: lost Xserver connection, terminating child 9106 ...
	tl-xinit: warning: Xserver terminated and returned 0
	Profile command exited with exit code 84
	Running /opt/thinlinc/etc/xlogout.d/tl-kdestroy.sh
	Running /opt/thinlinc/etc/xlogout.d/tl-umount-localdrives
	tl-xinit: client terminated and returned 0
	tl-xinit: Session terminated. Exiting.


Here is a unity profile which never will die, tl-xinit still lives after kill av X server.


	Executing profile: unity
	Using XDG session: ubuntu
	Executing XDG session command: upstart --user
	XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
		after 116 requests (116 known processed) with 0 events remaining.
	tl-while-x11: lost Xserver connection, terminating child 9403 ...
	tl-while-x11: lost Xserver connection, terminating child 9409 ...
	tl-xinit: warning: Xserver terminated and returned 0
Comment 2 Karl Mikaelsson cendio 2016-10-14 09:43:20 CEST
When a system administrator wants to disallow running programs or services in disconnected user sessions, they would append "-MaxDisconnectionTime <time>" to /vsmagent/xserver_args, as described in our documentation (https://www.cendio.com/resources/docs/tag/configuration_limiting_lifetime.html).

As we never ensure from tl-xinit that the xsession process actually terminates when Xvnc does, which means that the user processes can live on as long as they handle/don't care about missing a display. As a system administrator, I would have expected that the user session was terminated, not just Xvnc.

I can't remember hearing about this use case in earlier discussions, so I am reassigning this bug from 'Future' to '---' for further discussions.
Comment 3 Pierre Ossman cendio 2019-11-20 09:36:57 CET

*** This bug has been marked as a duplicate of bug 4753 ***

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