Skip to content

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

Merged
kunalspathak merged 52 commits into
dotnet:mainfrom
kunalspathak:merge-on-red
Jan 27, 2023
Merged

Produce crashreport.json and use llvm-symbolizer to create stack trace#77578
kunalspathak merged 52 commits into
dotnet:mainfrom
kunalspathak:merge-on-red

Conversation

@kunalspathak

@kunalspathak kunalspathak commented Oct 28, 2022

Copy link
Copy Markdown
Contributor

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
@ghost ghost 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

ghost commented Oct 28, 2022

Copy link
Copy Markdown

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 Only use for closed issues 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

ghost commented Dec 6, 2022

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

Ping @hoyosjs

@hoyosjs

hoyosjs commented Dec 8, 2022

Copy link
Copy Markdown
Member

Will try to take a look between today and tomorrow.

@kunalspathak

Copy link
Copy Markdown
Contributor Author

Ping @hoyosjs

@agocke

agocke commented Dec 14, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@agocke agocke left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs Outdated
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs Outdated
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs Outdated
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs Outdated
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs Outdated
Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
@kunalspathak

Copy link
Copy Markdown
Contributor 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?

Comment thread src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
@agocke

agocke commented Dec 15, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor 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

agocke commented Dec 15, 2022

Copy link
Copy Markdown
Member

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

@agocke agocke left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

Labels

area-Infrastructure-coreclr Only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants