[Debugger] Stabilize ClrMD heap assertions - #8999
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the debugger integration-test memory leak assertions to be more resilient to ClrMD failures that were causing CI instability (notably on Windows x86/net5), by upgrading to ClrMD 3.x and skipping assertions when heap capture/root enumeration fails.
Changes:
- Upgraded ClrMD dependency in
Datadog.Trace.Debugger.IntegrationTestsfrom v2.0 to v3.2. - Converted heap traversal “considered” tracking from ClrMD’s removed
ObjectSettoHashSet<ulong>. - Added targeted skipping behavior when ClrMD throws during snapshot/heap analysis (including stack-root enumeration failures).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tracer/test/Datadog.Trace.Debugger.IntegrationTests/Datadog.Trace.Debugger.IntegrationTests.csproj | Bumps ClrMD package reference to 3.2.x for debugger integration tests. |
| tracer/test/Datadog.Trace.Debugger.IntegrationTests/Assertions/MemoryAssertions.cs | Skips memory assertions when ClrMD fails during heap capture/analysis or stack-root enumeration. |
| tracer/test/Datadog.Trace.Debugger.IntegrationTests/Assertions/DumpHeapLive.cs | Replaces removed ObjectSet with HashSet<ulong> for heap traversal tracking under ClrMD 3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 267a63bfd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
267a63b to
68375c0
Compare
BenchmarksBenchmark execution time: 2026-08-12 09:08:30 Comparing candidate commit c7d2d89 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 71 metrics, 0 unstable metrics, 68 known flaky benchmarks, 58 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8999) and master. ✅ No regressions detected |
Summary of changes
HashSet<ulong>because ClrMD 3 removedObjectSet.Reason for change
CI failed on Windows x86/net5 after #8989 merged.
DumpHeapLivereportedSequence contains more than one matching element.The failure was probably unrelated to the
HttpContextchange. ClrMD 2 usedSingleOrDefaultinternally while matching GC stack roots to stack frames, and threw when multiple frames matched. ClrMD 3 usesFirstOrDefault, avoiding this failure.