Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-62707

Debug kernel build fails with binutils-2.35.2-55.el9, ".tmp_vmlinux.btf has a LOAD segment with RWX permissions"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.6
    • binutils
    • No
    • Important
    • 1
    • sst_pt_gcc
    • ssg_platform_tools
    • 1
    • False
    • Hide

      None

      Show
      None
    • No
    • GCC Sprint 12
    • Unspecified Release Note Type - Unknown
    • x86_64
    • None

      What were you trying to do that didn't work?

      As part of the binutils gating, kernel SRPM rebuild & reboot is performed. The build fails on x86_64 - aarch64 passed, other two arches did not run because of infrastructure issues.

      sed -i "s/# % define buildid .local/%define buildid .LK/" /tmp.n8UhrH4avK/SPECS/kernel.spec
      sed -i "s/# define buildid .local/%define buildid .LK/" /tmp.n8UhrH4avK/SPECS/kernel.spec
      CC=/usr/bin/gcc rpmbuild --define="_topdir /tmp.n8UhrH4avK" -bb --target=x86_64 --clean /tmp.n8UhrH4avK/SPECS/kernel.spec
      ...
      Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.pwV55s
      + umask 022
      + cd /tmp.n8UhrH4avK/BUILD
      + cd kernel-5.14.0-514.el9
      + rm -rf /tmp.n8UhrH4avK/BUILD/root_unstripped
      + mkdir -p /tmp.n8UhrH4avK/BUILD/root_unstripped
      + rm -rf /tmp.n8UhrH4avK/BUILDROOT/kernel-5.14.0-514.LK.el9.x86_64
      + mkdir -p /tmp.n8UhrH4avK/BUILDROOT/kernel-5.14.0-514.LK.el9.x86_64/boot
      + mkdir -p /tmp.n8UhrH4avK/BUILDROOT/kernel-5.14.0-514.LK.el9.x86_64/usr/libexec
      + cd linux-5.14.0-514.LK.el9.x86_64
      + BuildKernel bzImage arch/x86/boot/bzImage 1 debug
      + MakeTarget=bzImage
      + KernelImage=arch/x86/boot/bzImage
      + DoVDSO=1
      + Variant=debug
      + InstallName=vmlinuz
      + DoModules=1
      + '[' debug = zfcpdump ']'
      + '[' arch/x86/boot/bzImage = vmlinux ']'
      + CopyKernel=cp
      + InitBuildVars debug
      + Variant=debug
      + Config=kernel-5.14.0-x86_64-debug.config
      + DevelDir=/usr/src/kernels/5.14.0-514.LK.el9.x86_64+debug
      + KernelVer=5.14.0-514.LK.el9.x86_64+debug
      ++ perl -e 'print "514.LK.el9" =~ s/\.pr\.[0-9A-Fa-f]{32}//r'
      + ShortRel=514.LK.el9
      + perl -p -i -e 's/^EXTRAVERSION.*/EXTRAVERSION = -514.LK.el9.x86_64+debug/' Makefile
      + perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = 14/' Makefile
      + /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' -j8 mrproper
      + cp configs/kernel-5.14.0-x86_64-debug.config .config
      + cp configs/x509.genkey certs/.
      ++ head -1 .config
      ++ cut -b 3-
      + Arch=x86_64
      + echo USING ARCH=x86_64
      USING ARCH=x86_64
      + KCFLAGS=
      + '[' debug == '' ']'
      + echo BUILDING A KERNEL FOR debug x86_64...
      BUILDING A KERNEL FOR debug x86_64...
      + /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' ARCH=x86_64 olddefconfig
      + perl -p -i -e 's/^CONFIG_BUILD_SALT.*/CONFIG_BUILD_SALT="5.14.0-514.LK.el9.x86_64"/' .config
      + /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' ARCH=x86_64 KCFLAGS= WITH_GCOV=0 -j8 bzImage
      In file included from /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/build_bug.h:5,
                       from /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/kernel.h:8,
                       from /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/rbtree.h:20,
                       from main.c:74:
      main.c: In function 'sets_patch':
      main.c:699:50: warning: comparison of distinct pointer types lacks a cast
        699 |                         BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id);
            |                                                  ^~
      /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/compiler.h:15:23: note: in definition of macro '__compiletime_assert'
         15 |                 if (!(condition))                                       \
            |                       ^~~~~~~~~
      /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/compiler.h:35:9: note: in expansion of macro '_compiletime_assert'
         35 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
            |         ^~~~~~~~~~~~~~~~~~~
      /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
         39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
            |                                     ^~~~~~~~~~~~~~~~~~
      /tmp.n8UhrH4avK/BUILD/kernel-5.14.0-514.el9/linux-5.14.0-514.LK.el9.x86_64/tools/include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
         50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
            |         ^~~~~~~~~~~~~~~~
      main.c:699:25: note: in expansion of macro 'BUILD_BUG_ON'
        699 |                         BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id);
            |                         ^~~~~~~~~~~~
      main.c: In function 'main':
      main.c:163:9: warning: 'set' may be used uninitialized in this function [-Wmaybe-uninitialized]
        163 |         eprintf(1, verbose, pr_fmt(fmt), ##__VA_ARGS__)
            |         ^~~~~~~
      main.c:675:36: note: 'set' was declared here
        675 |                 struct btf_id_set *set;
            |                                    ^~~
      main.c:163:9: warning: 'set8' may be used uninitialized in this function [-Wmaybe-uninitialized]
        163 |         eprintf(1, verbose, pr_fmt(fmt), ##__VA_ARGS__)
            |         ^~~~~~~
      main.c:674:37: note: 'set8' was declared here
        674 |                 struct btf_id_set8 *set8;
            |                                     ^~~~
      drivers/scsi/Makefile:196: FORCE prerequisite is missing
      ld: error: .tmp_vmlinux.btf has a LOAD segment with RWX permissions
      pahole: .tmp_vmlinux.btf: Invalid argument
      .btf.vmlinux.bin.o: file not recognized: file format not recognized
      make: *** [Makefile:1236: vmlinux] Error 1
      error: Bad exit status from /var/tmp/rpm-tmp.pwV55s (%build)
      

      See https://artifacts.osci.redhat.com/baseos-ci/brew-build/64/84/77/64847757/https___baseos-jenkins.rhev-ci-vms.eng.rdu2.redhat.com-ci-test-brew-ts_tmt-artemis/5414/work-kernel-rebuild29j_tg_d/plans/build-gating/kernel-rebuild/execute/data/guest/default-0/tests/rebuilds/kernel-1/output.txt for the full test log.

      Please provide the package NVR for which the bug is seen:

      binutils-2.35.2-55.el9.x86_64
      kernel-5.14.0-514.el9.src.rpm

            mprchlik@redhat.com Milos Prchlik
            mprchlik@redhat.com Milos Prchlik
            Nick Clifton Nick Clifton
            Milos Prchlik Milos Prchlik
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: