Skip to content

Collect memory dumps for hung tests - #3552

Merged
RussKie merged 1 commit into
masterfrom
igveliko/test/Memdumps
Jul 12, 2020
Merged

Collect memory dumps for hung tests#3552
RussKie merged 1 commit into
masterfrom
igveliko/test/Memdumps

Conversation

@RussKie

@RussKie RussKie commented Jul 10, 2020

Copy link
Copy Markdown
Contributor

Resolves #3298

Proposed changes

  • Spin up a background thread that signals at 15 minute mark, and looks for a dotnet.exe process that runs our tests.
  • If one is or more processes are found, collect their heap dumps and kill those processes.
Microsoft Reviewers: Open in CodeFlow

@RussKie
RussKie requested a review from a team as a code owner July 10, 2020 04:43
@ghost ghost assigned RussKie Jul 10, 2020
@RussKie

RussKie commented Jul 10, 2020

Copy link
Copy Markdown
Contributor Author

/cc: @weltkante

@RussKie RussKie added area-Infrastructure test-bug Problem in test source code (most likely) test-enhancement Improvements of test source code labels Jul 10, 2020
@RussKie
RussKie force-pushed the igveliko/test/Memdumps branch from 6779467 to 4610386 Compare July 10, 2020 05:19
@RussKie
RussKie merged commit f88abd1 into master Jul 12, 2020
@ghost ghost added this to the 5.0 Preview8 milestone Jul 12, 2020
@RussKie
RussKie deleted the igveliko/test/Memdumps branch July 12, 2020 13:45
@davidfowl

Copy link
Copy Markdown
Member

Hmm you shouldn't need this if you switch to vstest. We should sync on that

@weltkante

Copy link
Copy Markdown
Contributor

when you do, keep in mind that WinForms requires some tests to be run in separate processes, hang diagnostics should cover those as well

@davidfowl

Copy link
Copy Markdown
Member

If you control process launch then you need to replicate what the test host does. It's easier here since it's a single OS

@RussKie

RussKie commented Jul 13, 2020

Copy link
Copy Markdown
Contributor Author

We should sync on that

Certainly, would love that.

I've found that the Arcade is now vstest enabled (dotnet/arcade#5347) but I couldn't see any clear guidance on what needs changing in the consuming repos.

@weltkante

weltkante commented Jul 13, 2020

Copy link
Copy Markdown
Contributor

Considering that xunit.stafact nuget dependency is xunit-specific you'd need an equivalent for vstest (or build the infrastructure yourself for supporting multiple UI threads in vstest)

@RussKie

RussKie commented Jul 13, 2020

Copy link
Copy Markdown
Contributor Author

I'm hoping there's a better proposal than to rewrite 50K tests from xunit to vstest...

@ghost ghost locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure test-bug Problem in test source code (most likely) test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract stack traces of hanging CI test runs

3 participants