AArnott / Library.Template

A template for a NuGet package with tests, stylecop, fxcop, versioning, and Azure Pipelines build ready to go.
MIT License
128 stars 26 forks source link

Crash Dumps Not Collected as Artifacts in GitHub Actions #247

Open SteveBush opened 7 months ago

SteveBush commented 7 months ago

I have a test crash that only happens on GitHub (see below). The crash dump is being written to a temporary folder under /var/folders on a Mac host. I was thinking of writing an artifacts script (under azure-pipelines/artifacts) to collect and publish the .dmp files as a separate artifact folder on both Azure and GitHub pipelines.

Starting test execution, please wait...
Logging Vstest Diagnostics in file: /Users/runner/work/_temp/_artifacts/test_logs/diag.log
Starting test execution, please wait...
Logging Vstest Diagnostics in file: /Users/runner/work/_temp/_artifacts/test_logs/diag.log
A total of 1 test files matched the specified pattern.
A total of 1 test files matched the specified pattern.
vstest.console process failed to connect to testhost process after [90](https://github.com/NetworkVisor/NetworkVisor.Platform.Networking.Services.ZeroConf/actions/runs/7596982284/job/20691296351?pr=4#step:17:91) seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
vstest.console process failed to connect to testhost process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
[createdump] Writing full dump to file /var/folders/14/hgs_fjmn5ms001tb8qtxxn5c0000gn/T/97907a35-4fdc-4e0b-[91](https://github.com/NetworkVisor/NetworkVisor.Platform.Networking.Services.ZeroConf/actions/runs/7596982284/job/20691296351?pr=4#step:17:92)[98](https://github.com/NetworkVisor/NetworkVisor.Platform.Networking.Services.ZeroConf/actions/runs/7596982284/job/20691296351?pr=4#step:17:99)-90d518a7cb90/dotnet_20407_1705787617_crashdump.dmp
[createdump] Writing full dump to file /var/folders/14/hgs_fjmn5ms001tb8qtxxn5c0000gn/T/d0bf917a-7575-4459-a815-28909e00ac42/dotnet_20408_1705787617_crashdump.dmp
Test Run Aborted.
Results File: /Users/runner/work/NetworkVisor.Platform.Networking.Services.ZeroConf/NetworkVisor.Platform.Networking.Services.ZeroConf/test/macos/ZeroConfig.MacOS.IntegrationTests/TestResults/_Mac-1705781853005_2024-01-20_21_53_37.trx
AArnott commented 7 months ago

Thanks for trying this out and sharing the results. As I suppose you've seen, we already configure the test runner to create a dump in such cases, and the file should be picked up as an artifact. But there are a couple snags that could have arisen:

  1. The dump file isn't written to a location picked up by one of the artifact scripts. My first guess is this is a responsibility of test_results.ps1.
  2. The GitHub workflow file doesn't publish the artifact we prepare with the artifact script above. Something around this area.

I would very much welcome your efforts to investigate and fix this!