Repository navigation
Handle unavailable module image metadata - #6082
Closed
max-charlamb wants to merge 1 commit into
Closed
max-charlamb wants to merge 1 commit into
max-charlamb wants to merge 1 commit into
Conversation
Adapt dotnet#5963, preserving per-module LLDB probe behavior and limiting offline symbol configuration to module tests. Add regression coverage for image availability and preserve runtime-test symbol access. Co-authored-by: Copilot <[email protected]> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Member
Author
|
Superseded by #6087, which fixes the underlying CI flakiness with a test-only approach instead of the product API change proposed here. |
max-charlamb
added a commit
that referenced
this pull request
Oct 7, 2026
## Summary ModuleTests intermittently fails in CI when the real symbol server is unreachable or a download fails for one of the frozen .NET 6.0 test-asset dumps (DivZero/WebApp3), causing module metadata (e.g. IsManaged) to be misclassified against the expected value. This is a test-infrastructure-only fix: no product behavior changes. ## Changes - **DebugServicesTests.cs**: adds a TraceListener-based SymbolDownloadFailureListener that watches for HttpSymbolStore's existing failure log messages during a test run. If a module metadata comparison (CompareMembers) fails *and* a download failure was observed, the failure is converted into Xunit.Sdk.SkipException so the test reports **Skipped** instead of **Failed**. - **Tracer.cs**: fixes a latent bug where Tracer.Instance cached its NullTracer/Tracer choice the *first time* any static Tracer member was touched in the process, instead of reading the current Enable value on each access. Because HttpSymbolStore logs exclusively through this ITracer abstraction, a stale cached NullTracer could silently swallow all of its failure messages for the rest of the test process -- which is what let symbol-download failures go undetected rather than being skipped. Instance is now a computed property. ## Validation - Simulated a genuinely unreachable symbol server (temporarily pointing TestDump at http://127.0.0.1:1/ with a cold symbol cache) and confirmed previously-hard-failing ModuleTests cases now report **Skipped**: - otal: 9, failed: 0, succeeded: 6, skipped: 3 - Reverted that temporary experiment and reran the full suite with normal network access to confirm no regressions: - otal: 45, failed: 2 (pre-existing, unrelated ClrmaTests failures), succeeded: 43, skipped: 0 ## Related Supersedes #6082, which took a product-API approach (tri-state module image classification). This PR instead fixes the flakiness purely on the test side, with a minimal, low-risk product fix for the Tracer.Instance bug discovered along the way. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adapt #5963 by @hoyosjs to distinguish unavailable module image metadata from a known unmanaged/non-PE image. This addresses recurring DebugServices module-comparison failures when dump headers are absent and the corresponding image cannot be acquired; it does not change symbol-download retry behavior.
IModuleImageInfowithout changingIModule, preserve per-module LLDB probe behavior, and display<unknown>for unavailable managed/layout classifications.ModuleTests, retaining adjacent fixture lookup. Skip onlyIsManagedandIsFileLayoutcomparisons when metadata is unavailable, log each exclusion, and require availability for adjacent fixture images.RuntimeTests.Validation