FsLogix - Unclean logoff causing locked files until server reboot

Much R 71 Reputation points

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


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


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,283 questions
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.
464 questions
{count} votes

106 answers

Sort by: Most helpful
  1. Much R 71 Reputation points


    Permissions are OK.

    In the screenshot you can see that the folders are blocked by lsass.exe.

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

    The problem is also described here:

    1 person 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)

    1 person found this answer helpful.

  3. Dlo 91 Reputation points

    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.

    1 person found this answer helpful.

  4. Deepak Kumar 6 Reputation points

    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.


    1 person found this answer helpful.
    0 comments No comments

  5. Андрей Михалевский 2,641 Reputation points

    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 :-(

    1 person found this answer helpful.
    0 comments No comments