Bug 1778 - tlclient hard kills subprocesses on Windows (and takes time doing so)
Summary: tlclient hard kills subprocesses on Windows (and takes time doing so)
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: trunk
Hardware: PC Windows
: P2 Normal
Target Milestone: MediumPrio
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-13 09:46 CET by Pierre Ossman
Modified: 2024-08-19 14:00 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2006-01-13 09:46:41 CET
When exiting the client on Windows it takes some time (5-10 seconds) before
every process is terminated. There seems to be some delay between stopping each
process

I.e.

 * Vncviewer dies.
 * Delay.
 * putty dies.
 * Delay.
 * polypaudio dies.
Comment 1 Inge Wallin cendio 2006-08-10 11:25:38 CEST
Need more info here to be able to estimate time.  What is the final objective?
"As fast as possible"? "1 second"?
Comment 2 Pierre Ossman cendio 2006-08-14 10:11:50 CEST
I see no point in artificial delays here, so ASAP.
Comment 3 Pierre Ossman cendio 2008-06-27 11:04:21 CEST
Bug 1561 is affected by this as it takes some time for the dialog to appear.
Comment 4 Pierre Ossman cendio 2013-09-20 12:39:01 CEST
The problem seems to be that we use a bad approach for killing processes. We send a WM_CLOSE to every window of each subprocess, and expect that to end up with the process terminating. Since most of our subprocesses lack windows, this of course fails.

What we should do is post WM_QUIT to the process message queue for each program. But we also need to modify the programs to actually respond to this message.
Comment 5 Pierre Ossman cendio 2013-09-25 14:19:22 CEST
Changed to sending WM_QUIT in r27960.

FLTK (and hence vncviewer) was modified to respect it in r27962.
Comment 6 Pierre Ossman cendio 2013-09-25 14:19:58 CEST
There is also an issue with output being lost whilst we wait for the process to terminate. That probably needs to be handled as part of this work.
Comment 7 Pierre Ossman cendio 2013-11-05 14:06:53 CET
(In reply to comment #6)
> There is also an issue with output being lost whilst we wait for the process to
> terminate. That probably needs to be handled as part of this work.

Will probably be fixed as part of bug 4886.
Comment 8 Pierre Ossman cendio 2013-12-09 13:50:59 CET
Processes that need to be fixed:

 - pcsctun
 - sercd
 - ssh
 - unfsd
Comment 10 Peter Åstrand cendio 2017-11-06 14:13:40 CET
Also note that the problem with ssh.exe adds 2 extra seconds to a login.
Comment 12 Pierre Ossman cendio 2017-11-21 13:56:20 CET
We mustn't forget the fact that because of this we do a hard kill of our processes which means they won't have an opportunity to exit and clean up properly. E.g. unfsd might not be able to finish writing things to disk.
Comment 13 Samuel Mannehed cendio 2017-11-21 14:32:20 CET
(In reply to comment #10)
> Also note that the problem with ssh.exe adds 2 extra seconds to a login.

This was moved to bug 7082.
Comment 14 Pierre Ossman cendio 2022-07-08 09:45:49 CEST
(In reply to Pierre Ossman from comment #3)
> Bug 1561 is affected by this as it takes some time for the dialog to appear.

No longer the case as of r37752 for bug 7479.
Comment 15 Alexander Zeijlon cendio 2024-08-19 14:00:29 CEST
This is what it looks like in tlclient.log on Windows (should make it easier to find this bug when searching):
> WinProcess: Process 284 (ssh.exe) did not exit in a timely manner. Forcing termination...
> WinProcess: Process 10572 (pcsctun.exe) did not exit in a timely manner. Forcing termination...

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