Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crash report to createdump for Linux Watson #55438

Merged
merged 6 commits into from
Jul 12, 2021

Conversation

mikem8361
Copy link
Member

For Linux Watson the crash report will contains the .NET Core version, the faulting process name (the module/assembly containing Main) and the managed exception info (including the exception HRESULT) and thread stack trace of the thread the caused the crash.

Add the CLRDATA_MODULE_IS_MAIN_MODULE flag to the DAC's IXCLRDataModule::GetFlags API.

Add code to get the managed method name and write it out as "method_name" (even on MacOS).

Only write PH_HDR_CANARY section if neccessary

Add native frame symbolization (unmanaged_name) using dladdr (both Linux and MacOS).

Demangle the stack frame symbols.

@ghost
Copy link

ghost commented Jul 9, 2021

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

For Linux Watson the crash report will contains the .NET Core version, the faulting process name (the module/assembly containing Main) and the managed exception info (including the exception HRESULT) and thread stack trace of the thread the caused the crash.

Add the CLRDATA_MODULE_IS_MAIN_MODULE flag to the DAC's IXCLRDataModule::GetFlags API.

Add code to get the managed method name and write it out as "method_name" (even on MacOS).

Only write PH_HDR_CANARY section if neccessary

Add native frame symbolization (unmanaged_name) using dladdr (both Linux and MacOS).

Demangle the stack frame symbols.

Author: mikem8361
Assignees: mikem8361
Labels:

area-Diagnostics-coreclr

Milestone: -

src/coreclr/debug/createdump/crashinfo.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/crashreportwriter.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/crashreportwriter.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/crashreportwriter.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/dumpwriterelf.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/createdump/crashreportwriter.cpp Outdated Show resolved Hide resolved
{
std::string name = GetFileName(moduleInfo.ModuleName());
std::string name = GetFileName(moduleInfo->ModuleName());
#ifdef __APPLE__
Copy link
Member

Choose a reason for hiding this comment

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

The only thing is this is configurable, but this is not the default. I don't know how common it is to request case sensitivity.

Copy link
Member Author

Choose a reason for hiding this comment

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

Lee mentioned it in passing and then I confirmed on my local MacBook. Not sure what to do if it is configurable. I'm going to leave it this way for now.

OpenObject("payload");
WriteValue("protocol_version", "0.0.7");
WriteValue("protocol_version", "1.0.0");
Copy link
Member

Choose a reason for hiding this comment

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

When you say protocol 1, it's usually we are not making breaking changes until 2. Is this what we are intending? I know this is not a very public protocol, but I think it's worth to consider nonetheless.

Copy link
Member Author

Choose a reason for hiding this comment

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

For the mono analyzer as long as it is greater than 0.0.6 it should be fine. Kyle mentioned just going to 1.0.0 so I thought I start both MacOS/Linux there.

src/coreclr/debug/createdump/threadinfo.h Show resolved Hide resolved
@hoyosjs
Copy link
Member

hoyosjs commented Jul 11, 2021

The GCC build is a known issue.

@mikem8361 mikem8361 merged commit f57b6e7 into dotnet:main Jul 12, 2021
@mikem8361 mikem8361 deleted the linux_watson branch July 12, 2021 15:55
@ghost ghost locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants