FsLogix - Unclean logoff causing locked files until server reboot

Much R 101 Reputation points
2021-01-13T16:29:50.18+00:00

Problem is described by M4deman under unclean-logoff-causing-locked-files-until-server-reboot

It seems to have something to do with the 2009 version.
The latest version of FSLogix is installed whats-new

Description

After a user logoff, the "System" Process (PID 4) locks the following folders:

C:\Users\local_username\AppData\Local\Microsoft\Credentials
C:\Users\local_username\AppData\Roaming\Microsoft\Credentials

The user is completely logged of, according to Task Manager.

In the FSLogix Profile Log file I can see the following:

[07:53:55.601][tid:00000c90.0000ce44][ERROR:00000020] Delete profile failed for sid S-1-5-21-3364776539-3721753400-1968955100-1179, Cleaning up manually. (Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.)
The last sentence means that the process cannot access the file, because another process already uses it.

Also the whole "local_username" folder cannot be deleted:

[08:23:15.479][tid:00000c90.0000bcc4][WARN: 00000005] Failed to delete C:\Users\local_usename (Access is denied)
Access Denied

Does someone have any info on this behaviour?

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
Windows for business | Windows Client for IT Pros | User experience | FSLogix
{count} votes

107 answers

Sort by: Most helpful
  1. Dlo 96 Reputation points
    2021-03-26T10:49:21.237+00:00

    Its not a Citrix issue per say or a 2019 issue though this is happening on a ton of different OS's as we use windows 10 multisession in azure and we are in citrix cloud.

    Here is my latest response from Microsoft

    Hello,
    Hope you are doing good!
    I discussed this case with my TA and the Search package could help us on this.
    I am waiting for the Package from him.
    I will let you know as soon as I have the Search package for deployment.
    Appreciate your patience and understanding.


  2. Chris Pickens 1 Reputation point
    2021-03-26T19:19:53.663+00:00

    Hi All, I figured I'd share my (potential) resolution in our case to this issue:

    • We have a Windows 10 Multi-Session VM (WVD) deployment.
    • Microsoft engineering examined our environment and could not see any issue with FSLogix.
    • GP client service error - Access Denied, rebooting server daily would be only temp fix. Our root cause appears (at this time) to be related to one or both of the following:
    • AV - I excluded the local directory on our server that stored user profile disks from real-time scan only, in this case, it was E:\Profiles. (Yes, I had already implemented all FSLogix recommended AV exclusions) We use Sophos EndPoint.
    • Moved our backup window outside of business hours for both the server hosting the profiles volume and our WVD servers. ( We use SolarWinds Backup)

    After making these changes, I have not had an incident since 3/18/2021. Fingers crossed.

    I'll report back if the problem returns.

    Not sure, but I hope this helps someone.


  3. CitrixMember 6 Reputation points
    2021-04-07T16:15:53.663+00:00

    For those of you experiencing this problem, do you have one environment working and one not working?
    In non working environment, do you have this in profile logs in Fslogix?

    Configuration setting not found: SOFTWARE\FSLogix\Profiles\GroupPolicyState. Using default: 0

    In working environment, do you have this in profile logs in Fslogix?

    Configuration setting not found: SOFTWARE\FSLogix\Profiles\GroupPolicyState. Using default: 1

    Thats what I have, GroupPolicyState dword registry is not much described or mentioned in the registry keys list of fslogix.
    I am testing this out now in non working environment: SOFTWARE\FSLogix\Profiles GroupPolicyState Dword:0001

    Further in the same log
    [07:09:48.134][tid:000014ac.00000958][ERROR:0000139f] Handle could not be recovered. DetachVirtualDisk will fail (The group or resource is not in the correct state to perform the requested operation.)
    [07:09:48.134][tid:000014ac.00000958][ERROR:0000139f] DetachVirtualDisk failure (The group or resource is not in the correct state to perform the requested operation.)
    [07:09:48.134][tid:000014ac.00000958][INFO] ErrorCode set to 5023 - Message: The group or resource is not in the correct state to perform the requested operation.

    I assuming this "bug" or error has something to do related to same problem where the "include group" entries in policy had to changed from replace to update. No clue, but think it worth a try. When this grouppolicystate registry is used with default values "0" then it sometime could have problems locate user in the same group or something, and then not able to release the locks of file...... not sure.

    Any explanation according to this registry setting or feedback on testing, is highly appreciated!


  4. Lee Hendrix 1 Reputation point
    2021-04-12T17:58:49.413+00:00

    So, I think I have found somewhat of a workaround for this, ([WARN: 00000005] Failed to delete C:\Users\local_usename (Access is denied)). Feel free to try and see if you have any luck.

    My Redirections.xml file was fairly robust to try and keep our profile disks as small as possible. It carried over partially from our UPM exclusions. I rebuilt it again based off of : https://stealthpuppy.com/fslogix-profile-containers-redirections/, and then put in an AV exclusion for every path listed in the Redirections file for "userprofile\path listed in exclusion file". We were getting 30 to 40 locked profiles from hung sessions a day, and now we have been 48 hours without 1. I will update if the beast returns, but would be curious if this helps anyone else out.


  5. CitrixMember 6 Reputation points
    2021-05-03T11:15:13.297+00:00

    Anyone here who has found out more regarding the Fslogix locks problem?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.