Skip to content

Trimming tests fail with race condition #40398

@safern

Description

@safern
/Users/runner/work/1/s/.dotnet/sdk/5.0.100-preview.8.20362.3/Microsoft.Common.CurrentVersion.targets(4187,5): error MSB3026: Could not copy "/Users/runner/work/1/s/artifacts/obj/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll" to "/Users/runner/work/1/s/artifacts/bin/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/obj/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj] [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/Microsoft.Extensions.Options.TrimmingTests.proj]
/Users/runner/work/1/s/.dotnet/sdk/5.0.100-preview.8.20362.3/Microsoft.Common.CurrentVersion.targets(4187,5): error MSB3026: Could not copy "/Users/runner/work/1/s/artifacts/obj/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll" to "/Users/runner/work/1/s/artifacts/bin/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll". Beginning retry 1 in 1000ms. The process cannot access the file '/Users/runner/work/1/s/artifacts/obj/Microsoft.Extensions.DependencyInjection/net5.0-Release/Microsoft.Extensions.DependencyInjection.dll' because it is being used by another process.  [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj] [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/Microsoft.Extensions.Options.TrimmingTests.proj]
/Users/runner/work/1/s/eng/testing/linker/trimmingTests.targets(102,5): error MSB3073: The command ""/Users/runner/work/1/s/.dotnet/dotnet" build /t:PublishTrimmed /nr:false /warnaserror -p:configuration=Release " exited with code -1. [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/Microsoft.Extensions.Options.TrimmingTests.proj]

It seems like 2 tests have a P2P to Microsoft.Extensions.DependencyInjection and for some reason it is trying to copy it from obj to bin at the same time.

Here is the binlog of the failure:
https://dev.azure.com/dnceng/_apis/resources/Containers/4760213/Logs_Build_OSX__x64_release_Runtime_Release?itemPath=Logs_Build_OSX__x64_release_Runtime_Release%2FRelease%2FTrimmingTests.binlog

Failed here: https://dev.azure.com/dnceng/public/_build/results?buildId=758123&view=logs&j=94422687-3fa3-516b-cf3b-23eb810befab&t=0015de85-1e1c-5c80-f8e6-95054477de01

cc: @eerhardt @joperezr

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions