Handle Leak on Windows 2003 Server x64
- From: ksggroups@xxxxxxxxx
- Date: Thu, 28 Aug 2008 13:51:35 -0700 (PDT)
I have a C++ WMI application that seems to be causing a handle leak on
Windows 2003 Server x64. The same application running on Windows XP
and Windows 2003 Server 32-bit doesn't exhibit any handle leaks (I
have the application running 24x7 on four XP SP2 machines and two 2003
32-bit machines without leaks). Are there any known issues specific to
Windows 2003 x64 that would cause a handle leak?
I've verified the handle leak by looking at the handle count steadily
increasing with time. It goes from ~200 to ~10,1000 over the span of
two days or so. The data is being pulled from:
Win32_PerfFormattedData_PerfOS_Processor
Win32_PerfFormattedData_PerfProc_Process
Win32_PerfFormattedData_PerfDisk_PhysicalDisk
Win32_PerfFormattedData_Tcpip_NetworkInterface
Couple of things I've found while trying to figure out this problem:
- If I stop collection from Win32_PerfFormattedData_PerfOS_Processor
(while letting the collection go on from the other classes), the
handle leak seems to be drastically reduced or pretty much stop.
There's no specific logic in the application to handle
Win32_PerfFormattedData_PerfOS_Processor. The code is pretty generic.
The system on which the leak occurs is an AMD x64 system with a single
physical CPU / dual cores.
- The reason I disabled Win32_PerfFormattedData_PerfOS_Processor was
because using Process Explorer, I found tens of registry keys open to
HKLM\SYSTEM\ControlSet001\SERVICES\PerfOS\Performance. I assume this
to be the source of leak. The program doesn't have any interactions
with the registry directly.
The main loop of the program is basically:
while(1)
{
IWbemRefresher::Refresh()
IWbemHiPerfEnum::GetObjects()
if(firstTime)
getPropertyHandles()
Read Values for each property
Sleep for a bit
}
Any ideas?
Thanks,
KS
.
- Prev by Date: RE: How can I read the Registry with WMI.NET?
- Next by Date: Is it possible to capture plugging/unplugging events of Devices in WMI while the computer is ON
- Previous by thread: RE: How can I read the Registry with WMI.NET?
- Next by thread: Is it possible to capture plugging/unplugging events of Devices in WMI while the computer is ON
- Index(es):
Relevant Pages
|