Jump to content
Welcome to our new Citrix community!
  • 14

LogonUI.exe - Sessions Disconnected


Question

  • Answers 141
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 2

Just going to put this out here: https://support.microsoft.com/en-gb/topic/january-25-2022-kb5009608-os-build-20348-502-preview-54285445-4a79-4bc1-9c9c-fbe7299e1c29

 

  • Addresses an issue that causes the Remote Desktop Services (RDS) server to become unstable when the number of connected users exceeds 100. As a result, users cannot access published applications using RDS on Windows Server 2019
  • Addresses issue that occurs in remote desktop or remote applications integrated locally (RAIL) scenarios. A window might not appear because an application has used WM_SETREDRAW to temporarily stop the window from being redrawn.

I was running into a scenario where these ghost sessions were driving up my user density.  I may or may not have been running into this, but it appears there is a patch out there for what I'd consider a pretty nasty bug.  This doesn't come down with Windows update, so even if you're checking for oob fixes, you won't see it unless you're looking directly for it.

 

I'm waiting on the fix from Citrix.  Apparnetly they have identified 3 scenarios that cause this problem, and can't give me the fix until they've confirmed (via CDF Traces) that this is the issue in question.  It will most likely be another day or two before I get an actual fix, which leaves me with a rather unstable environment.  I've taken the advise of others here and implemented a scheduled task that runs every 5 minutes and it purges any logonui process thats older than 5 minutes.  That alone has given me quite a bit of relief, and I would recommend that to anyone having problems, at least until you can get something (ANYTHING!) from Citrix directly.

 

This is the script I used -- might be a little bloated but I wanted some feedback so I could run it in a remote powershell session and see whats going on.

$processName = "logonui"
$threshold   = 1
$processes = get-process $processName -ErrorAction SilentlyContinue    

Write-Host "Found $($processes.count) Processes that match $($processName)"
ForEach ($process in $processes) {    
    $age = $(get-date) - $process.StartTime
    write-host "Found Process ($($process.id)) with age of $($age) Minutes"

    If ($age.TotalMinutes -gt $threshold) { 
        Write-Host "  Process $($ProcessName) ($($process.ID)) with Age of $($age.TotalMinutes) will be terminated"
        $process | stop-process -Force 
    } Else {
        Write-Host "  Process $($ProcessName) ($($process.ID)) with Age of $($age.TotalMinutes) will be ignored"
    }
}

I saved this to a file where users couldn't write, then ran the following script to register the task:

$taskName  = "Clean Ghost Users"
# Hack to get a repetitive schedule
    $t1 = New-ScheduledTaskTrigger -Daily -At 01:00
    $t2 = New-ScheduledTaskTrigger -Once  -At 01:00 -RepetitionInterval (New-TimeSpan -Minutes 5) -RepetitionDuration (New-TimeSpan -Hours 23 -Minutes 55)
    $t1.Repetition = $t2.Repetition
    
# Create the new Task
    $action   = New-ScheduledTaskAction -Execute "Powershell" -Argument "-executionpolicy bypass -file ""<full path to script file>"""          
    $settings = New-ScheduledTaskSettingsSet -Hidden -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -RunOnlyIfNetworkAvailable
    $ST       = New-ScheduledTask -Action $action -Trigger $t1 -Settings $settings
    Register-ScheduledTask $taskName -InputObject $ST -User "System"

This was all taken from this post, but I just wanted to share what I found to work as a full solution in hopes it might save some time for someone.  These scripts are designed to be able to execute from a remote powershell session, so you MIGHT be able to enter-pssession to a machine with the problem and install the bandaid without rebooting.

 

Please test before you implement!

  • Like 2
Link to comment
  • 1
On 3/2/2020 at 9:09 AM, Tim Scott1709157919 said:

 

We were not able to consistently reproduce the issue in our environment at the time and other things took priority over this, it fell flat and we never moved forward on it. We are currently rolling out 1912 LTSR which will hopefully negate the issue though Citrix doesn't seem to have done anything to update the article referenced above. It mentions that Microsoft will path the problem but no specifics around that leaving us to assume it is fixed.

 

I have bad news for you. Its isn't fixed.

 

We just rolled out 1912 LTSR VDA in our Server 2019 environment (after 1909 was exuding these same symptoms) and it continues. We are on the phone with Citrix. We can reproduce the problem if we:

  • Log in
  • Disconnect
  • Wait longer than 25 minutes in a disconnected state (users say it is shorter, but we could consistently hit it beyond 25 minutes; Our disconnected sessions are set to logoff automatically after 60 minutes of inactivity, so, at worst, the end user just sits there and twiddles there frick'n thumbs while we look like idiots).
  • Attempt to reconnect (on the same machine, or different machine, doesn't matter)
  • Fail.
    • Killing logonui.exe is a must at this point, and event viewer has logonui.exe errors on the servers we reproduce the issue on.

 

Their answers haven't been great so far. I will update once we get an actual fix in place. Ridiculous.

  • Like 1
Link to comment
  • 1
19 hours ago, Massimo Berloffa said:

Hi, we also upgraded from 1912 cu3 to cu4 and after that we found the same error; When user signout the session keep stuck and if you kill the Windows Logon User Interface Host process the session close correctly. Please put a fix for this, thanks.

 

What version FSLogix, and Windows are you running, we run CVAD 2112, FsLogix (Latest 2.9.7979.62170). Fully updated Windows Server 2019.

Mostly having issues when users logon to their full desktop.

 

I set the recommended (by forum posts) regkeys LogoffCheckSysModules: wfcrun32.exe,Concentr.exe,SelfServicePlugin.exe,redirector.exe,LogonUI.exe,csrss.exe,winlogon.exe,cmd.exe

 

No luck yet

  • Like 1
Link to comment
  • 1
On 12/28/2021 at 2:42 AM, Ken Bjelka said:

Same here, upgraded to 1912.0.4000.4227 (CU4) and we have seen the same issue; Users are reporting being stuck at preparing windows on login. Turns out they are trying to reconnect to a stuck disconnected session. When you kill the Windows Logon User Interface Host process on the disconnected session the user can login to the farm. This was not seen prior to introducing 1912.0.4000.4227 (CU4). Escalating to Citrix tomorrow.

Have you heard from Citrix? Known issue?

  • Like 1
Link to comment
  • 1

 We are also having this issue since upgrade to 21.12 . As a temporary solution we created a script the kills the Logonui.exe process for all our servers/users as soon as its started and it does not affect users that are logged on or normally disconnected . But in the case where the sessions are stuck it immediate logs of that sessions so users are not getting stuck anymore 

  • Like 1
Link to comment
  • 1
15 hours ago, Matthew Nation said:

I've received the hotfix which includes two versions of a DLL. The first one they asked us to try did not resolve our issue. We are running the latest CVAD on Win10 multi-session. Is anyone else on Win10? 

Hi Matthew, on Windows 10 I can't find the StatUI.dll. The fixes we've got from Citrix are only for Server 2016/2019/2022. With Windows 10 we haven't seen any disconnections and logonui.exe issues. Which two DLLs did you received ?

  • Like 1
Link to comment
  • 1
4 hours ago, Jens Strohschnitter1709152492 said:

Hi Matthew, on Windows 10 I can't find the StatUI.dll. The fixes we've got from Citrix are only for Server 2016/2019/2022. With Windows 10 we haven't seen any disconnections and logonui.exe issues. Which two DLLs did you received ?

in the support process from Citrix i received 3 Statui.dll files where the first one did not work (Version 7.24.4000.1) and after that we got the 2 version to test. The version that is working for us is the 7.32.0.3 version

statui.PNG

  • Like 1
Link to comment
  • 1

we have exact the same issue vda 2016 - 1912.5.

happend after installed the wu kb5015808 

 

Found today the problematic process. In our case, when you kill wsearch.exe (windows search service) all sessions are logged off. you can also start the service after and the server is again working well.... 

 

also opened a citrix case.

Edited by lagermax
found the problematic process.
  • Like 1
Link to comment
  • 1

i'm testing this:

 

As we're only experiencing problems after installing the July or later patch from Windows Server 2016.

 

Install below in the master image:

https://download.microsoft.com/download/d/3/6/d368cfea-a8b8-4efe-8093-ad9fd65bd747/Windows 10 1607 and Windows Server 2016 KB5015808 220809_20051 Known Issue Rollback.msi

 

start gpedit.msc  (computer settings -> administrative -> KB * -> disable) see image.

 

2123260340_2022-09-2216_45_01-.thumb.png.745ca21b364636659e1e08cc5769bbd1.png

 

*Edit 22-9 seems to have positive effect

if it works for you, please upvote the fix for other people to find this solution faster.

 

 

Not tried the below regfix, but from Reddit:

 

regfix:  in the Master-Image 

HKLM\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides

DWORD value 254221451 and set it to 0

This would disable the "fix" published in KB5015808

 

 

 

  • Like 1
Link to comment
  • 0

I can confirm the behavior on Server 2016 in a new 7.15 LTSR environment.  Terminating the 'Windows Logon User Interface Host’ process (LogonUI.exe in %SystemRoot%\System32) for the session in question will properly kill that 'orphaned'/'broken disconnected' session.

What's really interesting is that we haven't seen this across all servers, only some;  And it's not yet clear why some servers are more prone to it than others.

CitrixOrphanedSession-TaskManager.png

Link to comment
  • 0
On 7/23/2018 at 9:56 AM, Tim Scott1709157919 said:

I can confirm I've seen the same behavior on 7.15 LTSR CU1 on Server 2016 with the exact same behavior once ending that same process. I currently have a SR open with Citrix on this and we are gathering data. I'll let this post know if anything comes of it.

@Tim Scott1709157919 did you get any feedback from Citrix on this?  I have the same issue with Server 2016 and 7.15 LTSR CU2 right now.  If I end the logonui.exe they will log off.  I already have a policy to log off disconnected sessions after 1 minute but even that isn't working.  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...