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

Đang mở Phù hợp với người mới
#138,255 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
devtools, tooling

Hướng nghiên cứu

Bắt đầu từ src/tools/StressLogAnalyzer/src/Program.cs: bộ mô tả dữ liệu tích hợp vẫn khai báo phiên bản 0, trong khi trình đọc cDAC trong ContractDescriptorTarget.AddDescriptor yêu cầu phiên bản 2 (đã thay đổi trong #131858). So sánh bộ mô tả tích hợp với định dạng bộ mô tả phiên bản 2 hiện tại, cập nhật nó, rồi build và chạy dotnet StressLogAnalyzer.dll <log>.slog -a -o <out>.txt với một log được tạo bằng DOTNET_StressLog=1. Hoàn thành khi trình phân tích giải mã được log mà không gặp FormatException và ghi được tệp đầu ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
18.5k
Fork
5.8k
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
611

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/runtime

Tất cả issue của dotnet/runtime

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.