You are currently offline, waiting for your internet to reconnect

A handle leak occurs in Windows Server 2008 R2 and Windows 7 when you try to delete a folder containing an executable file

SYMPTOMS
Consider the following scenario:
  • You have a computer that is running Windows Server 2008 R2 or Windows 7.
  • You have an executable (.EXE) file in a given folder and you launch that application (.EXE) and close it.
  • You attempt to perform a delete operation on the folder containing an executable (.EXE) file, the operation may fail with following error message:


After pressing Yes button on above warning, it would still fail to delete the folder and see following:
CAUSE
  • This problem occurs because AeLookupSvc (Application Experience) service running in svchost.exe tries to check the compatibility of the given executable (.EXE) file did not close the handle.
  • Because of the leaked handle, the folder can't be deleted unless the system is rebooted.


WORKAROUND
To workaround this issue, reboot the system and post reboot the folder can be deleted without any errors or warnings.
MORE INFORMATION
If procmon log is captured for the delete operation, following entries will be observed in the log:

3:14:38.2896465 AM explorer.exe 460 SetDispositionInformationFile D:\<FolderToDelete> NOT EMPTY Delete: True
3:14:38.2927823 AM explorer.exe 460 SetDispositionInformationFile D:\<FolderToDelete>\<application>.exe SUCCESS Delete: True
3:14:38.2946548 AM explorer.exe 460 SetDispositionInformationFile D:\<FolderToDelete> SUCCESS Delete: True
3:14:40.8315654 AM explorer.exe 460 CreateFile D:\<FolderToDelete> DELETE PENDING Desired Access: Read Attributes, Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
3:14:40.8317324 AM explorer.exe 460 CreateFile D:\<FolderToDelete> DELETE PENDING Desired Access: Read Control, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 2686260 - Last Review: 03/08/2012 01:03:00 - Revision: 4.0

Windows 7 Home Basic, Windows 7 Home Premium, Windows 7 Enterprise, Windows 7 Professional, Windows 7 Ultimate, Windows 7 Service Pack 1, Windows Server 2008 R2 Foundation, Windows Server 2008 R2 Standard, Windows Server 2008 R2 Standard without Hyper-V, Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 Enterprise without Hyper-V, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Datacenter without Hyper-V, Windows Server 2008 R2 for Itanium-Based Systems, Windows Server 2008 R2 Service Pack 1

  • kbprowindows7 kbappcompatibility KB2686260
Feedback