-
Notifications
You must be signed in to change notification settings - Fork 388
Running coverlet global tool over dotnet build intermittently fails to open file when calculating coverage #491
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
Comments
Sometimes you'll get a different crash (with the same exception) when the instrumentation tracker in MSBuild loses the race and can't access the hits file to save the data on the shutdown of the |
Could you post some more info about the error you're getting? I think we're getting an error which sounds similar to what you described in our Azure Devops pipeline, see below...
|
I don't know if they are same problem, we have a know issue for `Unable to read... "#210 that should be fixed by collectors, I'm OOF at the moment I'll take a look next week, sorry for the delay guys and thanks for help on investigation |
The issue that I found seemed to be caused by the fact that
I worked around it for me by running the build process with |
Thanks for that, I've added the -m:1 flag to the dotnet build step of our Azure Devops pipeline and based on initial tests it seems to have solved the issue. I couldn't find any docs on how exactly that flag works though. |
@cbroxton I'm hitting the same issue. Can you explain what you mean but adding the -m:1 flag? Adding it where? I am looking at the docs and it doesn't seem to exist. |
|
The process cannot access the file 'C:\agent_work\6\s\test\TestApp.EndToEnd.Tests\bin\Debug\netcoreapp3.0\BlazorState.dll' because it is being used by another process. Still happens with the maxcpucount set to 1 If anyone cares to review.... https://timewarpenterprises.visualstudio.com/Blazor-State/_build/results?buildId=593 |
@StevenTCramer any news? |
In my project https://github.com/SharpGenTools/SharpGenTools I've recently switched to using Coverlet for my code-coverage instrumentation. I've been encountering an intermittent issue where the Coverlet global tool is unable to open the hits file since it is being used by another process.
This only happens when I'm using the Coverlet global tool to instrument my MSBuild tasks while running
dotnet build
.Here's the repro steps that I have:
./build ; ./test
. That will build SharpGenTools and then run the tests. It will likely fail to build the outerloop tests because the process will be unable to access the hits file.Alternatively, run the following commands from the cloned build:
The last command will fail with the issue.
I can also privately send you a minidump reproing the issue if you want.
The text was updated successfully, but these errors were encountered: