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

Dumping child processes #2518

Merged
19 commits merged into from
Aug 13, 2020
Merged

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Aug 13, 2020

Description

Allow child processes to be crash and hang dumped on Windows, MacOS and Linux. Dumps are by default generated to %TEMP%\guid and all generated dumps are collected from that folder. Unlike before where we told the tool the exact path for the dump and then looked just for that file.

Related issue

#2498

Comment on lines +75 to +86
foreach (var p in bottomUpTree)
{
try
{
EqtTrace.Verbose($"NetClientHangDumper.Dump: Killing process {p.Id} - {p.ProcessName}.");
p.Kill();
}
catch (Exception ex)
{
EqtTrace.Error($"NetClientHangDumper.Dump: Error killing process {p.Id} - {p.ProcessName}: {ex}.");
}
}
Copy link
Contributor

@Sanan07 Sanan07 Aug 13, 2020

Choose a reason for hiding this comment

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

Would not be better to place it in separate method? Or can we combine all three for-each loops in one and execute methods in chain? Will that work?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor

Choose a reason for hiding this comment

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

For better refactoring :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Refactor for better refactoring?

Copy link
Contributor

Choose a reason for hiding this comment

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

To have better refactored code.

Copy link
Member Author

@nohwnd nohwnd Aug 13, 2020

Choose a reason for hiding this comment

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

Yes, but how adding a method helps the code to be better? It invokes a single method in between logging. This imho reads okay, and the log will be easier to parse. - Will adding a method outweight this benefit?

@ghost
Copy link

ghost commented Aug 13, 2020

Hello @nohwnd!

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.

@ghost ghost merged commit 9394924 into microsoft:master Aug 13, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants