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

Restore is failing with MSB3026 #34016

Closed
jaredpar opened this issue Mar 24, 2020 · 4 comments · Fixed by #34029
Closed

Restore is failing with MSB3026 #34016

jaredpar opened this issue Mar 24, 2020 · 4 comments · Fixed by #34029
Assignees
Labels
area-Infrastructure-libraries blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Milestone

Comments

@jaredpar
Copy link
Member

jaredpar commented Mar 24, 2020

Full error:

[error].packages\microsoft.dotnet.build.tasks.targetframework.sdk\5.0.0-beta.20171.1\build\BinPlace.targets(37,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Restore) Could not copy "F:\workspace_work\1\s.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.Globalization.Extensions.dll" to "F:\workspace_work\1\s\artifacts\bin\ref\net472\System.Globalization.Extensions.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'F:\workspace_work\1\s\artifacts\bin\ref\net472\System.Globalization.Extensions.dll' because it is being used by another process.

This is happening in both CI and official builds. The error is intermittent though. Seems like an underlying race in restore.

Build Kind Timeline Record
570811 PR #33953 Restore
570525 PR #33990 Restore
570426 PR #33485 Restore

Evaluated 100 builds
Impacted 3 bulids
Impacted 3 jobs

runfo search-timeline -d runtime -c 100 -pr -v "MSB3026" -m

@jaredpar jaredpar added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' intermittent labels Mar 24, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Mar 24, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@ericstj ericstj added area-Infrastructure-libraries and removed untriaged New issue has not been triaged by the area owner labels Mar 24, 2020
@ericstj ericstj added this to the 5.0 milestone Mar 24, 2020
@ericstj
Copy link
Member

ericstj commented Mar 24, 2020

This is the AllConfigurations build. I'm guessing this is a binclash in the build of our depprojs where two different projects are copying to the same path under artifacts. /cc @ViktorHofer @Anipik

@ericstj
Copy link
Member

ericstj commented Mar 24, 2020

So here's a binlog from a failing restore: https://dev.azure.com/dnceng/_apis/resources/Containers/3712946?itemPath=Windows_NT_Libraries%20Build%20Windows_NT%20allConfigurations%20x64%20Debug%2FRestore.binlog

Global
    ContinuousIntegrationBuild = True
    TreatWarningsAsErrors = true
    Configuration = Debug
    RepoRoot = F:\workspace\_work\1\s\
    DeployDeps = False
    Build = False
    Rebuild = False
    Test = False
    Pack = False
    IntegrationTest = False
    PerformanceTest = False
    ArchGroup = x64
    TargetArchitecture = x64
    subsetCategory = libraries
    BuildAllConfigurations = true
    RuntimeOS = win10
    RuntimeArtifactsPath = F:\workspace\_work\1\s/artifacts/transport/coreclr
    SkipTestRestore = true
    VersionsPropsPath = F:\workspace\_work\1\s\eng\Versions.props
    __DeployProjectOutput = False
    __BuildPhase = SolutionRestore
    _NETCORE_ENGINEERING_TELEMETRY = Restore
    DefaultBuildAllTarget = Build
    BuildAllProjects = true
    TargetFramework = net472
Copy
    Assembly = Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Parameters
        SourceFiles
            F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                TargetPath = System.IO.Compression.FileSystem.dll
        DestinationFiles
            F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                TargetPath = System.IO.Compression.FileSystem.dll
        SkipUnchangedFiles = True
        OverwriteReadOnlyFiles = True
        UseHardlinksIfPossible = True
    Creating hard link to copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll".
    OutputItems
        FileWrites
            F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                OriginalItemSpec = F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll
                TargetPath = System.IO.Compression.FileSystem.dll

Global
    ContinuousIntegrationBuild = True
    TreatWarningsAsErrors = true
    Configuration = Debug
    RepoRoot = F:\workspace\_work\1\s\
    DeployDeps = False
    Build = False
    Rebuild = False
    Test = False
    Pack = False
    IntegrationTest = False
    PerformanceTest = False
    ArchGroup = x64
    TargetArchitecture = x64
    subsetCategory = libraries
    BuildAllConfigurations = true
    RuntimeOS = win10
    RuntimeArtifactsPath = F:\workspace\_work\1\s/artifacts/transport/coreclr
    SkipTestRestore = true
    VersionsPropsPath = F:\workspace\_work\1\s\eng\Versions.props
    __DeployProjectOutput = False
    __BuildPhase = SolutionRestore
    _NETCORE_ENGINEERING_TELEMETRY = Restore
    DefaultBuildAllTarget = Build
    BuildAllProjects = true
    TargetFramework = netcoreapp5.0
Copy
    Assembly = Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Parameters
        SourceFiles
            F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                TargetPath = System.IO.Compression.FileSystem.dll
        DestinationFiles
            F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                TargetPath = System.IO.Compression.FileSystem.dll
        SkipUnchangedFiles = True
        OverwriteReadOnlyFiles = True
        UseHardlinksIfPossible = True
    Creating hard link to copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll".
    Could not use a link to copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll". Copying the file instead. Cannot create a file when that file already exists. (0x800700B7)
    Copying file from "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll".
    Errors
        F:\workspace\_work\1\s\.packages\microsoft.dotnet.build.tasks.targetframework.sdk\5.0.0-beta.20171.1\build\BinPlace.targets(37,5): error MSB3026: Could not copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll' because it is being used by another process.  [F:\workspace\_work\1\s\src\libraries\restore\netfx\netfx.depproj]
        F:\workspace\_work\1\s\.packages\microsoft.dotnet.build.tasks.targetframework.sdk\5.0.0-beta.20171.1\build\BinPlace.targets(37,5): error MSB3026: Could not copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll' because it is being used by another process.  [F:\workspace\_work\1\s\src\libraries\restore\netfx\netfx.depproj]
    Creating hard link to copy "F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll" to "F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll".
    OutputItems
        FileWrites
            F:\workspace\_work\1\s\artifacts\bin\ref\net472\System.IO.Compression.FileSystem.dll
                CopyToOutputDirectory = PreserveNewest
                OriginalItemSpec = F:\workspace\_work\1\s\.packages\microsoft.targetingpack.netframework.v4.7.2\1.0.0\lib\net472\System.IO.Compression.FileSystem.dll
                TargetPath = System.IO.Compression.FileSystem.dll

So the bug here is that netfx.depproj ends up copying the same file to the same directory when building for net472 and netcoreapp5.0.

@ericstj ericstj self-assigned this Mar 24, 2020
@ericstj
Copy link
Member

ericstj commented Mar 24, 2020

I'll make a fix for this.

@ghost ghost closed this as completed in #34029 Mar 25, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants