← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2028127] Re: ubuntu_bpf failed to build on F-ibm-5.15

 

With clang-10 and llvm-10, test build failed with:
  Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
  fatal error: error in backend: line 27: Invalid usage of the XADD return value
  Stack dump:
  0.	Program arguments: clang-10 -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/include/uapi -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib/llvm-10/lib/clang/10.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o -mcpu=v3 
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module 'progs/atomics.c'.
  4.	Running pass 'BPF PreEmit Checking' on function '@add'
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7fa525c8a4ff]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7fa525c887b0]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xdd)[0x7fa525c89c4d]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x8d6cea)[0x7fa525bdfcea]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x8d6c8b)[0x7fa525bdfc8b]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x97c3fe)[0x7fa525c853fe]
  clang-10[0x4125b2]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x104)[0x7fa525be99b4]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm18report_fatal_errorENS_9StringRefEb+0x0)[0x7fa525be9a80]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x21874ed)[0x7fa5274904ed]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x118)[0x7fa525f255e8]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x466)[0x7fa525d8fd76]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7fa525d8fff3]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3c0)[0x7fa525d904a0]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x3173)[0x7fa52ad85433]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x1667e1c)[0x7fa52b004e1c]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang8ParseASTERNS_4SemaEbb+0x283)[0x7fa52a1f2c13]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7fa52b668e58]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x621)[0x7fa52b6218a1]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x66f)[0x7fa52b6ccdaf]
  clang-10(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x98d)[0x41229d]
  clang-10[0x4105b1]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x19d58f2)[0x7fa52b3728f2]
  /lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xd7)[0x7fa525bdfc67]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x13f)[0x7fa52b371e2f]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x2df)[0x7fa52b34a52f]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x7a)[0x7fa52b34a6da]
  /lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0xdc)[0x7fa52b35d93c]
  clang-10(main+0x259f)[0x41002f]
  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fa524ded083]
  clang-10(_start+0x2e)[0x40d7ce]
  make[1]: *** [Makefile:470: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o] Error 1
  make: *** [Makefile:171: all] Error 2


With clang-11 and llvm-11, test build is failing with:
  Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
  fatal error: error in backend: line 27: Invalid usage of the XADD return value
  PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.	Program arguments: clang-11 -g -D__TARGET_ARCH_x86 -mlittle-endian -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/include/uapi -I/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib/llvm-11/lib/clang/11.0.0/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/atomics.c -o /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o -mcpu=v3 
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module 'progs/atomics.c'.
  4.	Running pass 'BPF PreEmit Checking' on function '@add'
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f281eb9842f]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f281eb96790]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xdd)[0x7f281eb97b7d]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9edb0a)[0x7f281eadfb0a]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9edaab)[0x7f281eadfaab]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0xaa125e)[0x7f281eb9325e]
  clang-11[0x412932]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x11f)[0x7f281eaebb6f]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x9f9c47)[0x7f281eaebc47]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(+0x253ff57)[0x7f2820631f57]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x10e)[0x7f281ee6a39e]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x3b9)[0x7f281eca7579]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7f281ecacb23]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3e0)[0x7f281eca7b90]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x3316)[0x7f28246171a6]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(+0x183f076)[0x7f28248d5076]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang8ParseASTERNS_4SemaEbb+0x273)[0x7f28239a0003]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7f2824f6a5c8]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x861)[0x7f2824f208c1]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x5e0)[0x7f2824fcff50]
  clang-11(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x94f)[0x4125ff]
  clang-11[0x410a3e]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(+0x1bbe992)[0x7f2824c54992]
  /lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xdd)[0x7f281eadfa8d]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x13f)[0x7f2824c53ebf]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x2df)[0x7f2824c2bccf]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x77)[0x7f2824c2be77]
  /lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0xdc)[0x7f2824c3f9cc]
  clang-11(main+0x2533)[0x4104e3]
  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f281dbd6083]
  clang-11(_start+0x2e)[0x40dcde]
  make[1]: *** [Makefile:470: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/atomics.o] Error 1
  make: *** [Makefile:171: all] Error 2


With clang-12 and llvm-12, test build is still failing:
  make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf'
  make: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests'
  stderr:
  Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/netlink.h' differs from latest version at 'include/uapi/linux/netlink.h'
  Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
  libbpf: elf: skipping unrecognized data section(7) .maps.btf_map_legacy
  libbpf: elf: skipping unrecognized data section(8) .rodata.str1.1
  libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
  libbpf: failed to find BTF for extern 'bpf_kfunc_call_test1' [27] section: -2
  Error: failed to open BPF object file: No such file or directory
  make[1]: *** [Makefile:475: /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/kfunc_call_test_subprog.skel.h] Error 255
  make[1]: *** Deleting file '/home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/kfunc_call_test_subprog.skel.h'
  make: *** [Makefile:171: all] Error 2

-- 
You received this bug notification because you are a member of Canonical
Platform QA Team, which is subscribed to ubuntu-kernel-tests.
https://bugs.launchpad.net/bugs/2028127

Title:
  ubuntu_bpf failed to build on F-ibm-5.15

Status in ubuntu-kernel-tests:
  New

Bug description:
  Test build failed with:
    In file included from progs/test_ksyms_btf_null_check.c:4:
    /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:5:15: error: attribute 'preserve_access_index' is not supported by '#pragma clang attribute'
    #pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)
                  ^
    /home/ubuntu/autotest/client/tmp/ubuntu_bpf/src/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:132008:15: error: '#pragma clang attribute pop' with no matching '#pragma clang attribute push'
    #pragma clang attribute pop
                  ^
    2 errors generated.

  
  We are using clang-9 for this, we might need to use clang-10 instead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2028127/+subscriptions



References