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 enable crash report flag to WriteDump client API #2715

Merged
merged 2 commits into from
Nov 1, 2021

Conversation

mikem8361
Copy link
Member

Uses new write dump command supported by 6.0 runtime to pass a set of flags instead
of just the logging enabled bool.

Issue: #2698

Uses new write dump command supported by 6.0 runtime to pass a set of flags instead
of just the logging enabled bool.

Issue: dotnet#2698
@mikem8361
Copy link
Member Author

Runtime repro PR: dotnet/runtime#60995

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, modulo the few comments. Thanks Mike!

@@ -70,6 +70,14 @@ public static Task<int> Main(string[] args)
Argument = new Argument<bool>(name: "diag")
};

private static Option CrashReportOption() =>
new Option(
alias: "--crashreport",
Copy link
Member

Choose a reason for hiding this comment

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

Is there an issue filed or PR open to add the docs for this new feature to docs.microsoft.com?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doc issue: #2717

Copy link
Member

Choose a reason for hiding this comment

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

That issue covers the APIs, but doesn't mention dotnet-dump the tool and the new argument being added here. Can you either expand the scope of the issue or add a new one?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a comment about the new option to the doc issue.

@mikem8361 mikem8361 merged commit dee96ea into dotnet:main Nov 1, 2021
@mikem8361 mikem8361 deleted the vs4macfixes branch November 1, 2021 16:12
@@ -86,6 +86,12 @@ public int Collect(IConsole console, int processId, string output, bool diag, Du

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (crashreport)
Copy link
Member

Choose a reason for hiding this comment

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

How is this not supported on Windows? I thought crash reports were possible on Windows. I seen many programs use such a thing before there too.

Copy link
Member Author

Choose a reason for hiding this comment

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

The crash report referenced here is a special json file that the Linux and MacOS tool createdump tool generates. The Windows "createdump" just calls the OS's MiniDumpWriteDump to generate dump and doesn't have a way to generate this json file. On Linux and MacOS createdump explicitly gathers the runtime process's state and writes both the core dump and the crash report json from that data.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants