ProcExp: The .NET Performance counters are corrupt
July 7, 2010 5 Comments
Imagine my surprise when Process Explorer v12.04 giving me a big nasty bonk when trying to examine a .NET process that I’m working on.
The .NET performance counters on this system are corrupt.
Run Exctrlst from the Microsoft Windows Resource Kit to repair them.
I downloaded and installed exctrst from Microsoft. It didn’t do anything useful to solve the problem. After thrashing around for a while, I came across this KB article: BUG: PDH-Based Applications Stop Responding for 60 Seconds Before Exiting on Windows XP.
In the resolution it talks about disabling .NET core performance counters in the registry
To prevent the delay, you can turn off the .NET Framework performance counters:
- Locate the following key in the registry:
- Change the Library value from mscoree.dll to donotload_mscoree.dll.
If you later decide to turn on the .NET Framework counters, change the Library value back tomscoree.dll.
Out of desperation, I took a look at my registry.
PS> get-itemproperty HKLM:\System\CurrentControlSet\Services\.NETFramework\Performance | select library Library ------- donotload_mscoree.dll
Doh! Something, disabled my .NET Performance Counters in the registry just as described in that KB Article. I run daily as a non-admin so it can only have been an installer. I’m not sure which one is the culprit, unfortunately. I recently upgraded to ProcExp 12.x from 11.x. It may be that my counters have been disabled forever and 12.x is the first version to complain or it could be something I installed recently. I don’t know.
Restoring the Library key to the value “mscoree.dll” sovled the problem.