Reputation: 5123
It's a week that I have any Visual Studio (2010 professional, 2012 professional and 2015 community edition) that, after few minutes I started a project even empty, without touching anything, start a thread that consumes entirely one core, 100% usage. From task manager I've seen that devenv.exe is consuming 25% of CPU, I have 4 cores so 100/4=25.
By using Process Explorer I've seen that is clr.dll (clr.dll!GetCLRFunction+10793) that is running continuosly.
here is the stack trace of the thread:
ntoskrnl.exe!KeWaitForMultipleObjects+0xc0a
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x712
ntoskrnl.exe!KeWaitForSingleObject+0x19f
ntoskrnl.exe!PoStartNextPowerIrp+0xba0
ntoskrnl.exe!PoStartNextPowerIrp+0x183d
ntoskrnl.exe!IoFreeErrorLogEntry+0x297
System.ni.dll+0x19ab70
System.ni.dll+0x1de979
System.ni.dll+0x19ab70
System.ni.dll+0x199d42
System.ni.dll+0x1ded86
System.ni.dll+0x1de5fa
System.ni.dll+0x1de397
System.ni.dll+0x1da636
System.ni.dll+0x1c755e
System.ni.dll+0x19ebfb
System.ni.dll+0x19eccf
clr.dll+0x1396
clr.dll+0x291f
clr.dll!PreBindAssemblyEx+0x1822c
clr.dll!PreBindAssemblyEx+0x183af
mscorlib.ni.dll+0x2f1213
mscorlib.ni.dll+0x2f103e
mscorlib.ni.dll+0x2ffb72
mscorlib.ni.dll+0x30a366
mscorlib.ni.dll+0x2ffd30
mscorlib.ni.dll+0x3aebef
mscorlib.ni.dll+0x3aeaba
clr.dll+0x291f
clr.dll+0x9aff
clr.dll!PreBindAssembly+0xb165
clr.dll!PreBindAssembly+0x9653
clr.dll!PreBindAssembly+0x96bd
clr.dll!PreBindAssembly+0x978a
clr.dll!PreBindAssembly+0x9805
clr.dll!PreBindAssembly+0xb0f9
clr.dll!PreBindAssembly+0xa166
clr.dll!GetCLRFunction+0x107dc
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36
Does anyone understand something from the above lines??
On Internet I've found several suggestion to disable one or another plugin/extension of visual studio, by none of them solved the problem, and moreover I have the problem on all the VS version (with different extension and happened at the same time)
I think it's something related to the .net framework 4.5 ~4.6 that I have updated recently. How can I understand where is the problem and how to solve it?
Upvotes: 5
Views: 2603
Reputation: 28776
To see why Visual Studio causes such a high cpu usage you need to install the Windows Performance Toolkit, which is part of the Windows 10 SDK (if you use Windows 7, use the SDK Build 15086, which is the last version that works on Windows 7, for Windows 8,8.1 or Windows 10 use the WPT from latest Windows 10 SDK).
(all other entries can be unselected)
Run WPRUI.exe, select First Level, CPU Usage and click on start. Capture 1 minute of the CPU usage, now click on Save to save the data into a ETL file.
Now make a double click on the generated ETL file to open the ETL in Windows Performance Analyzer (WPA.exe), drag and drop the CPU Usage (Sampled) to analyze pane:
Now load debug symbols in WPA and expand the stack of the devenv.exe
In my case the Telerik Extension causes CPU usage inside Visual Studio.
Upvotes: 4
Reputation: 127553
I personally ran in to this once when a 3rd party native library I was working with made calls to _controlfp
to change the floating point precision. Doing that is not supported while running under the CLR. Even though it was done in executed code it would lock up my devenv.exe.
I doubt you have the same problem but here is what I did to track it down.
If you can reliably re-create it, in 2015 click on the person icon in the top right corner next to quick launch and do "Report a problem".
In the new window choose Problem Area "Integrated Development Environment", then expand out "Record your Actions to reproduce the issue" and select the item "To reproduce a crash or hang, attach to another Visual Studio Instance.". Start another copy of Visual studio and you should see it listed.
This will do a record a ETW log and put it in the bug report that it will send when you hit Submit. The log will be saved under %TEMP%\Microsoft\VSFeedbackCollector
(you may want to grab a copy of it before you send the report because I think it will delete the files once the report is sent).
Once you have the etl file you can open it in the etl viewer of your choice to start digging in to what is causing the high cpu load to happen.
Upvotes: 1