ProcExp: The .NET Performance counters are corrupt

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.

procexp-counters-corrupt

—————————
Process Explorer
—————————
The .NET performance counters on this system are corrupt.
Run Exctrlst from the Microsoft Windows Resource Kit to repair them.
—————————
OK  
—————————

Huh?

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:

  1. Locate the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NETFramework\Performan
  2. 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.

dumppop-perf

Advertisement

5 Responses to ProcExp: The .NET Performance counters are corrupt

  1. TonyP says:

    EXCELLENT WORK, DUDE!!!!!!!!!!!!!!!! I had been using ProcExpl on a handful of computers with ver 11.x and just started getting this error on only one computer. Hmmm. Went to sysinternals, and found ver 12.04 ran it, and still get the same error message. Earlier today and also late yesterday, I search Google and found some shaky-sounding suggestions. I downloaded the full Resource Kit, installed Extrist.exe and also could not figure out what it was supposed to do. I did see a few unchecked counters, turned them on, and nothing changed. Other suggestions involved registry hacks but NONE OF THEM were as specific as your suggestion, none of them mentioned this registry key.

    I am back to not getting ProcExplorer errors. THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!

  2. M says:

    I had to change in the same Key

    “Disable Perfomance Counters” from 4hex to 0hex to make it work. Thanks for pointing in the right direction.

    -M.

  3. red says:

    Thank You!!!!!!!!!!!

  4. JC says:

    Thanks for the fix. I’ve been using 12.xx for a while on two systems. One recently started giving this error. I checked the registry on both systems and the one getting the error was set to donotload_mscoree.dll while the other one was correctly set to mscoree.dll. What is strange is the one getting the error was my media center PC (Win7 Pro) which doesn’t have anything but device drivers installed. It couldn’t have been something I installed, since I haven’t installed anything recently, so I wonder if it was something done by Windows Update.

  5. FYI, you can use this PS command to quickly fix this issue:
    set-itemproperty HKLM:\System\CurrentControlSet\Services\.NETFramework\Performance -Name library -Value mscoree.dll

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: