StressLogAnalyzer rejects a log from a runtime built from the same commit: "Unsupported data descriptor version '0'"

Aperta Adatta ai principianti
#138,255 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
devtools, tooling

Direzione di ricerca

Inizia da src/tools/StressLogAnalyzer/src/Program.cs: il descrittore dei dati integrato dichiara ancora la versione 0, mentre il lettore cDAC in ContractDescriptorTarget.AddDescriptor richiede la versione 2 (modificato in #131858). Confronta il descrittore integrato con il formato del descrittore attuale in versione 2, aggiornalo, quindi compila ed esegui dotnet StressLogAnalyzer.dll <log>.slog -a -o <out>.txt su un log prodotto con DOTNET_StressLog=1. Il lavoro è completato quando l'analizzatore decodifica il log senza FormatException e scrive il file di output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area-Tools-ILLink untriaged

The in-tree StressLogAnalyzer (src/tools/StressLogAnalyzer) fails on a stress log written by a runtime built from the same commit:

Unhandled exception: System.FormatException: Unsupported data descriptor version '0'. Expected version 2.
   at Microsoft.Diagnostics.DataContractReader.ContractDescriptorTarget.AddDescriptor(Descriptor descriptor)

Repro:

  1. Write a stress log with the same commit's runtime, for example with DOTNET_StressLog=1, DOTNET_StressLogFilename=<log>.slog and DOTNET_TotalStressLogSize=0x10000000 (no file was written with the default total size of 32 MiB).
  2. Run dotnet StressLogAnalyzer.dll <log>.slog -a -o <out>.txt.

Expected: the analyzer decodes the log.
Actual: exit code 1, the exception above, no output file.

Measured on Windows arm64 Release builds at main 8fef9c34678b and at v11.0.0 (deae2e32bf0e). At main, the analyzer and the runtime came from the same commit, and the runtime wrote a 256 MiB log. At v11.0.0, the analyzer, CoreCLR and CoreLib came from the same commit, but the runtime used the official v11.0.0 JIT. A Windows x64 run also reported the descriptor-version error, but its analyzer and runtime were not checked to be from the same commit.

Read in the source: the analyzer's built-in data descriptor in src/tools/StressLogAnalyzer/src/Program.cs declares "version": 0 (at v11.0.0 and at main), and the cDAC reader has required version 2 since #131858. Inferred from that: the analyzer rejects its own built-in descriptor, so the failure does not depend on the log.

Found while working on #137606.

[!NOTE]
This issue was prepared with AI assistance (Anthropic Claude, OpenAI Codex) at my request. I reviewed the analysis before filing.

Lingua principale
C#
Stelle
18.5k
Fork
5.8k
Merge medio
2g 16h
PR unite (30g)
611

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/runtime

Tutte le issue di dotnet/runtime

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.