Skip to content

Enhance core dump debugging - #2827

Merged
mikem8361 merged 1 commit into
dotnet:mainfrom
janvorli:enhance-process-dump-debugging
Jan 24, 2022
Merged

mikem8361 merged 1 commit into
dotnet:mainfrom
janvorli:enhance-process-dump-debugging

Conversation

@janvorli

Copy link
Copy Markdown
Member

I've found that when a core dump is taken by the OS without the extra
settings that makes it copy shared libraries binaries into the dump,
SOS doesn't work as it relies on the libcoreclr.so ELF header to be
present.
I have discovered a way to make lldb read that data from the image of
the libcoreclr.so that it has loaded together with the dump.

This change makes it possible to use SOS even for the above mentioned
dump cases. In fact, it allows SOS to read any data that were mapped as
read only from any shared library loaded in the process.

I've found that when a core dump is taken by the OS without the extra
settings that makes it copy shared libraries binaries into the dump,
SOS doesn't work as it relies on the libcoreclr.so ELF header to be
present.
I have discovered a way to make lldb read that data from the image of
the libcoreclr.so that it has loaded together with the dump.

This change makes it possible to use SOS even for the above mentioned
dump cases. In fact, it allows SOS to read any data that were mapped as
read only from any shared library loaded in the process.

@mikem8361 mikem8361 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great. Thanks for figuring this out.

@mikem8361
mikem8361 merged commit 5ea11f6 into dotnet:main Jan 24, 2022
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request sos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants