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

'The "Microsoft.DotNet.Compatibility.ValidatePackage" task failed unexpectedly' in libs legs #59908

Closed
am11 opened this issue Oct 3, 2021 · 16 comments · Fixed by #60847
Closed

Comments

@am11
Copy link
Member

am11 commented Oct 3, 2021

Logs from Build Linux x64 release SourceBuild: https://dev.azure.com/dnceng/public/_build/results?buildId=1400355&view=logs&jobId=000ba8e3-34f8-51d2-8d06-9b61f10256d0&j=000ba8e3-34f8-51d2-8d06-9b61f10256d0&t=ca9b6e26-8c16-57f9-673e-2bc0dc655f25

 /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: The "Microsoft.DotNet.Compatibility.ValidatePackage" task failed unexpectedly. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: System.TypeLoadException: Method 'CompareSourceLocations' in type 'Microsoft.CodeAnalysis.CSharp.CSharpCompilation' from assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.ApiCompatibility.AssemblySymbolLoader..ctor(Boolean resolveAssemblyReferences) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.GetAssemblySymbolFromStream(Stream assemblyStream, MetadataInformation assemblyInformation, Boolean& resolvedReferences) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 111 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.RunApiCompat() in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.CompatibleFrameworkInPackageValidator.Validate(Package package) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/CompatibleFrameworkInPackageValidator.cs:line 62 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.ExecuteCore() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 92 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.Execute() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
    System.Security.Cryptography.X509Certificates -> /__w/1/s/artifacts/source-build/self/src/artifacts/bin/System.Security.Cryptography.X509Certificates/net7.0-Unix-Release/System.Security.Cryptography.X509Certificates.dll

Runfo Tracking Issue: Microsoft.DotNet.Compatibility.ValidatePackage failing

Definition Build Kind Job Name
runtime 1403534 PR 57398 Libraries Build windows allConfigurations x64 Debug
runtime 1403534 PR 57398 Libraries Build windows allConfigurations x64 Debug
runtime 1403534 PR 57398 Libraries Build windows allConfigurations x64 Debug
runtime 1403381 PR 59992 Libraries Build windows allConfigurations x64 Debug
runtime 1403381 PR 59992 Libraries Build windows allConfigurations x64 Debug
runtime 1403056 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1403056 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1402102 PR 59969 Libraries Build windows allConfigurations x64 Debug
runtime 1402102 PR 59969 Libraries Build windows allConfigurations x64 Debug
runtime 1402102 PR 59969 Libraries Build windows allConfigurations x64 Debug
runtime 1402102 PR 59969 Libraries Build windows allConfigurations x64 Debug
runtime 1402102 PR 59969 Libraries Build windows allConfigurations x64 Debug
runtime 1401747 PR 59767 Libraries Build windows allConfigurations x64 Debug
runtime 1401747 PR 59767 Libraries Build windows allConfigurations x64 Debug
runtime 1401747 PR 59767 Libraries Build windows allConfigurations x64 Debug
runtime 1401747 PR 59767 Libraries Build windows allConfigurations x64 Debug
runtime 1401651 PR 59579 Libraries Build windows allConfigurations x64 Debug
runtime 1401651 PR 59579 Libraries Build windows allConfigurations x64 Debug
runtime 1401651 PR 59579 Libraries Build windows allConfigurations x64 Debug
runtime 1401651 PR 59579 Libraries Build windows allConfigurations x64 Debug
runtime 1400858 PR 59846 Libraries Build windows allConfigurations x64 Debug
runtime 1400858 PR 59846 Libraries Build windows allConfigurations x64 Debug
runtime 1400858 PR 59846 Libraries Build windows allConfigurations x64 Debug
runtime 1400838 PR 59915 Libraries Build windows allConfigurations x64 Debug
runtime 1400838 PR 59915 Libraries Build windows allConfigurations x64 Debug
runtime 1400838 PR 59915 Libraries Build windows allConfigurations x64 Debug
runtime 1400838 PR 59915 Libraries Build windows allConfigurations x64 Debug
runtime 1400838 PR 59915 Libraries Build windows allConfigurations x64 Debug
runtime 1400529 PR 59914 Libraries Build windows allConfigurations x64 Debug
runtime 1400529 PR 59914 Libraries Build windows allConfigurations x64 Debug
runtime 1400529 PR 59914 Libraries Build windows allConfigurations x64 Debug
runtime 1400490 PR 59847 Libraries Build windows allConfigurations x64 Debug
runtime 1400490 PR 59847 Libraries Build windows allConfigurations x64 Debug
runtime 1400490 PR 59847 Libraries Build windows allConfigurations x64 Debug
runtime 1400490 PR 59847 Libraries Build windows allConfigurations x64 Debug
runtime 1400452 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1400452 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1400452 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1400452 Rolling Libraries Build windows allConfigurations x64 Release
runtime 1400431 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400431 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400431 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400431 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400119 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400119 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400119 PR 59905 Libraries Build windows allConfigurations x64 Debug
runtime 1400119 PR 59905 Libraries Build windows allConfigurations x64 Debug

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
0 0 13
@dotnet-issue-labeler dotnet-issue-labeler bot added area-HostModel Microsoft.NET.HostModel issues untriaged New issue has not been triaged by the area owner labels Oct 3, 2021
@ghost
Copy link

ghost commented Oct 3, 2021

Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.

Issue Details

Logs from https://dev.azure.com/dnceng/public/_build/results?buildId=1400355&view=logs&jobId=000ba8e3-34f8-51d2-8d06-9b61f10256d0&j=000ba8e3-34f8-51d2-8d06-9b61f10256d0&t=ca9b6e26-8c16-57f9-673e-2bc0dc655f25

 /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: The "Microsoft.DotNet.Compatibility.ValidatePackage" task failed unexpectedly. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: System.TypeLoadException: Method 'CompareSourceLocations' in type 'Microsoft.CodeAnalysis.CSharp.CSharpCompilation' from assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.ApiCompatibility.AssemblySymbolLoader..ctor(Boolean resolveAssemblyReferences) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.GetAssemblySymbolFromStream(Stream assemblyStream, MetadataInformation assemblyInformation, Boolean& resolvedReferences) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 111 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.RunApiCompat() in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.CompatibleFrameworkInPackageValidator.Validate(Package package) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/CompatibleFrameworkInPackageValidator.cs:line 62 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.ExecuteCore() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 92 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.Execute() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
    System.Security.Cryptography.X509Certificates -> /__w/1/s/artifacts/source-build/self/src/artifacts/bin/System.Security.Cryptography.X509Certificates/net7.0-Unix-Release/System.Security.Cryptography.X509Certificates.dll
Author: am11
Assignees: -
Labels:

area-HostModel, untriaged

Milestone: -

@jkoritzinsky jkoritzinsky added area-Infrastructure-libraries source-build Issues relating to dotnet/source-build and removed area-HostModel Microsoft.NET.HostModel issues labels Oct 3, 2021
@ghost
Copy link

ghost commented Oct 3, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

Logs from Build Linux x64 release SourceBuild: https://dev.azure.com/dnceng/public/_build/results?buildId=1400355&view=logs&jobId=000ba8e3-34f8-51d2-8d06-9b61f10256d0&j=000ba8e3-34f8-51d2-8d06-9b61f10256d0&t=ca9b6e26-8c16-57f9-673e-2bc0dc655f25

 /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: The "Microsoft.DotNet.Compatibility.ValidatePackage" task failed unexpectedly. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018: System.TypeLoadException: Method 'CompareSourceLocations' in type 'Microsoft.CodeAnalysis.CSharp.CSharpCompilation' from assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.ApiCompatibility.AssemblySymbolLoader..ctor(Boolean resolveAssemblyReferences) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.GetAssemblySymbolFromStream(Stream assemblyStream, MetadataInformation assemblyInformation, Boolean& resolvedReferences) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 111 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.ApiCompatRunner.RunApiCompat() in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/ApiCompatRunner.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.PackageValidation.CompatibleFrameworkInPackageValidator.Validate(Package package) in /_/src/Compatibility/Microsoft.DotNet.PackageValidation/CompatibleFrameworkInPackageValidator.cs:line 62 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.ExecuteCore() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 92 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() in /_/src/Tasks/Common/TaskBase.cs:line 38 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.DotNet.Compatibility.ValidatePackage.Execute() in /_/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs:line 49 [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
  /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.1.21459.41/build/Microsoft.NET.Compatibility.Common.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/__w/1/s/artifacts/source-build/self/src/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj]
    System.Security.Cryptography.X509Certificates -> /__w/1/s/artifacts/source-build/self/src/artifacts/bin/System.Security.Cryptography.X509Certificates/net7.0-Unix-Release/System.Security.Cryptography.X509Certificates.dll
Author: am11
Assignees: -
Labels:

area-Infrastructure-libraries, source-build, untriaged

Milestone: -

@jkoritzinsky jkoritzinsky added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' and removed source-build Issues relating to dotnet/source-build labels Oct 3, 2021
@safern
Copy link
Member

safern commented Oct 4, 2021

Seems like a Roslyn update could've broken the package validation task? I will try to repro locally tomorrow.

cc: @Anipik @ericstj

@ericstj
Copy link
Member

ericstj commented Oct 4, 2021

Abstract member added here? dotnet/roslyn@7f5a439

Is it possible we're loading old derived class and newer base class? cc @sharwell

@ericstj
Copy link
Member

ericstj commented Oct 4, 2021

Could have something to do with https://github.com/dotnet/sdk/blob/8e652a081d0dd2c68ca377e5b7514a6b73e05ebd/src/Compatibility/Microsoft.DotNet.Compatibility/ValidatePackage.cs#L106-L120 and someone already loading a different copy of one of those assemblies in the process. My guess is we have some other task which uses Microsoft.CodeAnalysis and we started loading a newer version of the 4.0.0.0 assembly with the newer abstract member, while the ValidatePackage is loading an older copy of Microsoft.CodeAnalysis.CSharp without the change.

We should find out the reason for the mismatch then decide what needs to change to avoid it.

@safern
Copy link
Member

safern commented Oct 4, 2021

Thanks @ericstj, that's helpful info. I'm looking into this now.

@ViktorHofer
Copy link
Member

Question as I was not following the flow here closely. How did the official and presumably the rolling builds regress? Did a commit went into main that upgraded the Compatibility package? If so, should we revert that asap to unblock official builds? We are currently at 0% pass rate.

@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Oct 5, 2021
@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label Oct 5, 2021
@safern
Copy link
Member

safern commented Oct 5, 2021

@ViktorHofer that is what I'm trying to figure out 😄 . I was able to repro but haven't found the culprit, still investigating.

@safern
Copy link
Member

safern commented Oct 5, 2021

There was a breaking change in between these 2 versions where an abstract and an interface member were added and unfortunately there is a race condition (I haven't found where), that sometimes Microsoft.CodeAnalysis is loaded from the SDK before we call the package validation task, and then in the package validation task we load Microsoft.CodeAnalysis.CSharp from the compiler package, which depends on these new members defined on Microsoft.CodeAnalysis but since we are loading it from the SDK for some reason, those members are not found and hence the crash.

PackageValidationError

This started happening since we updated arcade on Friday and we consumed the newer version of the compiler package containing these new members. I submitted #60026 to pin the version and mitigate the issue while I find a long term fix.

@safern
Copy link
Member

safern commented Oct 5, 2021

The mitigation is merged, I will remove blocking-clean-* labels but will keep the issue open until I find a long term solution.

@safern safern removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' blocking-official-build labels Oct 5, 2021
@jkoritzinsky
Copy link
Member

jkoritzinsky commented Oct 22, 2021

We're hitting another variant of this as part of the SDK upgrade to RC2. I'll try to work around it by matching the compiler toolset package to the version in the SDK. We definitely need to figure this out, it keeps us from bumping up the compiler version (something we could do without an infra rollout) without bumping the SDK version (something that requires a rollout and only releases monthly at most anyway).

https://dev.azure.com/dnceng/public/_build/results?buildId=1435589&view=logs&jobId=000ba8e3-34f8-51d2-8d06-9b61f10256d0&j=000ba8e3-34f8-51d2-8d06-9b61f10256d0&t=ca9b6e26-8c16-57f9-673e-2bc0dc655f25

@safern
Copy link
Member

safern commented Oct 22, 2021

@jkoritzinsky I've figured out the issue. I'm working on a fix that should be out soon into the SDK repository. The problem is that a condition on the package targets is causing different codeanalysis dlls to be loaded from different locations for different projects and also we are running package validation on runtime.native.System.IO.Ports.pkgproj which is a native package and hence Microsoft.CodeAnalysis.CSharp is not loaded only Microsoft.CodeAnalysis and it is loaded from the SDK path rather than the compilers toolset package because of these targets wrong condition, so that is causing the miss matches. I will put a PR out soon and then we can unpin de compilers package and update the Microsoft.DotNet.Compatibility package version to the one with the fix.

@safern
Copy link
Member

safern commented Oct 22, 2021

Fix is out, once we get a new version of the package out, I'll update it and unpin the compiler version: dotnet/sdk#22277

@ViktorHofer
Copy link
Member

The package with the fix is already available. Do you plan to open a PR? Asking as we could then remove the pinning of the compiler here: #60256.

@ViktorHofer ViktorHofer modified the milestones: 6.0.0, 7.0.0 Oct 25, 2021
@safern
Copy link
Member

safern commented Oct 25, 2021

The package with the fix is already available. Do you plan to open a PR? Asking as we could then remove the pinning of the compiler here: #60256.

Yes I will put up a PR to update the package and remove the pinning of the compiler.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants