Bug 7686 - Abandoned sessions can leave stray and unreachable processes
Summary: Abandoned sessions can leave stray and unreachable processes
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on: 5476
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-16 09:01 CEST by Pierre Ossman
Modified: 2021-06-08 13:30 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2021-04-16 09:01:46 CEST
Since bug 5476 users now have the option of abandoning a session that it is no longer possible to reconnect to. This allows the users to create new sessions and continue their work.

This situation generally occurs in two scenarios:

 * The agent machine has gone offline (planned or otherwise)

 * The agent is temporarily unreachable, e.g. because of network issues or being overloaded

In the first scenario abandoning the session is the correct decision as the session is indeed gone.

However in the second scenario the session is still alive, with all the processes that entails. Those will continue to consume resources, and could interfere with new sessions created as well.

Once the session is abandoned the user has no way of reaching that session again. The user (or admin) will have to log in some other way on the agent and kill that session manually.
Comment 1 Pierre Ossman cendio 2021-04-16 09:07:10 CEST
There is no obvious fix here. A session is marked unreachable since we cannot contact vsmagent. That also means we cannot kill the session as we need vsmagent for that.


One idea is to hope the agent comes back eventually and kill the session then. That would mean keeping track of all abandoned sessions and periodically check if they are reachable again.

The major problem with that is if the agent never comes back. We don't want to keep track of things forever. A timeout would solve that but the question is how long it should be.


We could also give admins the option of not ending up in this situation by not allowing sessions to be abandoned. Users would then have to wait until the issue with the agent is resolved. However that won't work if the agent never comes back.
Comment 2 Pierre Ossman cendio 2021-04-16 09:09:06 CEST
Admins can mitigate the issue by using "-MaxDisconnectionTime" to clear out sessions that haven't been connected for some time.
Comment 5 Martin Östlund cendio 2021-04-19 10:59:07 CEST
One way to improve the life for the admins is to let them have some way of knowing which sessions has been left abandoned and is cluttering their systems. 

Either perhaps have this information logged: 
"UserA abandoned session <PID> on agentB"

Or some other way that let the admin programmatically get/parse this information for housekeeping their systems.

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