Consider the following scenario:
- You use the System.Diagnostics.Process.EnableRaisingEvents property to monitor Windows processes in a Microsoft .NET Framework 2.0-based application.
- You set the property to True to monitor the exiting of processes. Then, you set the property to False.
- You run the application for a long time.
In this scenario, you encounter the following symptoms:
- Empty process objects appear in the kernel.
Note The term "Empty process objects" refers to objects that have neither memory allocated nor handles to other objects. - If you use a kernel debugger tool, such as the WinDbg debugger tool or the LiveKD debugger tool, you notice many empty processes.
- Windows Task Manager does not show these empty process objects.
Note The problem does not occur when you use the .NET Framework 4.0.
This issue occurs because of a handle leak issue that occurs in this scenario in the .NET Framework 2.0.Â
When the
System.Diagnostics.Process.EnableRaisingEvents property is set to True, a handle is allocated to track the monitored process. However, when the property is set to False, the handle is not freed until the .NET Framework 2.0-based application stops running.
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.
To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Prerequisites
You must have .NET Framework 2.0 Service Pack 2 (SP2) installed to apply this hotfix.
Restart information
You do not have to restart the computer after you apply this hotfix.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the
Time Zone tab in the
Date and Time item in Control Panel.
x86 version for Windows Server 2003 and Windows XP
Collapse this tableExpand this table
| File name | File version | File size | Date | Time | Platform |
|---|
| System.dll | 2.0.50727.4459 | 3,186,688 | 16-Jun-2010 | 06:20 | x86 |
x64 version for Windows Server 2003 and Windows XP
Collapse this tableExpand this table
| File name | File version | File size | Date | Time | Platform |
|---|
| System.dll | 2.0.50727.4459 | 3,186,688 | 16-Jun-2010 | 05:51 | x64 |
IA-64-based version for Windows Server 2003 and Windows XP
Collapse this tableExpand this table
| File name | File version | File size | Date | Time | Platform |
|---|
| System.dll | 2.0.50727.4459 | 3,186,688 | 16-Jun-2010 | 05:51 | IA-64 |
To work around this issue, restart the .NET Framework 2.0-based application periodically.Â
A common scenario for this problem occurs when you run a SQL Server Integration Services (SSIS) service, also known as
Msdtssrvr.exe. The service monitors SSIS runtime processes such as the
Dtexec.exeprocess and the
DTSHost.exe process to keep active statistics for the running packages. These processes may linger on the operating system until the service is cycled.
To work around this issue, restart the SSIS service periodically. For example, restart the SSIS service weekly or bi-weekly.
Notes- The leak frequency of a kernel process object depends on how many SSIS packages are started in the timeframe since the service was restarted.
- In SQL Server 2008, the SSIS service name is MsDtsServer100, and the SSIS display name is SQL Server Integration Services 10.0. In SQL Server 2005, the SSIS service name is MsDtsServer, and the SSIS display name is SQL Server Integration Services.
- Stopping and restarting the SSIS service temporarily should not have any adverse effects.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the
Process.EnableRaisingEvents property, visit the following Microsoft website: