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

Extract stack traces of hanging CI test runs #3298

Closed
weltkante opened this issue May 17, 2020 · 6 comments · Fixed by #3552
Closed

Extract stack traces of hanging CI test runs #3298

weltkante opened this issue May 17, 2020 · 6 comments · Fixed by #3552
Assignees

Comments

@weltkante
Copy link
Contributor

weltkante commented May 17, 2020

Is your feature request related to a problem? Please describe.
Hangs in CI build are hard to diagnose, especially if they are not reproducable locally or do not happen deterministically.

Describe the solution you'd like and alternatives you've considered
dotnet-dump allows collecting dumps of a process and analyze them

PR #3056 started taking screenshots of hanging CI test runs, I think it would be even better if we used dotnet-dump to take dumps

Will this feature affect UI controls?
No, test infrastructure only

@weltkante weltkante added the api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation label May 17, 2020
@weltkante
Copy link
Contributor Author

weltkante commented May 17, 2020

Assuming the testing process id can be figured out, following powershell script takes a minidump (so storage size should be no concern) and extracts the stack traces. I also include the thread summary because it mentions apartments and lock counts.

dotnet-dump collect --process-id $TargetProcessId --type mini --output hangdump
"clrthreads`nclrstack -all`nexit`n" |& dotnet-dump analyze hangdump > hangdump.txt

The CI build may also need to install dotnet-dump if arcade doesn't do that yet, see linked doc page.

@RussKie
Copy link
Member

RussKie commented May 18, 2020

I've been mulling over how we can get a memory dump. Your proposal is one of several ways, assuming dotnet-dump is installed, or it can be installed as part of a build run.

We'll need to look at this in conjunction with dotnet/arcade#5398.

@RussKie RussKie self-assigned this May 18, 2020
@RussKie RussKie added this to the 5.0 milestone May 18, 2020
@RussKie
Copy link
Member

RussKie commented Jun 19, 2020

Closing as we can get crash dumps.

@RussKie RussKie closed this as completed Jun 19, 2020
@RussKie RussKie removed this from the 5.0 milestone Jun 19, 2020
@RussKie RussKie removed the api-suggestion (1) Early API idea and discussion, it is NOT ready for implementation label Jun 19, 2020
@weltkante
Copy link
Contributor Author

weltkante commented Jun 19, 2020

@RussKie do we actually get dumps from hangs? The OS will only create them for crashes. I guess its no priority anymore since there are no unidentified hangs remaining and we hopefully won't add new ones ;-)

@RussKie
Copy link
Member

RussKie commented Jun 19, 2020

We can revisit it, if necessary. Keeping my 🤞 that we won't need this.

@RussKie RussKie reopened this Jul 8, 2020
@RussKie
Copy link
Member

RussKie commented Jul 9, 2020

FYI I'm working on this, I have a prototype (4310c3c) that works locally, trying to sort out the CI leg

@ghost ghost added the 🚧 work in progress Work that is current in progress label Jul 10, 2020
RussKie added a commit that referenced this issue Jul 10, 2020
RussKie added a commit that referenced this issue Jul 12, 2020
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Jul 12, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants