473,289 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

handle leak in netfxperf.dll (?)

Hello,

I've encounter a leak of 50 handles, when trying to query performance
counters through the registry using HKEY_PERFORMANCE_DATA registry
key.

I've found out that when netfxperf.dll is enabled (.NET dll that used
for .NET performance counters) the leak occurs.
When I disable that performance counters (through exctrlst in the
resrouce kit, uncheck the .NET CLR data, .NET CLR networking
counters), the leak stops.

Here is a small code fragment that demonstrate the problem:

void test(void)
{
long return_value = 0;
DWORD buffersize = (sizeof(PERF_DATA_BLOCK)+
sizeof(PERF_OBJECT_TYPE)),
type = REG_EXPAND_SZ;
PPERF_DATA_BLOCK perfdata = NULL;

perfdata = (PPERF_DATA_BLOCK) malloc(buffersize);
memset(perfdata,0,buffersize);

RegQueryValueEx( HKEY_PERFORMANCE_DATA,
"Global",
NULL,
&type,
(LPBYTE) perfdata,
&buffersize );

RegCloseKey(HKEY_PERFORMANCE_DATA);
free(perfdata);

}

Does anyone have an idea if I'm doing something wrong?
It seems to me like a bug in .NET netfxperf.dll but I did nto find
any documentation for such bug.

Thanks,
Yair
Jul 21 '05 #1
0 1499

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Craig Ringer | last post by:
Hi folks I'm a bit of a newbie here, though I've tried to appropriately research this issue before posting. I've found a lot of questions, a few answers that don't really answer quite what I'm...
0
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
0
by: Ashok Subramanian | last post by:
Hello I have .NET framework 1.0 SP2 on a windows 2000 server box. All of a sudden this box gives me an error in the performance counter with the following error message "The timeout waiting...
12
by: Ken Brubaker | last post by:
I am using DB2 8.5 FP5 on Windows 2000 Server and have noticed what appears to be a handle leak. When I execute a DB2 connect statement in a command window, followed by a DB2 connect reset...
0
by: Yair | last post by:
Hello, I've encounter a leak of 50 handles, when trying to query performance counters through the registry using HKEY_PERFORMANCE_DATA registry key. I've found out that when netfxperf.dll is...
39
by: tydbowl | last post by:
I have a problem where the below code chunk causes handle leaks on some machines. The leak APPEARS to be handles to the registry key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet...
3
by: Jayme Pechan | last post by:
I was wondering if someone could help me understand why it seems that creating threads using the code below causes handles to seemingly leak. System.Threading.Thread threadRunAsync = new...
0
by: PlayQ | last post by:
Hello, I am using the C# example code in the WMEncoder Series 9 SDK to encode a series of audio files but after a while I notice a handle leak in the system. The handle count keeps going up until...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
I have a vb.net program that leaks handles as reported by task manager. After running for a couple of hours, task manager reports over 1000 handles, and it continues to grow. I think I am failing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.