Detect non-createdump dumps in SOS and warn the user#5720
Merged
leculver merged 2 commits intodotnet:mainfrom Feb 18, 2026
Merged
Detect non-createdump dumps in SOS and warn the user#5720leculver merged 2 commits intodotnet:mainfrom
leculver merged 2 commits intodotnet:mainfrom
Conversation
Add a warning when loading a Linux/macOS dump that was not collected by the .NET runtime's createdump tool. System dumps may be missing memory regions required by SOS commands. The warning is triggered by checking for the absence of the DIAGINFOHEADER signature at the well-known diagnostic page address. This is implemented for both the dotnet-dump analyzer and the native debugger (dbgeng/lldb) host paths. Fixes dotnet#5632 Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a user-facing warning when SOS loads a Linux/macOS dump that was not collected by the .NET runtime's createdump tool. System dumps collected by other tools may be missing memory regions required for SOS commands to function correctly.
Changes:
- Adds
HasDiagnosticInfo()method to detect presence of DIAGINFOHEADER signature at the special diagnostic page address - Adds
WarnIfNotCreatedump()method to check and emit the warning for non-createdump dumps on Linux/macOS - Integrates the warning into both dotnet-dump analyzer and native debugger (dbgeng/lldb) host paths
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Microsoft.Diagnostics.DebugServices.Implementation/SpecialDiagInfo.cs | Adds detection logic via HasDiagnosticInfo() and warning display via WarnIfNotCreatedump() |
| src/Tools/dotnet-dump/Analyzer.cs | Calls warning check after opening dump file |
| src/SOS/SOS.Extensions/HostServices.cs | Calls warning check in target creation event handler for native debuggers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Manually tested this on arch linux with both sos and |
hoyosjs
reviewed
Feb 18, 2026
src/Microsoft.Diagnostics.DebugServices.Implementation/SpecialDiagInfo.cs
Outdated
Show resolved
Hide resolved
…DiagInfo.cs Co-authored-by: Juan Hoyos <[email protected]>
hoyosjs
approved these changes
Feb 18, 2026
leculver
added a commit
to leculver/diagnostics
that referenced
this pull request
Feb 19, 2026
Add a warning when loading a Linux/macOS dump that was not collected by the .NET runtime's createdump tool. System dumps may be missing memory regions required by SOS commands. The warning is triggered by checking for the absence of the DIAGINFOHEADER signature at the well-known diagnostic page address. This is implemented for both the dotnet-dump analyzer and the native debugger (dbgeng/lldb) host paths. Fixes dotnet#5632 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Juan Hoyos <[email protected]>
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.
Add a warning when loading a Linux/macOS dump that was not collected by the .NET runtime's createdump tool. System dumps may be missing memory regions required by SOS commands.
The warning is triggered by checking for the absence of the DIAGINFOHEADER signature at the well-known diagnostic page address. This is implemented for both the dotnet-dump analyzer and the native debugger (dbgeng/lldb) host paths.
Fixes #5632