GCAllocationTick references an empty EventPipe stack on Linux x64
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 18.4k
- Forks
- 5.8k
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 590
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/runtime
-
area-Setup untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/runtime#137376 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-System.Memory untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/runtime#137334 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
ImmutableSortedSet<T>.Builder: enumerating through IEnumerable<T> doesn't throw on modification and can return wrong itemsPosiblemente ocupada @aw0lid la tomó hace 3 días. Abiertoarea-System.Collections
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/runtime#137167 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
DbTransaction.SupportsSavepoints docs say Release/ReleaseAsync are expected to throw, but they are no-ops by designPosiblemente ocupada @alaricd la tomó hace 7 días. Abiertoarea-System.Transactions untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/runtime#137040 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
FileSystemGlobbing: Matcher throws ArgumentOutOfRangeException when the rootDir is the same value as the filePosiblemente ocupada @makazeu la tomó hace 7 días. Abiertoarea-Extensions-FileSystem
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/runtime#136989 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/runtime
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/aspnetcore#70545 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día