Skip to content

[release/6.0.1xx] Add some additional distros to the CI matrix - #12141

Merged
MichaelSimons merged 41 commits into
dotnet:release/6.0.1xxfrom
omajid:arpow-add-distros-to-ci-matrix
Dec 14, 2021
Merged

MichaelSimons merged 41 commits into
dotnet:release/6.0.1xxfrom
omajid:arpow-add-distros-to-ci-matrix

Conversation

@omajid

@omajid omajid commented Sep 26, 2021

Copy link
Copy Markdown
Member

I don't expect this to pass CI right now. I am mostly looking to understand the failures.

  • The prebuilts are architecture specific and I don't know if they will work on anything other than x64
  • The prebuilts require some libraries and possibly a glibc version that's too high for some platforms.

See dotnet/source-build#2299

@omajid

omajid commented Sep 26, 2021

Copy link
Copy Markdown
Member Author

The source-build tarball wont build on a bunch of platforms we care about.

For CentOS 7, the bootstrap tools were built with a too-new version of glibc:

artifacts/source-build/self/package-cache/runtime.linux-x64.microsoft.netcore.ilasm/6.0.0-rc.2.21459.6/runtimes/linux-x64/native/ilasm: /lib64/libc.so.6: version `GLIBC_2.28' not found

For CentOS 8, we don't have a libunwind we can use:

artifacts/source-build/self/package-cache/runtime.linux-x64.microsoft.netcore.ilasm/6.0.0-rc.2.21459.6/runtimes/linux-x64/native/ilasm: error while loading shared libraries: libunwind-x86_64.so.8: cannot open shared object file: No such file or directory

Fedora 34 fails with a file not being found:

  realpath(/tarball/src/linker.60e655fc7089f6123e61fede21bf99bd1d819713/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat/6.0.0-beta.21427.6/build//../tools/netcoreapp3.1/Microsoft.DotNet.ApiCompat.dll) failed: Operation not permitted
  Could not execute because the specified command or file was not found.

(I dont really understand this because I can build this locally just fine on Fedora 34).

Ubuntu 16.04 and 21.04 don't have curl:

ERROR: curl not found. Exiting..

@omajid

omajid commented Sep 26, 2021

Copy link
Copy Markdown
Member Author

cc @crummel @dleeapho @dseefeld @lbussell @MichaelSimons @tmds because it turns out bootstrapping ArPow 6.0 is broken for RHEL :(

@tmds

tmds commented Sep 27, 2021 •

Copy link
Copy Markdown
Member

For CentOS 7, the bootstrap tools were built with a too-new version of glibc:
For CentOS 8, we don't have a libunwind we can use:

The rc1 package on nuget.org is a portable one (no libunwind dependency) that doesn't need such a high glibc version.

Has this regressed from rc1 to this rc2 package?
Or, why doesn't source-build use the 'official' Microsoft package to bootstrap?

realpath(/tarball/src/linker.60e655fc7089f6123e61fede21bf99bd1d819713/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat/6.0.0-beta.21427.6/build//../tools/netcoreapp3.1/Microsoft.DotNet.ApiCompat.dll) failed: Operation not permitted
Could not execute because the specified command or file was not found.

What is built when this happens?
Do we actually need Microsoft.DotNet.ApiCompat in source-build?
Is the file not there, or is it not accessible?

@omajid

omajid commented Sep 27, 2021 •

Copy link
Copy Markdown
Member Author

Has this regressed from rc1 to this rc2 package?

Yes but also no. The upstream/portable package in RC 2 (runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg) still has no dependency on libunwind:

$ wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2//runtime.linux-x64.Microsoft.NETCore.ILAsm/6.0.0-rc.2.21459.6/runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg
$ ls
runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg
$ unzip runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg 
Archive:  runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg
  inflating: _rels/.rels             
  inflating: runtime.linux-x64.Microsoft.NETCore.ILAsm.nuspec  
  inflating: Icon.png                
  inflating: LICENSE.TXT             
  inflating: runtimes/linux-x64/native/ilasm  
  inflating: THIRD-PARTY-NOTICES.TXT  
  inflating: [Content_Types].xml     
  inflating: package/services/metadata/core-properties/fc3762356c9d47ada6ab25b0baebf072.psmdcp  
$ find -iname ilasm
./runtimes/linux-x64/native/ilasm
$ chmod +rx ./runtimes/linux-x64/native/ilasm
$ ldd ./runtimes/linux-x64/native/ilasm
        linux-vdso.so.1 (0x00007ffea3bb7000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f957e1d0000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f957e1b5000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f957e194000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f957e189000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f957df6a000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f957de26000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f957dc55000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f957e8cd000)

It's the package in previously-source-built packages that was built with a different OS baseline and dependencies.

Or, why doesn't source-build use the 'official' Microsoft package to bootstrap?

I don't know. Can someone help me find the build steps to recreate the previously-source-built packages locally?

@tmds

tmds commented Sep 27, 2021

Copy link
Copy Markdown
Member

The upstream/portable package in RC 2 (runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg) still has no dependency on libunwind:

You can use that one for bootstrapping.

previously-source-built packages

For bootstrapping to work across a range of distros we need the real portable linux-x64. It would be hard to source-build it because it needs a specific environment to work (like the old glibc). I expect source-build to just copy what Microsoft built as linux-x64.

Anything that gets built by us after that and gets linux-x64 in its name is not really as portable as what Microsoft built.

@omajid

omajid commented Sep 27, 2021

Copy link
Copy Markdown
Member Author

You can use that one for bootstrapping.

Tried it out; didn't quite work: dotnet/source-build#2477 (comment)

@MichaelSimons

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@omajid

omajid commented Sep 29, 2021

Copy link
Copy Markdown
Member Author

Heh. /azp run didn't run any of my newly-added jobs? Should I change my commit to force a rebuild of those jobs?

@MichaelSimons

MichaelSimons commented Sep 29, 2021 •

Copy link
Copy Markdown
Member

They will run - the fact that they are shown as passing/failing is broken AzDO functionality IMO. The reason their status doesn't change initially is because they are jobs that depend on other jobs (e.g. the create tarball job). Their status doesn't change until they actually get run.

If you look you will see the existing Build Fedora jobs show as passing (their previous status) right away.

@omajid

omajid commented Sep 29, 2021 •

Copy link
Copy Markdown
Member Author

To workaround this set of API compat errors, I had to add /p:EnablePackageValidation=false to runtime's SourceBuild.props. Is that a safe fix for source-build? Should I open a PR against runtime to start applying that in SourceBuild.props?

@dseefeld

Copy link
Copy Markdown

[Triage]: It appears that previously source-built packages may need to be built separately per distro. Or another alternative is to build previously source-built packages on the distro with the oldest version of glibc so portable packages are actually portable across all distros.

@omajid
omajid force-pushed the arpow-add-distros-to-ci-matrix branch from acdb29c to a8f7b8c Compare October 6, 2021 22:50
@omajid omajid changed the title [release/6.0.1xx-rc2] Add some additional distros to the CI matrix [release/6.0.1xx] Add some additional distros to the CI matrix Oct 6, 2021
@omajid
omajid changed the base branch from release/6.0.1xx-rc2 to release/6.0.1xx October 6, 2021 22:51
@omajid
omajid marked this pull request as ready for review October 7, 2021 02:51
@omajid
omajid requested a review from a team as a code owner October 7, 2021 02:51
@dseefeld

dseefeld commented Oct 7, 2021

Copy link
Copy Markdown

This is blocked on tarball build running in release/6.0.1xx. #12245

@MichaelSimons
MichaelSimons force-pushed the arpow-add-distros-to-ci-matrix branch from 5b6065a to 8a56fcc Compare October 7, 2021 23:13
@MichaelSimons
MichaelSimons force-pushed the arpow-add-distros-to-ci-matrix branch from 8a56fcc to dd7430b Compare October 8, 2021 16:15
@MichaelSimons
MichaelSimons force-pushed the arpow-add-distros-to-ci-matrix branch from dd7430b to e322bc4 Compare October 8, 2021 16:21
@MichaelSimons
MichaelSimons force-pushed the arpow-add-distros-to-ci-matrix branch from 6d52eac to d89f734 Compare October 12, 2021 19:49
@MichaelSimons

Copy link
Copy Markdown
Member

testingDir="$SCRIPT_ROOT/testing-smoke"
cliDir="$testingDir/builtCli"
logFile="$testingDir/smoke-test.log"
logsDir="$testingDir/logs"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file are to collect all of the logs in a common folder. This is convenient for collection purposes as well as it enhances the dev UX as they don't pollute the top level folder w/logs.


# Run restore on project to initiate download of bootstrap packages
$DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl /p:ArchiveDir="$SCRIPT_ROOT/packages/archive/"
$DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$SCRIPT_ROOT/packages/archive/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change cleans up some log files that were getting created at the tarball's root.

export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export NUGET_PACKAGES=$restoredPackagesDir/

LogDateStamp=$(date +"%m%d%H%M%S")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes cleanup some log files that were getting created at the tarball's root.

@MichaelSimons
MichaelSimons requested a review from a team December 14, 2021 15:43
@MichaelSimons
MichaelSimons merged commit 4e9a0b6 into dotnet:release/6.0.1xx Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants