12

When I tried to profile a WPF application with Concurrency Visualzer (tried both launch and attach to process), I got the following error pop up - "Unable to start the ETW collection"

ETW clearly means "Event Tracing for Windows", but I don't understand why VS cannot start it during profiling session. Thanks for the help.

user2415364
  • 121
  • 1
  • 4

5 Answers5

12

In my case this was due to Process Explorer. It seems that it uses ETW at some point to provide stats if you bring up a process' properties. Closing Process Explorer resolved my issue and allowed me to run the Concurrency Visualizer.

segy
  • 644
  • 4
  • 12
  • 1
    You saved my day. I have procexp always running and replaced taskmgr with it. I recorded several traces without any issues, always with enabled procexp but suddenly CV started to act sassy about that. I have no idea why. I always monitored thread count on the profiled process with procexp, restarted several times, nope. CV started to dislike procexp. – Samuel Aug 07 '15 at 13:36
  • Same here. Thanks!! – Trass3r Mar 28 '17 at 10:48
8

For anyone else running into this without access to tracelog.exe (which does not appear to be included in WDK 10).

List all Data Collector Sets:

logman -ets

For me the perpetrator was NT Kernel Logger which was stopped by

logman stop "NT Kernel Logger" -ets
Aske
  • 81
  • 1
  • 3
2

I had the same problem with the Concurrency Visualizer extension in VS2015.

I downloaded the Concurrency Visualizer Command Line Utility and invoked CVCollectionCmd /Query (from an elevated prompt) but it would always say the following : Collection cannot start because the required ETW sessions are already in use.

I got this error even after a reboot.

The solution

I ran tracelog -x (from an elevated prompt) and I stopped every running ETW session. After that CVCollectionCmd /Query said Not collecting, ready to start. and I was able to start the analysis from Visual Studio.

I couldn't determine which process or service on my computer started those ETW sessions.

  • I isolated it to "NT Kernel Logger" session. I killed only that and I could now run again. I did not have this problem yesterday, but I did install KB3165756 for VS2015 Update 3, and I also see a Windows Update security patch installed since then. Might be one of those introducing this, or simply having rebooted. – angularsen Sep 16 '16 at 08:53
1

I just ran into this problem today and if anyone is experiencing similar with VS 2019, the solution for me was to reboot Windows 10.

I also made sure that anything that's launching on startup and is not required is disabled (go to Task Manager -> Start-up tab and disable everything that you think might be causing this problem). After a reboot, I launched VS 2019 and tried running analyzer again (I used Start with Current Process menu item) and it worked just fine

NOTE: I literally opened only VS 2019, nothing else.

Mikolaj Kieres
  • 4,137
  • 1
  • 20
  • 23
0

I fixed the problem by running

CVCollectionCmd /Detach
empty
  • 5,194
  • 3
  • 32
  • 58