Skip to content

Detect non-createdump dumps in SOS and warn the user#5720

Merged
leculver merged 2 commits intodotnet:mainfrom
leculver:issue_5632
Feb 18, 2026
Merged

Detect non-createdump dumps in SOS and warn the user#5720
leculver merged 2 commits intodotnet:mainfrom
leculver:issue_5632

Conversation

@leculver
Copy link
Contributor

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

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]>
Copilot AI review requested due to automatic review settings February 16, 2026 02:12
@leculver leculver requested a review from a team as a code owner February 16, 2026 02:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@leculver
Copy link
Contributor Author

Manually tested this on arch linux with both sos and dotnet-dump analyze. No message for a create-dump coredump, prints correctly for a kernel written coredumpctl dump.

@leculver leculver merged commit 79ae596 into dotnet:main Feb 18, 2026
3 of 14 checks passed
@leculver leculver deleted the issue_5632 branch February 18, 2026 01:54
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect createdump collected dumps in SOS

3 participants