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

Produce crashreport.json and use llvm-symbolizer to create stack trace #77578

Merged
merged 52 commits into from
Jan 27, 2023

Conversation

kunalspathak
Copy link
Member

@kunalspathak kunalspathak commented Oct 28, 2022

Contributes to #75243 and #77918

@kunalspathak kunalspathak added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Oct 28, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 28, 2022
@ghost ghost assigned kunalspathak Oct 28, 2022
@ghost
Copy link

ghost commented Oct 28, 2022

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

Issue Details

null

Author: kunalspathak
Assignees: -
Labels:

NO-MERGE, NO-REVIEW, area-CodeGen-coreclr

Milestone: -

@kunalspathak kunalspathak added area-Infrastructure-coreclr and removed NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Dec 6, 2022
@ghost
Copy link

ghost commented Dec 6, 2022

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

Issue Details

Contributes to #75243 and #77918

Author: kunalspathak
Assignees: kunalspathak
Labels:

area-Infrastructure-coreclr

Milestone: -

@kunalspathak
Copy link
Member Author

Ping @hoyosjs

@hoyosjs
Copy link
Member

hoyosjs commented Dec 8, 2022

Will try to take a look between today and tomorrow.

@kunalspathak
Copy link
Member Author

Ping @hoyosjs

@agocke
Copy link
Member

agocke commented Dec 14, 2022

How will this work on systems like Alpine (musl) where we don't have dotnet installed on the machine, and the .NET runtime being tested is presumably broken?

@kunalspathak
Copy link
Member Author

It won't. This is just for Ubuntu x64 (for now).

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

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

I'd consider writing some unit tests for this. There;s no reason why we can't manually create a crashing process and ensure this works.

@kunalspathak
Copy link
Member Author

I'd consider writing some unit tests for this.

I am not sure if we have an infrastructure/existing test cases to test any of this code. @hoyosjs do we?

@agocke
Copy link
Member

agocke commented Dec 15, 2022

If we don't have infrastructure for testing this I think we need to make it. This code is supposed to be robust exactly in the edge cases where we won't get a lot of coverage. Testing a few simple cases and in PRs won't cut it.

@kunalspathak
Copy link
Member Author

If we don't have infrastructure for testing this I think we need to make it.

I agree, but I don't have bandwidth to do it this week. If we want, we can have this PR open until January when I can start looking at how to test it.

@agocke
Copy link
Member

agocke commented Dec 15, 2022

Sounds good, I don't think there's a rush to get this in this year. I'd rather do it right

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

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

LGTM

Let's follow-up with unit tests when we have time to schedule it

string userName = Environment.GetEnvironmentVariable("USER");
if (!string.IsNullOrEmpty(userName))
{
if (!RunProcess("sudo", $"chown {userName} {crashReportJsonFile}"))
Copy link
Member

Choose a reason for hiding this comment

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

If elevating works on Mac right now, that's great, but I could see this not working forever, so we should give a little thought to what we would do instead.

@kunalspathak kunalspathak merged commit ff987dc into dotnet:main Jan 27, 2023
@kunalspathak kunalspathak deleted the merge-on-red branch January 27, 2023 07:44
agocke added a commit that referenced this pull request Jan 30, 2023
kunalspathak added a commit to kunalspathak/runtime that referenced this pull request Jan 30, 2023
kunalspathak added a commit that referenced this pull request Jan 30, 2023
kunalspathak added a commit to kunalspathak/runtime that referenced this pull request Jan 30, 2023
kunalspathak added a commit that referenced this pull request Jan 31, 2023
* Revert "Revert "Produce crashreport.json and use llvm-symbolizer to create stack trace (#77578)" (#81379)"

This reverts commit 3c76e14.

* Add nativeSymbols only for PRs
@ghost ghost locked as resolved and limited conversation to collaborators Feb 26, 2023
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.

3 participants