GCAllocationTick references an empty EventPipe stack on Linux x64
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
- 領域
- performance
調査の方向性
Start with the captured .nettrace reproduction and the EventPipe stack parsing path in src/TraceEvent/EventPipe/StackCache.cs; compare how the event’s StackId=25 resolves to a zero-length entry. The report says the runtime stack-walk failure is unknown, so investigate the corresponding GC allocation tick stack emission in ep-rt-coreclr.cpp. Done means identifying why the stack is empty and confirming the behavior with a reproduction.
索引モデルが issue の本文から書いたものです。
説明
Description
An EventPipe GCAllocationTick event from .NET 10.0.14 on Linux x64 references a stack entry containing zero instruction pointers. Nearly all other allocation ticks have stacks. This leaves an allocation sample without a caller even though the trace reports no dropped events, preventing a complete allocation-owner profile.
Reproduction Steps
This is a deterministic captured-trace reproduction; I have not isolated a minimal live workload that causes the empty stack.
-
Download the public capture (artifact expires 2027-02-08):
gh run download 42766418345 -R thomhurst/Relayer \ -n frozen-concurrent-control-42766418345-1 -D capture -
Read
capture/results/42306276036-profiled/1-baseline.nettracein a console project referencingMicrosoft.Diagnostics.Tracing.TraceEvent3.1.21. Enable unsafe code and use:using System.Reflection; using Microsoft.Diagnostics.Tracing; unsafe class Program { static void Main(string[] args) { var field = typeof(TraceEvent).GetField("eventRecord", BindingFlags.Instance | BindingFlags.NonPublic)!; using var source = new EventPipeEventSource(args[0]); int ticks = 0; source.Clr.GCAllocationTick += ev => { ticks++; // EVENT_RECORD layout on 64-bit platforms: ExtendedDataCount at byte 84. var record = (byte*)Pointer.Unbox(field.GetValue(ev)!); if (*(ushort*)(record + 84) == 0) Console.WriteLine($"{ev.TimeStampRelativeMSec}ms " + $"pid={ev.ProcessID} tid={ev.ThreadID} " + $"type={ev.TypeName} amount={ev.AllocationAmount64}"); }; source.Process(); Console.WriteLine($"ticks={ticks}"); } }Output:
1978.750716ms pid=3340 tid=3352 type=System.ArraySegment`1[System.Byte] amount=106600 ticks=1998
The same offline reader with TraceEvent 4.0.0 produces identical output. No original application is needed to replay the captured event. Collection used dotnet-trace collect --profile gc-verbose --providers Relayer-FrozenMeasurement with a child process; the additional provider only emits interval markers.
Expected behavior
An allocation tick emitted during managed execution carries a managed caller stack usable for allocation attribution.
Actual behavior
One of 1998 allocation ticks has no stack extended data even before ETLX conversion. Inspecting the parsed EventPipe header for that event gives StackId=25, StackBytesSize=0, and a non-null StackBytes pointer. The stack cache resolves a stored zero-length entry; it is not an unresolved symbol or an ETLX-only lookup failure. TraceLog.EventsLost is zero. A second retained capture, results/42306276036-profiled/4-baseline.nettrace, has the same allocation type and weighted byte count with no stack.
Regression?
Unknown. This report does not establish that all allocation stacks are guaranteed or that the issue first appeared in .NET 10.
Configuration
Ubuntu 24.04, linux-x64; .NET SDK 10.0.403; runtime 10.0.14, commit 0427b9abbe. Offline replay tested with TraceEvent 3.1.21 and 4.0.0.
Other information
The TraceEvent 3.1.21 stack-block reader stores the serialized stack byte length. I also checked current PerfView main (4f3118c0fe7f624ae93a3249ae2ff7b6e1800e98) and runtime main (848b6c444a2c1205a16b6ad7afb9f4fba39b4048, including ep-rt-coreclr.cpp), current release notes, and existing open/closed issues; I did not find a matching fix. The precise runtime stack-walk failure remains unknown.
This was discovered while investigating allocation profiles in Relayer #349.
Please investigate why this GCAllocationTick references a zero-length stack.
- 主要言語
- C#
- スター
- 18.4k
- フォーク
- 5.8k
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 590
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/runtime のほかの issue
-
area-Setup untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dotnet/runtime#137376 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area-System.Memory untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dotnet/runtime#137334 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
ImmutableSortedSet<T>.Builder: enumerating through IEnumerable<T> doesn't throw on modification and can return wrong items対応中かも @aw0lid が 3 日前に担当しました。 オープンarea-System.Collections
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#137167 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
DbTransaction.SupportsSavepoints docs say Release/ReleaseAsync are expected to throw, but they are no-ops by design対応中かも @alaricd が 7 日前に担当しました。 オープンarea-System.Transactions untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dotnet/runtime#137040 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
FileSystemGlobbing: Matcher throws ArgumentOutOfRangeException when the rootDir is the same value as the file対応中かも @makazeu が 7 日前に担当しました。 オープンarea-Extensions-FileSystem
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#136989 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
newrelic/newrelic-dotnet-agent#3949 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area-networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/aspnetcore#70545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信