Bug 7664 - Client hangs if agent can't find a free display number
Summary: Client hangs if agent can't find a free display number
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.13.0
Assignee: Frida Flodin
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks:
 
Reported: 2021-03-18 13:59 CET by Frida Flodin
Modified: 2023-01-16 09:43 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Frida Flodin cendio 2021-03-18 13:59:50 CET
When trying to create a new session and the agent hits the max display number allowed ('/vsmagent/display_max'), nothing is reported to the server and the client hangs while waiting. The server waits the entire timeout before trying another agent (usually 40 seconds).

To reproduce:
- Configure '/vsmagent/display_max' to be 1 more than '/vsmagent/display_min'
- Try to start two sessions on that agent
Comment 2 Frida Flodin cendio 2021-03-19 08:30:07 CET
Fixed now. Tested on RHEL8:
- First session on an agent gets 'display_min' as display number.
- Creating a new session -> the lowest free display is used.
- With many sessions the last session on an agent gets 'display_max'.
- Trying to create a session on a full agent -> server tries 
  another agent or reports no available agents to client directly.
  No need to wait for timeout.
Comment 3 Pierre Ossman cendio 2021-03-19 13:57:08 CET
Tested on RHEL 8 by configuring display_min=10 and display_max=14 and logging in 6 users.

On 4.12.1 the first _FOUR_ work fine, but the fifth hangs for a while and then reports "No agent server was available".

Nothing was logged in vsmagent.log, and this was in vsmserver.log:

> 2021-03-19 13:40:32 INFO vsmserver.session: User with uid 1005 (user5) requested a new session
> 2021-03-19 13:41:12 WARNING vsmserver: Timeout trying to start new session for user5 on VSM Agent 127.0.0.1:904

With a current build the first _FIVE_ work fine and the fifth is instantly rejected. I now get this in vsmagent.log:

> 2021-03-19 13:52:58 WARNING vsmagent.session: Unable to find free display number when starting session for user6. Reporting to VSM Server

And this in vsmserver.log:

> 2021-03-19 13:52:58 INFO vsmserver.session: User with uid 1006 (user6) requested a new session
> 2021-03-19 13:52:58 WARNING vsmserver: VSM Agent 127.0.0.1 reported failure creating session for user6


Looks good. :)

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