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

Visual Studio Test Platform Installer version 16.8.0 produces a crash dump executing Visual Studio Test task #2632

Closed
pbarbero opened this issue Nov 13, 2020 · 8 comments

Comments

@pbarbero
Copy link

Description

There is a problem using Visual Studio Test Platform Installer Azure Devops Task, selecting version lastest stable version (16.8.0) of Visual Studio Test Platform Installer Azure Devops Task causes a crash dump file when running Visual Studio Test task, but the task ends green and the unit tests pass.

Selecting 16.7.1 version works, generating code coverage file as expected.

Steps to reproduce

  1. Select latest version for Visual Studio Test Platform Installer Azure Devops Task

image

  1. Runs Visual Studio Test task after this step over a Test project

image

  1. Unit tests pass, but code coverage file is not generated, code coverage is missing in build results and you can see in the logs the crash dump file

image

Environments

These tasks are executed in a self-hosted pool

@Sanan07
Copy link
Contributor

Sanan07 commented Nov 13, 2020

@pbarbero Could you please provide that crash dump file?
Adding @jakubch1

@pbarbero
Copy link
Author

@Sanan07
Copy link
Contributor

Sanan07 commented Nov 13, 2020

From my quick analysis of dump file mscoreei.dll caused a crash. Not sure if Code Coverage interact with it.
@jakubch1 should have better understanding.

@jakubch1
Copy link
Member

jakubch1 commented Nov 18, 2020

@pbarbero could you please try generating runsettings file with Code Coverage configuration?

In the file please specify which binaries you want to instrument like this:

<ModulePaths>
  <Include>
   <ModulePath>.*Fabrikam.Math.dll</ModulePath>
   <!-- Add more ModulePath nodes here. -->
  </Include>
</ModulePaths>

Please let us know if this helps.

I suspect Code Coverage is instrumenting some system binaries.

More info:
https://docs.microsoft.com/en-us/visualstudio/test/customizing-code-coverage-analysis?view=vs-2019

@nohwnd
Copy link
Member

nohwnd commented Nov 18, 2020

#2641 the crash dump is probably caused by this bug, which causes the crash dumper to always produce a crash dump when used on Windows, with runtime earlier than net5.0.

@pbarbero
Copy link
Author

Hi @jakubch1 , sorry for the delay.

The runsettings file looks like this

 <ModulePaths>
              <Include>
                <ModulePath>.*\.dll$</ModulePath>
                <ModulePath>.*\.exe$</ModulePath>
              </Include>

Is this something we can customize vía the Visual Studio Test task?

Thanks a lot

@jakubch1
Copy link
Member

@pbarbero yes. You should be able to set Settings file to file from your repository.
Please set it up to contain only assemblies that you want to get code coverage for:

 <ModulePaths>
              <Include>
                <ModulePath>.*YourDllName1\.dll$</ModulePath>
                <ModulePath>.*YourDllName2\.dll$</ModulePath>
              </Include>

by this you will have better performance and shouldn't get any issues with instrumentation.
But as @nohwnd said please try using 16.9.0-preview-20201123-03 version of TestPlatform.

@nohwnd
Copy link
Member

nohwnd commented Jun 2, 2021

The version with the fix has been released for quite a while. Closing this as there is no activity, and solutions/workarounds were provided.

@nohwnd nohwnd closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants