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

Windows createdump support #35381

Merged
merged 5 commits into from
Apr 25, 2020
Merged

Windows createdump support #35381

merged 5 commits into from
Apr 25, 2020

Conversation

mikem8361
Copy link
Member

Build a Windows version of createdump that uses MiniDumpWriteDump.

Launch that createdump from the runtime when the runtime abort because of an unhandled exception.

Hook up the diagnostic server dump message on Windows.

Add CrashDumpAndTerminateProcess function that generates a dump if enabled and terminates
the process. Replaced varous TerminateProcess calls in the runtime with this new function.

Build a Windows version of createdump that uses MiniDumpWriteDump.

Launch that createdump from the runtime when the runtime abort because of an unhandled exception.

Hook up the diagnostic server dump message on Windows.

Add CrashDumpAndTerminateProcess function that generates a dump if enabled and terminates
the process. Replaced varous TerminateProcess calls in the runtime with this new function.
@ghost
Copy link

ghost commented Apr 24, 2020

Tagging subscribers to this area: @tommcdon
Notify danmosemsft if you want to be subscribed.

@davidfowl
Copy link
Member

Does this change also package/ship createdump with the shared runtime?

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Mike!
I'm a little suspicious that we're going to find cases over time where the error conditions that trigger Linux dumps will be different from the error conditions that trigger Windows dumps given how different the error handling paths are. Nothing obvious jumped out though.

src/coreclr/src/debug/createdump/createdump.cpp Outdated Show resolved Hide resolved
src/coreclr/src/vm/excep.h Show resolved Hide resolved
@mikem8361
Copy link
Member Author

mikem8361 commented Apr 24, 2020

Does this change also package/ship createdump with the shared runtime?

Yes, it will be included in the runtime package shipped as part of the shared runtime like the Linux version is.

@mikem8361
Copy link
Member Author

Issue: #34915

@mikem8361 mikem8361 requested a review from jkotas April 25, 2020 00:09
@ghost
Copy link

ghost commented Apr 25, 2020

Hello @mikem8361!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

{
exitCode = -1;
}
case MiniDumpWithPrivateReadWriteMemory:
Copy link
Member

Choose a reason for hiding this comment

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

Given the values assigned above, can these cases even be reached? It seems the assigned type is always combination of several flags.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right, the minidumpType switch should be masked with the bit in the case statements. I'll try to get that fixes in a future PR.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
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.

6 participants