question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`dotnet test --blame-crash` collects crash DMP even after successful test runs

See original GitHub issue

⚠ This is a regression in the .NET 5 SDK and blocks adoption of the .NET 5 SDK by this template repo and others.

When running dotnet test --blame-crash, a dmp file is produced at the conclusion of each test run even though no crash or timeout occurred.

Repro steps

git clone https://github.com/aarnott/library.template
cd library.template
git checkout c234c68d0b45e5cc621db26063c199b51b4a45fd
dotnet test --blame-crash

Observed output is below. Notice lines such as:

D:\git\lib.template\test\Library.Tests\TestResults\5d81aeb2-f632-461f-b151-7f96f9b8005f\testhost_22312_20201117T083038_crashdump.dmp

 dotnet test --blame-crash
  Determining projects to restore...
  All projects are up-to-date for restore.
  Library -> D:\git\lib.template\bin\Library\Debug\netstandard2.0\Library.dll
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\net472\Library.Tests.dll
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp3.1\Library.Tests.dll
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp2.1\Library.Tests.dll
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\98a4200c-be91-4880-917b-9633e603c62f\testhost_35340_20201117T083036_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 3 ms - Library.Tests.dll (netcoreapp3.1)
Test run for D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp2.1\Library.Tests.dll (.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\5d81aeb2-f632-461f-b151-7f96f9b8005f\testhost_22312_20201117T083038_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 6 ms - Library.Tests.dll (netcoreapp2.1)
Test run for D:\git\lib.template\bin\Library.Tests\Debug\net472\Library.Tests.dll (.NETFramework,Version=v4.7.2)
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\22ff3440-7aec-4a15-b81e-a90ef4f607ca\testhost.net472.x86_12208_20201117T083041_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 8 ms - Library.Tests.dll (net472)

Build succeeded.

D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
    6 Warning(s)
    0 Error(s)

Time Elapsed 00:00:09.54

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
nohwndcommented, Sep 2, 2021
  1. should be fixed in the preview sdk. 1) I am working on.
1reaction
nohwndcommented, Jan 6, 2021

Thanks, @nohwnd Jakub Jares FTE. But it’s still broken. Now instead of collecting dumps from every run (successful or not), it never collects dumps. .NET 5.0 works fine as was the case before. But <.NET 5.0 test runs now never collect crash dumps. Check out this log from AzP.

Here you said that it no longer collects them, so that is what I wondered about. The build is unfortunately gone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet test command - .NET CLI
Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version...
Read more >
GitHub action marks successful run even when dotnet test ...
I have a simple problem with dotnet test on a windows-runner. When running multiple tests only the last exit-code is taken into account....
Read more >
https://raw.githubusercontent.com/dotnet/docs/main...
Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version...
Read more >
.NET SDK Support
The dotnet build command builds the project and its dependencies into a set of ... Runs the tests in blame mode and collects...
Read more >
Generating a dump file when tests hang on a CI machine
In this post, I describe how to generate a dump when tests hang on a CI machine, so users can investigate issues easily....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found