You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linux and Linux-MUSL Package artifacts getting produced with duplicate RIDs #45027
Thanks @safern. I cannot access the engineering repo link, but all CI checks were passing when PR was completed. It could be that some target does not run during the CI builds?
This was happening on an official build which is internal (Where we produce and sign our packages). Still investigating. I'll update the issue once I have more info.
So for more context on this. Some of the packages produced in the linux-musl legs contain the wrong RID when produced:
Microsoft.NETCore.DotNetHostResolver -> /root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.DotNetHostResolver.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetHost -> /root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.DotNetHost.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetHostPolicy -> /root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.DotNetHostPolicy.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetHost -> /root/runtime/artifacts/packages/Release/Shipping/runtime.linux-arm64.Microsoft.NETCore.DotNetHost.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetHostPolicy -> /root/runtime/artifacts/packages/Release/Shipping/runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetHostResolver -> /root/runtime/artifacts/packages/Release/Shipping/runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetAppHost -> /root/runtime/artifacts/packages/Release/Shipping/runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.DotNetAppHost -> /root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.DotNetAppHost.6.0.0-alpha.1.20570.6.nupkg
Microsoft.NETCore.App.Ref ->
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Ref.6.0.0-alpha.1.20570.6.nupkg'.
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Ref.6.0.0-alpha.1.20570.6.symbols.nupkg'.
Microsoft.NETCore.App.Runtime ->
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm64.6.0.0-alpha.1.20570.6.nupkg'.
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm64.6.0.0-alpha.1.20570.6.symbols.nupkg'.
Microsoft.NETCore.App.Host ->
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Host.linux-musl-arm64.6.0.0-alpha.1.20570.6.nupkg'.
Successfully created package '/root/runtime/artifacts/packages/Release/Shipping/Microsoft.NETCore.App.Host.linux-musl-arm64.6.0.0-alpha.1.20570.6.symbols.nupkg'.
If you look at that, some do have linux-musl-arm64 RID and some linux-arm64 missing the -musl part. What is confusing me, is that we're specifying /p:OutputRid=linux-musl-arm64 globally.
Thanks for the investigation, @safern.
(i just pulled ubuntu-18.04-cross-arm64-alpine container)
I have understood the problem. Before the change; in non-installer components:
PackageRID is used for package restore, which in case of cross-compilation is the RID of host OS.
OutputRid (different casing) is used for packages, RID of target OS.
In installer, PackageRID had mixed meanings (when used for restore, it is Host's RID, when used under pkg/ directories, it was OutputRid), while OutputRid had consistent meaning.
Yeah, that is exactly what I was going to comment right now. PackageRID is correct and should stay as is. I found out that linux_musl_x64 is producing the right packages, because it is not a cross build, so the PackageRID is linux_musl_x64, because the host is an alpine container, however for arm builds of alpine the host is ubuntu so PackageRID is linux_x64.
So yeah, the right fix is #1. Are you planning on putting a PR? If not I can put it out there now.
Activity
safern commentedon Nov 20, 2020
Thanks, @MattGal -- I'll put up a fix soon.
FYI: @am11 @ViktorHofer
am11 commentedon Nov 20, 2020
Thanks @safern. I cannot access the engineering repo link, but all CI checks were passing when PR was completed. It could be that some target does not run during the CI builds?
safern commentedon Nov 20, 2020
This was happening on an official build which is internal (Where we produce and sign our packages). Still investigating. I'll update the issue once I have more info.
safern commentedon Nov 20, 2020
So for more context on this. Some of the packages produced in the linux-musl legs contain the wrong RID when produced:
If you look at that, some do have
linux-musl-arm64RID and somelinux-arm64missing the-muslpart. What is confusing me, is that we're specifying/p:OutputRid=linux-musl-arm64globally.Some thing that I do see, is that this might be wrong: https://github.com/dotnet/runtime/pull/43804/files#diff-aec399247327507f8a921926dfa34e159e9786455234791d9895fe64185d91f2R155
As, that is setting OutputRid when Portable=true to
_outputRID, however_outputRIDdoesn't considerlinux-muslat all. The only case wherelinux-muslis considered is:portableOS... https://github.com/dotnet/runtime/pull/43804/files#diff-aec399247327507f8a921926dfa34e159e9786455234791d9895fe64185d91f2R91 which is ignored completely for the PortableBuild output rid.am11 commentedon Nov 20, 2020
That part seem to be aligned with the older version: https://github.com/dotnet/runtime/pull/43804/files#diff-c69fd8bc3ea99b48dac09936c142064d7e750d2c626a7e9286384d94ef31fa2dL60.
Tested with
./build.sh -c Release -cross /p:OutputRid=linux-musl-arm64 /v:diag | grep " OutputRid =", we getcould be somewhere else in signing target.
safern commentedon Nov 20, 2020
Yeah, I just validated this.
OutputRidis correct. The problem isPackageRID.So basically, we have two models here under installer. The regular packages that are built by:
runtime/src/installer/pkg/projects/host-packages.proj
Line 9 in 07193b8
That uses
PackageRIDto set thePackageTargetRuntimeproperty which is what then calculates the output ID for those packages:https://github.com/dotnet/arcade/blob/4eff4ec03f24b6208d51a372842470a222fa373b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets#L28_L32
We also have the framework packages which are driven by the shared framework SDK in the sfxproj's. Those use
OutputRidthat is why they're getting the right output RID. Which useRuntimeIdentifier: https://github.com/dotnet/arcade/blob/d1a58bc7ed005abe2d609245adefe3de4dff5c12/src/Microsoft.DotNet.SharedFramework.Sdk/targets/Microsoft.DotNet.SharedFramework.Sdk.targets#L93https://github.com/dotnet/arcade/blob/d1a58bc7ed005abe2d609245adefe3de4dff5c12/src/Microsoft.DotNet.SharedFramework.Sdk/targets/Microsoft.DotNet.SharedFramework.Sdk.targets#L98
And
RuntimeIdentifieris set toOutputRid:runtime/src/installer/Directory.Build.props
Line 61 in 75c0b99
PackageRIDis used in other places, i.e:runtime/src/installer/pkg/projects/Directory.Build.props
Line 103 in 75c0b99
https://github.com/dotnet/runtime/search?q=PackageRID
It seems like after your change, PackageRID will never have the
linux-muslprefix, which it used to have in various cases: https://github.com/dotnet/runtime/pull/43804/files#diff-6952310dc69d6c06f01efd35042d5168dfd1faa9dcfd4b8b5dce9e01a828dc0dL148The reason why it worked before is because of this:
https://github.com/dotnet/runtime/pull/43804/files#diff-1d3554b1a5d588d73d6b8b4fd8203e48c4ba0fba262ca4cc290e341b47593985L142
It would get a linux-musl prefix here:
https://github.com/dotnet/runtime/pull/43804/files#diff-1d3554b1a5d588d73d6b8b4fd8203e48c4ba0fba262ca4cc290e341b47593985L100
I think there are 2 things we need to do here:
OutputRidinsteadPackageRIDto havelinux-muslwhen it must have it.am11 commentedon Nov 20, 2020
Thanks for the investigation, @safern.
(i just pulled
ubuntu-18.04-cross-arm64-alpinecontainer)I have understood the problem. Before the change; in non-installer components:
In installer, PackageRID had mixed meanings (when used for restore, it is Host's RID, when used under pkg/ directories, it was OutputRid), while OutputRid had consistent meaning.
PR aligned the meaning of these two properties.
So I think your #1 is the better option.
safern commentedon Nov 20, 2020
Yeah, that is exactly what I was going to comment right now.
PackageRIDis correct and should stay as is. I found out thatlinux_musl_x64is producing the right packages, because it is not a cross build, so thePackageRIDislinux_musl_x64, because the host is an alpine container, however forarmbuilds of alpine the host isubuntusoPackageRIDislinux_x64.So yeah, the right fix is #1. Are you planning on putting a PR? If not I can put it out there now.
am11 commentedon Nov 20, 2020
Yup, I have just found from build logs how to repro it in local container. Testing it right now, will put a PR soon.
safern commentedon Nov 20, 2020
Thanks 😄
safern commentedon Nov 21, 2020
Fixed by: #45041