Incorrect Session Count Is Reported Under Machine Details in Citrix Studio

Incorrect Session Count Is Reported Under Machine Details in Citrix Studio

book

Article ID: CTX399384

calendar_today

Updated On:

Description

  • Incorrect session count is reported under machine details in Citrix Studio. More sessions are reported by task manager on the VDA but lesser value is reported in both Studio and Director.
  • User name shows blank in studio for some session though session status shows as active in Studio
  • Restarting the BrokerAgent Service shows the correct session count in Studio and user names also starts reflecting for all sessions in Studio.
  • There is no issue seen with launching ICA sessions on the VDA.
  • Issue was specific to VDA's created from a specific image.

image.png

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Resolution

Pushing a revised registry change to include Usrlogon.cmd and cmstart.exe   in registryHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AppSetup and that fixed the issue.

Problem Cause

Gathered Get-BrokerSession powershell cmdlet  from DDC for the effected VDA and found that sessions with blank user name showed  LogonInProgress as True,.

From the CDF Traces, it was found that Logon was not marked as complete by the BrokerAgent on the VDA. This was because cmstart.exe which calls wfshell.exe that sends logoncomplete notification was not getting launched.

5639341,3,2022/02/21 12:00:15:27373,8572,12120,Unknown,-1,BrokerAgent,,0,,5,EntryExit,"=========>>>>> NotificationServiceClassCBPV1_5.NotifyUserToken - (Success:True, Notified:True, ReplyProcessed:True, SinkInit:True, SessionKey:cd5d52ff-20a0-4edb-aef3-f174d808ec3b, UserToken:4388, SequenceNumber:2, Logon Complete False)",""

From CDF Traces it was also seen that wfshell.exe was not being launched for the effected sessionn. Cmstart.exe is responsible for calling wfshell.exe and wfshell.exethat sends logoncomplete notification for a session. In this case cmstart.exe was not executing in the session either as seen from CDF Traces.

We did not see any reference to cmstart.exe and wfshell.exe in the trace. Winlogon.exe reads “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\” and uses userinit.exe to launch cmstart.exe and wfshell.exe. The reason why the user name shows up in Studio when Broker Agent is re-started is because BrokerAgent has to register with DDC’s and in the process it queries RPM for all sessions to send over the details to Broker so it updated the user name fetched by RPM module.

It was identified that the new platform layer of the effected image was missing the cmstart.exe from the reg key:  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AppSetup


 

Additional Information

https://support.citrix.com/article/CTX983798