microsoft / microsoft/perfview

COMException when trying to capture performance capture for Visual Studio

Open
#1,436 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
4.7k
Forks
775
Avg merge
5d 11h
Merged PRs (30d)
9

Description

I am attempting to capture a Visual Studio performance trace using the following command :

perfview.exe collect C:\temp\ReproTrace.etl -CircularMB:4096 -BufferSizeMB:256 -Merge:true -Zip:true -Providers:641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e,*Microsoft-VisualStudio-Common,*RoslynEventSource,*StreamJsonRpc,.NETTasks:0:0 -ThreadTime -NoV2Rundown -NoNGenRundown  

I am getting the following crash :

Started with command line: C:\perfview.exe  collect C:\temp\ReproTrace.etl -CircularMB:4096 -BufferSizeMB:256 -Merge:true -Zip:true -Providers:641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e,*Microsoft-VisualStudio-Common,*RoslynEventSource,*StreamJsonRpc,.NETTasks:0:0 -ThreadTime -NoV2Rundown -NoNGenRundown
PerfView Version: 2.0.69  BuildDate: Mon, 24 May 2021 16:28:03 GMT
PerfView Start Time 2021-05-26 13:56:42
Started: Collect
[Kernel Log: C:\temp\ReproTrace.kernel.etl]
Kernel keywords enabled: ThreadTime
Warning: PdbScope not found at C:\PerfViewExtensions\PdbScope.exe
Disabling the Image Size Menu Item.
Warning: ILSize not found at C:\PerfViewExtensions\ILSize.dll
Disabling the IL Size Menu Item.
Collection Dialog open.
[User mode Log: C:\temp\ReproTrace.etl]
Enabling Provider:PerfViewLogger Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:a8a71ac1-040f-54a2-07ca-00a89b5ab761
Turning on more CLR GC, JScript and ASP.NET Events.
Enabling Provider:DotNet Level:Verbose Keywords:0xffffffffffffffff Stacks:1 Values: Guid:319dc449-ada5-50f7-428e-957db6791668
Enabling Provider:Microsoft-Windows-Kernel-EventTracing Level:Verbose Keywords:0x70 Stacks:1 Values: Guid:b675ec37-bdb6-4648-bc92-f3fdc74d3ca2
Enabling Provider:Microsoft-Windows-Kernel-File Level:Verbose Keywords:0x80 Stacks:1 Values: Guid:edd08927-9cc4-4e65-b970-c2560fb5c289
Enabling Provider:Microsoft-Windows-Kernel-Process Level:Informational Keywords:0x10 Stacks:1 Values: Guid:22fb2cd6-0e7b-422b-a0c7-2fad1fd0e716
Enabling Provider:ASP.NET Level:Verbose Keywords:0xfffffffffffffffd Stacks:0 Values: Guid:aff081fe-0247-4275-9c4e-021f3dc1da35
File C:\WINDOWS\System32\inetsrv\iisetw.dll exists, ASP.NET ETW is enabled
Enabling Provider:*Microsoft-Windows-ASPNET Level:Informational Keywords:0xffffffffffffffff Stacks:1 Values: Guid:ee799f41-cfa5-550b-bf2c-344747c1c668
Enabling Provider:Microsoft-Windows-IIS Level:Critical Keywords:0x0 Stacks:0 Values: Guid:de4649c9-15e8-4fea-9d85-1cdda520c334
Enabling Provider:Microsoft-PerfTrack-IEFRAME Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:b2a40f1f-a05a-4dfd-886a-4c4f18c4334c
Enabling Provider:Microsoft-PerfTrack-MSHTML Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:ffdb9886-80f3-4540-aa8b-b85192217ddf
Enabling Provider:Microsoft-Windows-WinINet Level:Verbose Keywords:0x2 Stacks:0 Values: Guid:43d1a55c-76d6-4f7e-995c-64c711e5cafe
Enabling Provider:Microsoft-Windows-Application Server-Applications Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:c651f5f6-1c0d-492e-8ae1-b4efd7c9d503
Enabling Provider:Microsoft-IE Level:Informational Keywords:0x1300 Stacks:0 Values: Guid:9e3b3947-ca5d-4614-91a2-7b624e0e7244
Enabling Provider:Microsoft-Windows-DNS-Client Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:1c95126e-7eea-49a9-a3fe-a378b03ddb4d
Enabling Provider:Microsoft-Windows-DirectComposition Level:Verbose Keywords:0x4 Stacks:0 Values: Guid:c44219d0-f344-11df-a5e2-b307dfd72085
Enabling Provider:Microsoft-Windows-Immersive-Shell Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:315a8872-923e-4ea2-9889-33cd4754bf64
Enabling Provider:Microsoft-Windows-XAML Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:531a35ab-63ce-4bcf-aa98-f88c7a89e455
Enabling Provider:Microsoft-JScript Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:57277741-3638-4a4b-bdba-0ac6e45da56c
Enabling Provider:ClrPrivateNative Level:Informational Keywords:0x4002000b Stacks:0 Values: Guid:1095638c-8748-4c7a-b39e-baea27b9c589
Enabling Provider:CLRPrivate Level:Informational Keywords:0x4002000b Stacks:0 Values: Guid:763fd754-7086-4dfe-95eb-c01a46faf4ca
Enabling Provider:.NETFramework Level:Verbose Keywords:0x16 Stacks:1 Values: Guid:8e9f5090-2d75-4d03-8a81-e5afbf85daf1
Enabling Provider:Microsoft.Tasks.Nuget Level:Informational Keywords:0x80 Stacks:0 Values: Guid:b734069e-103c-5376-2080-4f009207881a
Enabling Provider:Microsoft-AdoNet-SystemData Level:Informational Keywords:0x1 Stacks:1 Values: Guid:6a4dfe53-eb50-5332-8473-7b7e10a94fd1
Enabling Provider:ETWCLrProfiler Diagnostics Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:6652970f-1756-5d8d-0805-e9aad152aa79
Enabling Provider:Microsoft-Diagnostics-DiagnosticSource Level:Informational Keywords:0xfffffffffffff7ff Stacks:1 Values:FilterAndPayloadSpecs=HttpHandlerDiagnosticListener/System.Net.Http.Request@Activity2Start:Request.RequestUri
HttpHandlerDiagnosticListener/System.Net.Http.Response@Activity2Stop:Response.StatusCode Guid:adb401e1-5296-51f8-c125-5fda75826144
Enabling Provider:Microsoft-AspNetCore-Hosting Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:9e620d2a-55d4-5ade-deb7-c26046d245a8
Enabling Provider:Microsoft-ApplicationInsights-Core Level:Verbose Keywords:0xffffffffffffffff Stacks:1 Values: Guid:74af9f20-af6a-5582-9382-f21f674fb271
Enabling Provider:Microsoft-Windows-Kernel-Power Level:Informational Keywords:0xffb Stacks:0 Values: Guid:331c3b3a-2005-44c2-ac5e-77220c37d6b4
Enabling Provider:Microsoft-Windows-Kernel-Processor-Power Level:Informational Keywords:0xe5d Stacks:0 Values: Guid:0f67e49f-fe51-4e9f-b490-6f2948cc6027
Enabling Provider:Microsoft-Windows-PowerCpl Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:b1f90b27-4551-49d6-b2bd-dfc6453762a6
Enabling Provider:Microsoft-Windows-PowerCfg Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:9f0c4ea8-ec01-4200-a00d-b9701cbea5d8
Enabling Provider:Microsoft-Antimalware-Engine Level:Verbose Keywords:0xffffffffffffffff Stacks:1 Values: Guid:0a002690-3839-4e3a-b3b6-96d8df868d99
Enabling Provider:Microsoft-Antimalware-AMFilter Level:Verbose Keywords:0xffffffffffffffff Stacks:1 Values: Guid:cfeb0608-330e-4410-b00d-56d8da9986e6
Enabling Provider:Microsoft-Antimalware-Service Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:751ef305-6c6e-4fed-b847-02ef79d26aef
Enabling Provider:Microsoft-Antimalware-RTP Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:8e92deef-5e17-413b-b927-59b2f06a3cfc
Enabling Provider:Microsoft-Antimalware-Protection Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:e4b70372-261f-4c54-8fa6-a5a7914d73da
Enabling Provider:Microsoft-Windows-HttpService Level:Verbose Keywords:0xffffffffffffffff Stacks:1 Values: Guid:dd5ef90a-6398-47a4-ad34-4dcecdef795f
Enabling Provider:Microsoft-Windows-TCPIP Level:Informational Keywords:0xffffffffffffffff Stacks:1 Values: Guid:2f07e2ee-15db-40f1-90ef-9d7ba282188a
Enabling Provider:Microsoft-Windows-NDIS-PacketCapture Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:2ed6006e-4729-4609-b423-3ee7bcd678ef
Enabling Provider:Microsoft-Windows-WebIO Level:Informational Keywords:0xffffffffffffffff Stacks:0 Values: Guid:50b3e73c-9370-461d-bb9f-26f32d68887d
Enabling Provider:Microsoft-Windows-WinINet Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:43d1a55c-76d6-4f7e-995c-64c711e5cafe
Enabling Provider:Microsoft-Windows-WinHttp Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:7d44233d-3055-4b9c-ba64-0d47ca40a232
Enabling Provider:Microsoft-Windows-RPC Level:Informational Keywords:0x0 Stacks:0 Values: Guid:6ad52b32-d609-4be9-ae07-ce8dae937e39
Turning on VS CodeMarkers and MeasurementBlock Providers.
Enabling Provider:MeasurementBlock Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:143a31db-0372-40b6-b8f1-b4b16adb5f54
Enabling Provider:CodeMarkers Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e
Enabling CLR Events: GC, Binder, Security, AppDomainResourceManagement, Contention, Exception, Threading, JITSymbols, Type, GCHeapSurvivalAndMovement, GCHeapAndTypeNames, Stack, ThreadTransfer, Codesymbols, Compilation
Enabling Provider:ClrNative Level:Verbose Keywords:0x14c14fcc9d Stacks:1 Values: Guid:47c3ba0c-77f1-4eb0-8d4d-aef447f16a85
Enabling Provider:CLR Level:Verbose Keywords:0x14c14fcc9d Stacks:0 Values: Guid:e13c0d23-ccbc-4e12-931b-d9cc2eee27e4
Enabling Providers specified by the user.
Parsing ETW Provider Spec: 641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e
Parsing ETW Provider Spec: *Microsoft-VisualStudio-Common
Parsing ETW Provider Spec: *RoslynEventSource
Parsing ETW Provider Spec: *StreamJsonRpc
Parsing ETW Provider Spec: .NETTasks:0:0
Enabling Provider:641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:641d7f6c-481c-42e8-ab7e-d18dc5e5cb9e
Enabling Provider:*Microsoft-VisualStudio-Common Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:25c93eda-40a3-596d-950d-998ab963f367
Enabling Provider:*RoslynEventSource Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:bf965e67-c7fb-5c5b-d98f-cdf68f8154c2
Enabling Provider:*StreamJsonRpc Level:Verbose Keywords:0xffffffffffffffff Stacks:0 Values: Guid:f0cffe53-bcc5-53f5-8873-995568808a3b
Disabling Provider .NETTasks Guid 2e5dba47-a3d2-4d16-8ee0-6671ffdcd7b5
Aborting tracing for sessions 'NT Kernel Logger' and 'PerfViewSession'.
Insuring .NET Allocation profiler not installed.
Detected 64 bit system, removing 64 bit keys
Completed: Collect   (Elapsed Time: 1.365 sec)
Exception Occurred: System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.DisableProvider(Guid providerGuid)
   at PerfView.CommandProcessor.EnableAdditionalProviders(TraceEventSession userModeSession, String[] providerSpecs, String commandLine, TraceEventProviderOptions options)
   at PerfView.CommandProcessor.Start(CommandLineArgs parsedArgs)
   at PerfView.CommandProcessor.Collect(CommandLineArgs parsedArgs)
   at PerfView.MainWindow.<>c__DisplayClass13_0.<ExecuteCommand>b__0()
   at PerfView.StatusBar.<>c__DisplayClass22_0.<StartWork>b__0()
An exceptional condition occurred, see log for details.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported command and stack trace, then read PerfView.CommandProcessor.Collect, Start, and EnableAdditionalProviders around the call to TraceEventSession.DisableProvider. Reproduce the collection failure and trace the provider-disable path; done means the command completes without the reported COMException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.