Skip to content

Conversation

@anphel31
Copy link
Member

@anphel31 anphel31 commented Apr 13, 2022

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/tools/cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?
Fix a few issues with the kernel specs related to a build hang.

  1. Resolve a build hang issue seen with kernel. Previously having "%exclude %{_libdir}/debug" after the rpm 4.17.0 upgrade caused the kernel build to hang forever. Restore %exclude directive for debug symbol directory in kernel-tools subpackage, but add "%dir" to also exclude hidden files and directories. Also add the same exclude directive for the main kernel package, to prevent a debug symbol from being included in the arm64 package. For arm64 that debug symbol was:
    /usr/lib/debug/.build-id/14/72420763d9efade0b345fa798aead8fa79230c.debug
    and pointed to a module that is not in the main package:
    ../../../../../usr/lib/debug/lib/modules/5.15.32.1-2.cm2/vmlinux-5.15.32.1-2.cm2
    I believe that the hang occurs when a .debug file link is present in a package, but the file it points to is not present.
    The hang occurs after an rpmlog() call during the AutoProv dependency generation here:
    RPM code -> rpmfc.c / printDeps() / rpmlog(RPMLOG_NOTICE, " %s", DNEVR+2);

  2. Removed the /usr/bin/trace symlink, which pointed to the /usr/bin/perf binary. This trace symlink caused duplicate matching build-ids, which creates a ".1.debug" symbol:
    /usr/src/mariner/BUILDROOT/kernel-5.15.26.1-4.cm2.x86_64/usr/lib/debug/.build-id/8d/2179c7eeeb21eeae48dde4916c5fc9a2ed0434.1.debug
    The package then provides this invalid debuginfo package:
    rpm -q --provides kernel-debuginfo-5.15.26.1-3.cm2.x86_64.rpm

    debuginfo(build-id) = ffba06d26ac1b309547cf391ef63b09e4be0b7df
    debuginfo(build-id) = nilnil

  3. Remove BR for xerces-c-devel package. This reference came from our original import of the linux.spec from Photon. We don't use the package.

Change Log
  • Change kernel.spec to exclude debug directory from kernel-tools
  • Change kernel-tools to remove trace symlink
  • Change kernel-signed.spec to match release number
  • Remove BR for xerces-c-devel
  • Remove aarch64-specific excludes of vmlinux files
Does this affect the toolchain?

YES

Test Methodology
  • Pipeline build id: xxxx

@anphel31 anphel31 requested a review from a team as a code owner April 13, 2022 00:33
@ghost ghost added the main PR Destined for main label Apr 13, 2022
@anphel31 anphel31 merged commit 2c27859 into main Apr 16, 2022
@anphel31 anphel31 deleted the anphel/fix-kernel-debug branch April 16, 2022 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants