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

107 answers

Sort by: Oldest
  1. 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.

    Was this answer helpful?


  2. 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!

    Was this answer helpful?


  3. 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.

    Was this answer helpful?


  4. Dlo 96 Reputation points
    2021-04-19T11:43:23.967+00:00

    So the test package they gave me was for windows 10 1809 not 1909 so it wouldn't install.
    I am waiting for them to update it for 1909 which they did but they said they got some errors they need to fix now.
    Once they get it I will let you guys know what happens.

    I also tried enabling CleanupInvalidSessions and DeleteLocalProfileWhenVHDShouldApply to see if maybe that helps with the folders not being deleted off the server for the time being.

    the VHD's aren't getting stuck as much as they use to but not sure why but still have all the folders not being deleted and I believe its related to search.

    I will update you once I get a working package and test.

    Was this answer helpful?

    2 people found this answer helpful.

  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?

    Was this answer helpful?

    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.