Unable to read .nettrace file collected by dotnet-trace

オープン
#5,574 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
領域
devtools

調査の方向性

文書化されている dotnet-trace collect コマンドで問題を再現し、生成された .nettrace ファイルを PerfView と Visual Studio で開こうとしながら、それらが報告する EventPipe および FastSerialization のエラーを確認します。生成されたこのファイルが拒否される理由を特定し、収集したトレースが影響を受けるツールで正常に開けることを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

Collected data using command
dotnet-trace collect --process-id **** --duration 00:00:00:30 --providers Microsoft-DotNETCore-SampleProfiler
But the result .nettrace file was not readable by either Visual Studio nor PerfView.
Visual Studio Log:

CreateEditorInstance
StreamJsonRpc.RemoteInvocationException: Not a understood file format: C:\Users\****\Downloads\w3wp.exe_20250919_140901.nettrace
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DiagnosticsHub.NetTraceDocumentConverter.<ConvertFromAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DiagnosticsHub.DocumentsService.<OpenAsConvertedAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.DiagnosticsHub.DocumentsService.<OpenAsConvertedAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.DiagnosticsHub.DocumentsService.<OpenAsConvertedAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DiagnosticsHub.VisualStudio.Shell.Views.NetTraceEditorFactory.<>c__DisplayClass6_0.<<CreateEditorInstance>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
   at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.Run(JoinableTaskFactory joinableTaskFactory, String waitCaption, Func`3 asyncMethod, Nullable`1 delayToShowDialog)
   at Microsoft.DiagnosticsHub.VisualStudio.Shell.Views.NetTraceEditorFactory.<>c__DisplayClass6_0.<<CreateEditorInstance>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__36_0>d.MoveNext()
RPC server exception:
FastSerialization.SerializationException: Not a understood file format: C:\Users\****\Downloads\w3wp.exe_20250919_140901.nettrace
      at FastSerialization.Deserializer.Initialize(IStreamReader reader, String streamName)
      at FastSerialization.Deserializer..ctor(IStreamReader reader, String streamName)
      at Microsoft.Diagnostics.Tracing.EventPipeEventSource.<>c__DisplayClass2_0.<.ctor>b__0()
      at Microsoft.Diagnostics.Tracing.EventPipeEventSource..ctor(PinnedStreamReader streamReader, String name, Boolean isStreaming)
      at Microsoft.Diagnostics.Tracing.EventPipeEventSource..ctor(String fileName)
      at Microsoft.Diagnostics.Tracing.Etlx.TraceLog.CreateFromEventPipeDataFile(String filePath, String etlxFilePath, TraceLogOptions options)
      at Microsoft.DiagnosticsHub.DataWarehouse.ServiceModule.Controllers.DataWarehouseTraceEventServiceController.ConvertAsync(Guid sessionId, ConvertDocumentPayload convertDocumentPayload, List`1 analyzerPayloads, CancellationToken cancellationToken)

PerfView Log:

Started with command line: PerfView.exe  w3wp.exe_20250919_140901.nettrace /ContinueOnError
PerfView Version: 3.1.24  BuildDate: Wed, 27 Aug 2025 11:35:13 GMT
PerfView Start Time 9/19/2025 2:20:41 PM
Started: View
Warning: PdbScope not found at **\Downloads\PerfViewExtensions\PdbScope.exe
Disabling the Image Size Menu Item.
Warning: ILSize not found at **\Downloads\PerfViewExtensions\ILSize.dll
Disabling the IL Size Menu Item.
Completed: View   (Elapsed Time: 0.098 sec)
Started: Opening w3wp.exe_20250919_140901.nettrace
Creating ETLX file **\AppData\Local\Temp\PerfView\w3wp.exe_20250919_140901_cdf8e802.etlx from **\Downloads\w3wp.exe_20250919_140901.nettrace
Error: Exception EventPipe conversion: System.FormatException: Invalid FastSerialization header
   at Microsoft.Diagnostics.Tracing.FastSerializationObjectParser.ValidateFastSerializationHeader()
   at Microsoft.Diagnostics.Tracing.EventPipeEventSource.ParseHeaders()
   at Microsoft.Diagnostics.Tracing.EventPipeEventSource..ctor(Stream stream, Boolean isStreaming)
   at Microsoft.Diagnostics.Tracing.Etlx.TraceLog.CreateFromEventPipeDataFile(String filePath, String etlxFilePath, TraceLogOptions options)
   at PerfView.EventPipePerfViewData.GetTraceLog(TextWriter log, Action`3 onLostEvents)
[Error: exception while opening EventPipe data.]
Completed: Opening w3wp.exe_20250919_140901.nettrace   (Elapsed Time: 0.123 sec)
Configuration

dotnet-trace Windows x64 version 9.0.12.21003 downloaded from https://aka.ms/dotnet-trace/win-x64
Perfview version is 3.1.19
Visual Studio 2022 Community version is 17.0.36407.19

Data collected on Windows Server 2022 x64 version 10.0.20348
Server is running IIS version 10.0
.net core runtime installed on server is 8.0.4

主要言語
C++
スター
1.3k
フォーク
407
平均マージ
21時間 5分
マージ済み PR(30日)
78

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/diagnostics のほかの issue

dotnet/diagnostics の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。