For the last while I have been experiencing weird hangs with Visual Studio 2013. To try identify what was causing the hangs or at least where about the problem was I ran ProcMon.exe on devenv.exe and the point where Visual Studio hung I was getting the below output recursively


This was kind of weird because I'd never seen this before, I logged a Microsoft connect case through Visual Studio's Report a Bug Feature after installing the Microsoft Visual Studio 2013 Feedback Tool which allows a more detailed collection of data for your bug.


After creating this bug I attached a ETL trace using PerfView, if you don't know how to use PerfView you can follow the tutorials on Channel 9 (PerfView Tutorial).

The ETL Trace showed a large amount of time spent on the Certificates which matched what I found with ProcMon.exe


At this point it was pointed out that I should look at how many certs were in my SystemCertificates (C:\Users\<username>\AppData\Roaming\Microsoft\SystemCertificates\My\Certificates), I found that I had 2405 certs which was a lot more than usual


At this point we still didn't know what was causing so many certs to be generated. I decided to delete all the certs and see what happens. After a reboot everything was working 100% again Smile

Later I was playing with Fiddler and saw a weird error talking about certificates, I went to the certs folder and saw that there was more there. I deleted them again, went to a https site and saw certs been generated Smile, the reason for so many certs is because I had Decrypt HTTPS traffic option checked


Changed this to not have it checked (because I didn't need it) and now I have a low amount of certs in my System Certificates folder again Smile.

Hope this helps someone else with this random issue Open-mouthed smile


Comment by Kevin

Helped me!
I stumbled on similar behavior in ProcMon, but the process that was pegging my machine was System instead of devenv.exe, and I wasn't able to pull a stack trace on it with ProcExp. On ProcExp's Threads tab, the thread that was pegged had a start address of "ntoskrnl.exe!RtlIpv6AddressToStringA", which sent me on a nasty wild goose chase, thinking that my root problem was in IPv6 in my network drivers. But after I dug deeper in ProcMon and actually counted how ridiculously many total operations were being run on roaming SystemCertificates (even though each operation was very fast), I looked inside them and saw 99% of them were created by Fiddler. Googled that and ended up here. Anyway, maybe this comment will add some more keywords so that the next time somebody searches for "system hanging RtlIpv6AddressToStringA", they'll actually find a relevant resource.

FWIW, this was insidious! It hit me dozens of times before the first time I was actually able to successfully put some instrumentation on it (no fun trying to open new processes when System is what's hanging...). I probably shouldn't celebrate too much yet, because the hang only happened about once a day and it might come back, but based on this post, I'm feeling a lot more confident that deleting the roaming certs is the solution. Thanks.