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?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,612 questions
FSLogix
FSLogix
A set of solutions that enhance, enable, and simplify non-persistent Windows computing environments and may also be used to create more portable computing sessions when using physical devices.
497 questions
{count} votes

106 answers

Sort by: Most helpful
  1. Much R 101 Reputation points
    2021-01-14T10:59:23.6+00:00

    Hi,

    Permissions are OK.

    In the screenshot you can see that the folders are blocked by lsass.exe.
    56562-openfiles.png

    I also noticed when the problem occurs I get the message:
    The Group Policy Client service failed the sign in. Access is denied
    56549-message.png

    The problem is also described here:
    fslogix-error-34group-policy-client-service-failed.html

    2 people found this answer helpful.
    0 comments No comments

  2. 2021-02-18T23:24:22.323+00:00

    We are also now experiencing the same issue across multiple RD Servers and the only workaround we seem to have is to reboot the affected server which is problematic as we can have 30 users on the server and only 1 is impacted by the issue.

    We need some kind of fix urgently (statement of the bleeding obvious)

    2 people found this answer helpful.

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

    2 people found this answer helpful.

  4. Deepak Kumar 11 Reputation points
    2021-05-08T11:53:09.45+00:00

    Hello, I am very new to fslogix, and just finished setting up for a customer.

    Windows Server 2019
    Citrix Apps & Desktop : 1912 LTSR CU2
    FsLogix Apps : 2.9.7654.46150 (No cloudcache)
    All MacAfee AV exclusions recommended by Citrix & Microsoft

    As of now I am not getting any issue while deleting the profiles after user log off, But if i get i would take below steps to go more in detail . I understood most of you already did these troubleshooting but hope to add new things . Please do this on your test server first.

    1. Download sysinternals tools from Microsoft & run procmon tool (Logs can be very big so apply filters accordingly)
    2. Search the logs with local_username & find the details after user log off
    3. Assuming credential folder is not being deleted ( Try to add NT Authority/System and give rights to delete)..In my case I'm using centralized template profile so its easy to do from single place. If not use group policy to add security on folder or registry or use default profile folders.
    4. Delete existing vhdx and check

    I hope this will help or give new insights if not.

    Happy debugging.

    Thanks

    2 people found this answer helpful.
    0 comments No comments

  5. Андрей Михалевский 3,331 Reputation points
    2021-07-27T14:20:53.827+00:00

    A week later, the problem was back again. Apparently it is not possible to fix it by ourselves and we will have to wait a couple of years for microsoft to fix it :-(

    2 people found this answer helpful.
    0 comments No comments

Your answer

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