Skip to content

CI: capture hang dumps on unit-test jobs - #8653

Merged
Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:build/unit-test-hang-dumps
Sep 28, 2026
Merged

Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:build/unit-test-hang-dumps

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Akka.Tests has hung on the Linux unit-test job a handful of times (~4 in ~480 builds), and we can't tell which test hung. Incrementalist gives up waiting after its 20-minute per-project timeout, and the job ends with no diagnostics.

This adds --blame-hang --blame-hang-timeout 15m --blame-hang-dump-type full to the Windows and Linux .NET Unit Tests jobs in build-system/pr-validation.yaml. If one test runs 15 minutes with no test starting or finishing, vstest's Blame collector takes a full dump of the testhost and kills it. It records the hung test in Sequence_*.xml and the .trx.

  • Timing: Incrementalist's timeout only stops waiting on dotnet test and never kills it, so blame still fires after that. A hang that starts late in the last project to run can still end with the job, undumped.
  • Upload: the existing TestResults/** copy puts these files into each job's OS-specific artifact, so no template changes were needed.
  • Why full dumps: a hang like this is most likely an async wait with every thread idle, and walking async state needs a full dump. Hangs are rare, so the size (roughly 0.5–2 GB) is cheap.

This only captures the next hang; it doesn't fix it. It isn't applied to the multi-node (MNTR) jobs, where a hang could be in a separate node process rather than the vstest testhost.

Akka.Tests has hung ~4 times in ~480 builds on the Linux unit-test job,
with silence until Incrementalist force-cancels the command at its
20-minute per-project timeout, discarding the .trx and leaving no clue
which test hung.

Add --blame-hang --blame-hang-timeout 15m --blame-hang-dump-type mini
to both unit-test jobs (Windows and Linux). 15m stays under
Incrementalist's 20m timeout, so vstest's Blame collector fires first,
kills the hung testhost, and writes a Sequence_*.xml + mini dump into
TestResults before Incrementalist would otherwise force-kill with no
diagnostics. Those files are already swept into the existing
OS-specific job artifact by the shared template's TestResults/** copy,
so no template changes are needed.

Not applied to the multi-node (MNTR) jobs: they share the dotnet test
invocation but run separate node processes, so hang detection there
is a different question.
Incrementalist's 20m timeout stops waiting on dotnet test but never kills it,
so blame fires on its own clock rather than racing Incrementalist. A full dump
is needed to walk async state in an all-threads-idle hang.
@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) September 28, 2026 18:13
@Aaronontheweb
Aaronontheweb merged commit bea8482 into akkadotnet:dev Sep 28, 2026
15 checks passed
@Aaronontheweb
Aaronontheweb deleted the build/unit-test-hang-dumps branch September 28, 2026 18:46
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.

1 participant