dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* latest pahole breaks libbpf CI and let's talk about staging
@ 2021-06-15 23:30 Andrii Nakryiko
  2021-06-16 14:56 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-15 23:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, bpf, dwarves; +Cc: siudin

Hey Arnaldo,

Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
by moving function encoding to separate method") break two selftests
in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
because both tests rely on kernel BTF info.

You've previously asked about staging pahole changes. Did you make up
your mind about branch names and the process overall? Seems like a
good chance to bring this up ;-P

  [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152

-- Andrii

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-15 23:30 latest pahole breaks libbpf CI and let's talk about staging Andrii Nakryiko
@ 2021-06-16 14:56 ` Arnaldo Carvalho de Melo
  2021-06-16 16:40   ` Arnaldo Carvalho de Melo
  2021-06-16 17:40   ` Andrii Nakryiko
  0 siblings, 2 replies; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-16 14:56 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Arnaldo Carvalho de Melo, bpf, dwarves, siudin

Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> Hey Arnaldo,
> 
> Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> by moving function encoding to separate method") break two selftests
> in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> because both tests rely on kernel BTF info.
> 
> You've previously asked about staging pahole changes. Did you make up
> your mind about branch names and the process overall? Seems like a
> good chance to bring this up ;-P
> 
>   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152

Ok, please add tmp.master as the staging branch, I'll move things to
master only after it passing thru CI.

Now looking at that code, must be something subtle...

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 14:56 ` Arnaldo Carvalho de Melo
@ 2021-06-16 16:40   ` Arnaldo Carvalho de Melo
  2021-06-16 20:41     ` Arnaldo Carvalho de Melo
  2021-06-16 17:40   ` Andrii Nakryiko
  1 sibling, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-16 16:40 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Arnaldo Carvalho de Melo, bpf, dwarves, siudin

Em Wed, Jun 16, 2021 at 11:56:06AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > Hey Arnaldo,
> > 
> > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > by moving function encoding to separate method") break two selftests
> > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > because both tests rely on kernel BTF info.
> > 
> > You've previously asked about staging pahole changes. Did you make up
> > your mind about branch names and the process overall? Seems like a
> > good chance to bring this up ;-P
> > 
> >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
> 
> Ok, please add tmp.master as the staging branch, I'll move things to
> master only after it passing thru CI.
> 
> Now looking at that code, must be something subtle...

Running selftests I'm getting a failure at:

  GEN-SKEL [test_progs] bpf_cubic.skel.h
libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
Error: failed to open BPF object file: No such file or directory
make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
[acme@seventh linux]$


I'll try to reproduce what you reported, i.e. revert that patch, and
rebuild the kernel.



[acme@seventh linux]$ uname -a
Linux seventh 5.13.0-rc6+ #1 SMP Wed Jun 16 11:59:35 -03 2021 x86_64 x86_64 x86_64 GNU/Linux

[acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/
make: Entering directory '/mnt/linux/tools/testing/selftests/bpf'
  MKDIR    include
  MKDIR    libbpf
  HOSTCC  /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep.o
  HOSTLD  /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep-in.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/bpf_helper_defs.h
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/bpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/nlattr.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/btf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf_errno.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/str_error.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/netlink.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/bpf_prog_linfo.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf_probes.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/xsk.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/hashmap.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/btf_dump.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/ringbuf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/strset.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/linker.o
  LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf-in.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.a
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'
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/bpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/nlattr.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/btf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf_errno.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/str_error.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/netlink.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/bpf_prog_linfo.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf_probes.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/xsk.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/hashmap.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/btf_dump.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/ringbuf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/strset.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/linker.o
  LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so.0.4.0
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.pc
  INSTALL headers
  CC       test_stub.o
  BINARY   test_verifier
  BINARY   test_tag
  MKDIR    bpftool

Auto-detecting system features:
...                        libbfd: [ on  ]
...        disassembler-four-args: [ on  ]
...                          zlib: [ on  ]
...                        libcap: [ on  ]
...               clang-bpf-co-re: [ on  ]


  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/btf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/btf_dumper.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/cfg.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/cgroup.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/common.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/feature.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/gen.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/iter.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/json_writer.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/link.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/main.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/map.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/map_perf_ring.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/net.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/netlink_dumper.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/perf.o
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/main.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/common.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/json_writer.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/gen.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/btf.o
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/bpf_helper_defs.h
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/bpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/nlattr.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/btf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf_errno.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/str_error.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/netlink.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/bpf_prog_linfo.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf_probes.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/xsk.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/hashmap.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/btf_dump.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/ringbuf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/strset.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/linker.o
  LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf-in.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/libbpf.a
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/bpftool
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/vmlinux.h
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/bpf_helper_defs.h
  MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/bpf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/nlattr.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/btf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf_errno.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/str_error.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/netlink.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/bpf_prog_linfo.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf_probes.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/xsk.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/hashmap.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/btf_dump.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/ringbuf.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/strset.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/linker.o
  LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf-in.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/libbpf.a
  CLANG   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pid_iter.bpf.o
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pid_iter.skel.h
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pids.o
  CLANG   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/profiler.bpf.o
  GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/profiler.skel.h
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/prog.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/struct_ops.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/tracelog.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/xlated_dumper.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/jit_disasm.o
  CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/disasm.o
  LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/bpftool
  INSTALL bpftool
  GEN      vmlinux.h
  CLNG-BPF [test_maps] atomic_bounds.o
  CLNG-BPF [test_maps] atomics.o
  CLNG-BPF [test_maps] bind4_prog.o
  CLNG-BPF [test_maps] bind6_prog.o
  CLNG-BPF [test_maps] bind_perm.o
  CLNG-BPF [test_maps] bpf_cubic.o
  CLNG-BPF [test_maps] bpf_dctcp.o
  CLNG-BPF [test_maps] bpf_flow.o
  CLNG-BPF [test_maps] bpf_iter_bpf_array_map.o
  CLNG-BPF [test_maps] bpf_iter_bpf_hash_map.o
  CLNG-BPF [test_maps] bpf_iter_bpf_map.o
  CLNG-BPF [test_maps] bpf_iter_bpf_percpu_array_map.o
  CLNG-BPF [test_maps] bpf_iter_bpf_percpu_hash_map.o
  CLNG-BPF [test_maps] bpf_iter_bpf_sk_storage_helpers.o
  CLNG-BPF [test_maps] bpf_iter_bpf_sk_storage_map.o
  CLNG-BPF [test_maps] bpf_iter_ipv6_route.o
  CLNG-BPF [test_maps] bpf_iter_netlink.o
  CLNG-BPF [test_maps] bpf_iter_sockmap.o
  CLNG-BPF [test_maps] bpf_iter_task_btf.o
  CLNG-BPF [test_maps] bpf_iter_task.o
  CLNG-BPF [test_maps] bpf_iter_task_file.o
  CLNG-BPF [test_maps] bpf_iter_task_stack.o
  CLNG-BPF [test_maps] bpf_iter_task_vma.o
  CLNG-BPF [test_maps] bpf_iter_tcp4.o
  CLNG-BPF [test_maps] bpf_iter_tcp6.o
  CLNG-BPF [test_maps] bpf_iter_test_kern1.o
  CLNG-BPF [test_maps] bpf_iter_test_kern2.o
  CLNG-BPF [test_maps] bpf_iter_test_kern3.o
  CLNG-BPF [test_maps] bpf_iter_test_kern4.o
  CLNG-BPF [test_maps] bpf_iter_test_kern5.o
  CLNG-BPF [test_maps] bpf_iter_test_kern6.o
  CLNG-BPF [test_maps] bpf_iter_udp4.o
  CLNG-BPF [test_maps] bpf_iter_udp6.o
  CLNG-BPF [test_maps] bpf_tcp_nogpl.o
  CLNG-BPF [test_maps] bprm_opts.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___diff_arr_dim.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___diff_arr_val_sz.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___equiv_zero_sz_arr.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___err_bad_zero_sz_arr.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___err_non_array.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___err_too_shallow.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___err_too_small.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___err_wrong_val_type.o
  CLNG-BPF [test_maps] btf__core_reloc_arrays___fixed_arr.o
  CLNG-BPF [test_maps] btf__core_reloc_bitfields___bitfield_vs_int.o
  CLNG-BPF [test_maps] btf__core_reloc_bitfields___bit_sz_change.o
  CLNG-BPF [test_maps] btf__core_reloc_bitfields.o
  CLNG-BPF [test_maps] btf__core_reloc_bitfields___err_too_big_bitfield.o
  CLNG-BPF [test_maps] btf__core_reloc_bitfields___just_big_enough.o
  CLNG-BPF [test_maps] btf__core_reloc_enumval.o
  CLNG-BPF [test_maps] btf__core_reloc_enumval___diff.o
  CLNG-BPF [test_maps] btf__core_reloc_enumval___err_missing.o
  CLNG-BPF [test_maps] btf__core_reloc_enumval___val3_missing.o
  CLNG-BPF [test_maps] btf__core_reloc_existence.o
  CLNG-BPF [test_maps] btf__core_reloc_existence___minimal.o
  CLNG-BPF [test_maps] btf__core_reloc_existence___wrong_field_defs.o
  CLNG-BPF [test_maps] btf__core_reloc_flavors.o
  CLNG-BPF [test_maps] btf__core_reloc_flavors__err_wrong_name.o
  CLNG-BPF [test_maps] btf__core_reloc_ints___bool.o
  CLNG-BPF [test_maps] btf__core_reloc_ints.o
  CLNG-BPF [test_maps] btf__core_reloc_ints___reverse_sign.o
  CLNG-BPF [test_maps] btf__core_reloc_misc.o
  CLNG-BPF [test_maps] btf__core_reloc_mods.o
  CLNG-BPF [test_maps] btf__core_reloc_mods___mod_swap.o
  CLNG-BPF [test_maps] btf__core_reloc_mods___typedefs.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___anon_embed.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___dup_compat_types.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_container.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_field.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_dup_incompat_types.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_missing_container.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_missing_field.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_nonstruct_container.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_partial_match_dups.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___err_too_deep.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___extra_nesting.o
  CLNG-BPF [test_maps] btf__core_reloc_nesting___struct_union_mixup.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_enum_def.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_func_proto.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_ptr_type.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_enum.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_int.o
  CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_ptr.o
  CLNG-BPF [test_maps] btf__core_reloc_ptr_as_arr.o
  CLNG-BPF [test_maps] btf__core_reloc_ptr_as_arr___diff_sz.o
  CLNG-BPF [test_maps] btf__core_reloc_size.o
  CLNG-BPF [test_maps] btf__core_reloc_size___diff_sz.o
  CLNG-BPF [test_maps] btf__core_reloc_size___err_ambiguous.o
  CLNG-BPF [test_maps] btf__core_reloc_type_based___all_missing.o
  CLNG-BPF [test_maps] btf__core_reloc_type_based.o
  CLNG-BPF [test_maps] btf__core_reloc_type_based___diff_sz.o
  CLNG-BPF [test_maps] btf__core_reloc_type_based___fn_wrong_args.o
  CLNG-BPF [test_maps] btf__core_reloc_type_based___incompat.o
  CLNG-BPF [test_maps] btf__core_reloc_type_id.o
  CLNG-BPF [test_maps] btf__core_reloc_type_id___missing_targets.o
  CLNG-BPF [test_maps] btf_data.o
  CLNG-BPF [test_maps] btf_dump_test_case_bitfields.o
  CLNG-BPF [test_maps] btf_dump_test_case_multidim.o
  CLNG-BPF [test_maps] btf_dump_test_case_namespacing.o
  CLNG-BPF [test_maps] btf_dump_test_case_ordering.o
  CLNG-BPF [test_maps] btf_dump_test_case_packing.o
  CLNG-BPF [test_maps] btf_dump_test_case_padding.o
  CLNG-BPF [test_maps] btf_dump_test_case_syntax.o
  CLNG-BPF [test_maps] cgroup_skb_sk_lookup_kern.o
  CLNG-BPF [test_maps] cg_storage_multi_egress_only.o
  CLNG-BPF [test_maps] cg_storage_multi_isolated.o
  CLNG-BPF [test_maps] cg_storage_multi_shared.o
  CLNG-BPF [test_maps] connect4_prog.o
  CLNG-BPF [test_maps] connect6_prog.o
  CLNG-BPF [test_maps] connect_force_port4.o
  CLNG-BPF [test_maps] connect_force_port6.o
  CLNG-BPF [test_maps] dev_cgroup.o
  CLNG-BPF [test_maps] fentry_test.o
  CLNG-BPF [test_maps] fexit_bpf2bpf.o
  CLNG-BPF [test_maps] fexit_bpf2bpf_simple.o
  CLNG-BPF [test_maps] fexit_sleep.o
  CLNG-BPF [test_maps] fexit_test.o
  CLNG-BPF [test_maps] fmod_ret_freplace.o
  CLNG-BPF [test_maps] for_each_array_map_elem.o
  CLNG-BPF [test_maps] for_each_hash_map_elem.o
  CLNG-BPF [test_maps] freplace_attach_probe.o
  CLNG-BPF [test_maps] freplace_cls_redirect.o
  CLNG-BPF [test_maps] freplace_connect4.o
  CLNG-BPF [test_maps] freplace_connect_v4_prog.o
  CLNG-BPF [test_maps] freplace_get_constant.o
  CLNG-BPF [test_maps] get_cgroup_id_kern.o
  CLNG-BPF [test_maps] ima.o
  CLNG-BPF [test_maps] kfree_skb.o
  CLNG-BPF [test_maps] kfunc_call_test.o
  CLNG-BPF [test_maps] kfunc_call_test_subprog.o
  CLNG-BPF [test_maps] linked_funcs1.o
  CLNG-BPF [test_maps] linked_funcs2.o
  CLNG-BPF [test_maps] linked_maps1.o
  CLNG-BPF [test_maps] linked_maps2.o
  CLNG-BPF [test_maps] linked_vars1.o
  CLNG-BPF [test_maps] linked_vars2.o
  CLNG-BPF [test_maps] load_bytes_relative.o
  CLNG-BPF [test_maps] local_storage.o
  CLNG-BPF [test_maps] loop1.o
  CLNG-BPF [test_maps] loop2.o
  CLNG-BPF [test_maps] loop3.o
  CLNG-BPF [test_maps] loop4.o
  CLNG-BPF [test_maps] loop5.o
  CLNG-BPF [test_maps] loop6.o
  CLNG-BPF [test_maps] lsm.o
  CLNG-BPF [test_maps] map_ptr_kern.o
  CLNG-BPF [test_maps] metadata_unused.o
  CLNG-BPF [test_maps] metadata_used.o
  CLNG-BPF [test_maps] modify_return.o
  CLNG-BPF [test_maps] netcnt_prog.o
  CLNG-BPF [test_maps] netif_receive_skb.o
  CLNG-BPF [test_maps] perfbuf_bench.o
  CLNG-BPF [test_maps] perf_event_stackmap.o
  CLNG-BPF [test_maps] profiler1.o
  CLNG-BPF [test_maps] profiler2.o
  CLNG-BPF [test_maps] profiler3.o
  CLNG-BPF [test_maps] pyperf100.o
  CLNG-BPF [test_maps] pyperf180.o
  CLNG-BPF [test_maps] pyperf50.o
  CLNG-BPF [test_maps] pyperf600.o
  CLNG-BPF [test_maps] pyperf600_nounroll.o
  CLNG-BPF [test_maps] pyperf_global.o
  CLNG-BPF [test_maps] pyperf_subprogs.o
  CLNG-BPF [test_maps] recursion.o
  CLNG-BPF [test_maps] recvmsg4_prog.o
  CLNG-BPF [test_maps] recvmsg6_prog.o
  CLNG-BPF [test_maps] ringbuf_bench.o
  CLNG-BPF [test_maps] sample_map_ret0.o
  CLNG-BPF [test_maps] sample_ret0.o
  CLNG-BPF [test_maps] sendmsg4_prog.o
  CLNG-BPF [test_maps] sendmsg6_prog.o
  CLNG-BPF [test_maps] skb_pkt_end.o
  CLNG-BPF [test_maps] socket_cookie_prog.o
  CLNG-BPF [test_maps] sockmap_parse_prog.o
  CLNG-BPF [test_maps] sockmap_tcp_msg_prog.o
  CLNG-BPF [test_maps] sockmap_verdict_prog.o
  CLNG-BPF [test_maps] sockopt_inherit.o
  CLNG-BPF [test_maps] sockopt_multi.o
  CLNG-BPF [test_maps] sockopt_sk.o
  CLNG-BPF [test_maps] strobemeta.o
  CLNG-BPF [test_maps] strobemeta_nounroll1.o
  CLNG-BPF [test_maps] strobemeta_nounroll2.o
  CLNG-BPF [test_maps] strobemeta_subprogs.o
  CLNG-BPF [test_maps] tailcall1.o
  CLNG-BPF [test_maps] tailcall2.o
  CLNG-BPF [test_maps] tailcall3.o
  CLNG-BPF [test_maps] tailcall4.o
  CLNG-BPF [test_maps] tailcall5.o
  CLNG-BPF [test_maps] tailcall_bpf2bpf1.o
  CLNG-BPF [test_maps] tailcall_bpf2bpf2.o
  CLNG-BPF [test_maps] tailcall_bpf2bpf3.o
  CLNG-BPF [test_maps] tailcall_bpf2bpf4.o
  CLNG-BPF [test_maps] task_local_storage.o
  CLNG-BPF [test_maps] task_local_storage_exit_creds.o
  CLNG-BPF [test_maps] task_ls_recursion.o
  CLNG-BPF [test_maps] tcp_rtt.o
  CLNG-BPF [test_maps] test_attach_probe.o
  CLNG-BPF [test_maps] test_autoload.o
  CLNG-BPF [test_maps] test_btf_haskv.o
  CLNG-BPF [test_maps] test_btf_map_in_map.o
  CLNG-BPF [test_maps] test_btf_newkv.o
  CLNG-BPF [test_maps] test_btf_nokv.o
  CLNG-BPF [test_maps] test_btf_skc_cls_ingress.o
  CLNG-BPF [test_maps] test_cgroup_link.o
  CLNG-BPF [test_maps] test_check_mtu.o
  CLNG-BPF [test_maps] test_cls_redirect.o
  CLNG-BPF [test_maps] test_cls_redirect_subprogs.o
  CLNG-BPF [test_maps] test_core_autosize.o
  CLNG-BPF [test_maps] test_core_extern.o
  CLNG-BPF [test_maps] test_core_read_macros.o
  CLNG-BPF [test_maps] test_core_reloc_arrays.o
  CLNG-BPF [test_maps] test_core_reloc_bitfields_direct.o
  CLNG-BPF [test_maps] test_core_reloc_bitfields_probed.o
  CLNG-BPF [test_maps] test_core_reloc_enumval.o
  CLNG-BPF [test_maps] test_core_reloc_existence.o
  CLNG-BPF [test_maps] test_core_reloc_flavors.o
  CLNG-BPF [test_maps] test_core_reloc_ints.o
  CLNG-BPF [test_maps] test_core_reloc_kernel.o
  CLNG-BPF [test_maps] test_core_reloc_misc.o
  CLNG-BPF [test_maps] test_core_reloc_mods.o
  CLNG-BPF [test_maps] test_core_reloc_module.o
  CLNG-BPF [test_maps] test_core_reloc_nesting.o
  CLNG-BPF [test_maps] test_core_reloc_primitives.o
  CLNG-BPF [test_maps] test_core_reloc_ptr_as_arr.o
  CLNG-BPF [test_maps] test_core_reloc_size.o
  CLNG-BPF [test_maps] test_core_reloc_type_based.o
  CLNG-BPF [test_maps] test_core_reloc_type_id.o
  CLNG-BPF [test_maps] test_core_retro.o
  CLNG-BPF [test_maps] test_d_path.o
  CLNG-BPF [test_maps] test_enable_stats.o
  CLNG-BPF [test_maps] test_endian.o
  CLNG-BPF [test_maps] test_get_stack_rawtp.o
  CLNG-BPF [test_maps] test_get_stack_rawtp_err.o
  CLNG-BPF [test_maps] test_global_data.o
  CLNG-BPF [test_maps] test_global_func10.o
  CLNG-BPF [test_maps] test_global_func11.o
  CLNG-BPF [test_maps] test_global_func12.o
  CLNG-BPF [test_maps] test_global_func13.o
  CLNG-BPF [test_maps] test_global_func14.o
  CLNG-BPF [test_maps] test_global_func15.o
  CLNG-BPF [test_maps] test_global_func16.o
  CLNG-BPF [test_maps] test_global_func1.o
  CLNG-BPF [test_maps] test_global_func2.o
  CLNG-BPF [test_maps] test_global_func3.o
  CLNG-BPF [test_maps] test_global_func4.o
  CLNG-BPF [test_maps] test_global_func5.o
  CLNG-BPF [test_maps] test_global_func6.o
  CLNG-BPF [test_maps] test_global_func7.o
  CLNG-BPF [test_maps] test_global_func8.o
  CLNG-BPF [test_maps] test_global_func9.o
  CLNG-BPF [test_maps] test_global_func_args.o
  CLNG-BPF [test_maps] test_hash_large_key.o
  CLNG-BPF [test_maps] test_ksyms_btf.o
  CLNG-BPF [test_maps] test_ksyms_btf_null_check.o
  CLNG-BPF [test_maps] test_ksyms.o
  CLNG-BPF [test_maps] test_ksyms_module.o
  CLNG-BPF [test_maps] test_l4lb.o
  CLNG-BPF [test_maps] test_l4lb_noinline.o
  CLNG-BPF [test_maps] test_link_pinning.o
  CLNG-BPF [test_maps] test_lirc_mode2_kern.o
  CLNG-BPF [test_maps] test_lwt_ip_encap.o
  CLNG-BPF [test_maps] test_lwt_seg6local.o
  CLNG-BPF [test_maps] test_map_init.o
  CLNG-BPF [test_maps] test_map_in_map.o
  CLNG-BPF [test_maps] test_map_lock.o
  CLNG-BPF [test_maps] test_misc_tcp_hdr_options.o
  CLNG-BPF [test_maps] test_mmap.o
  CLNG-BPF [test_maps] test_module_attach.o
  CLNG-BPF [test_maps] test_ns_current_pid_tgid.o
  CLNG-BPF [test_maps] test_obj_id.o
  CLNG-BPF [test_maps] test_overhead.o
  CLNG-BPF [test_maps] test_pe_preserve_elems.o
  CLNG-BPF [test_maps] test_perf_branches.o
  CLNG-BPF [test_maps] test_perf_buffer.o
  CLNG-BPF [test_maps] test_pinning.o
  CLNG-BPF [test_maps] test_pinning_invalid.o
  CLNG-BPF [test_maps] test_pkt_access.o
  CLNG-BPF [test_maps] test_pkt_md_access.o
  CLNG-BPF [test_maps] test_probe_read_user_str.o
  CLNG-BPF [test_maps] test_probe_user.o
  CLNG-BPF [test_maps] test_queue_map.o
  CLNG-BPF [test_maps] test_raw_tp_test_run.o
  CLNG-BPF [test_maps] test_rdonly_maps.o
  CLNG-BPF [test_maps] test_ringbuf.o
  CLNG-BPF [test_maps] test_ringbuf_multi.o
  CLNG-BPF [test_maps] test_seg6_loop.o
  CLNG-BPF [test_maps] test_select_reuseport_kern.o
  CLNG-BPF [test_maps] test_send_signal_kern.o
  CLNG-BPF [test_maps] test_sk_assign.o
  CLNG-BPF [test_maps] test_skb_cgroup_id_kern.o
  CLNG-BPF [test_maps] test_skb_ctx.o
  CLNG-BPF [test_maps] test_skb_helpers.o
  CLNG-BPF [test_maps] test_skeleton.o
  CLNG-BPF [test_maps] test_sk_lookup.o
  CLNG-BPF [test_maps] test_sk_lookup_kern.o
  CLNG-BPF [test_maps] test_skmsg_load_helpers.o
  CLNG-BPF [test_maps] test_sk_storage_trace_itself.o
  CLNG-BPF [test_maps] test_sk_storage_tracing.o
  CLNG-BPF [test_maps] test_snprintf.o
  CLNG-BPF [test_maps] test_snprintf_single.o
  CLNG-BPF [test_maps] test_sock_fields.o
  CLNG-BPF [test_maps] test_sockhash_kern.o
  CLNG-BPF [test_maps] test_sockmap_invalid_update.o
  CLNG-BPF [test_maps] test_sockmap_kern.o
  CLNG-BPF [test_maps] test_sockmap_listen.o
  CLNG-BPF [test_maps] test_sockmap_skb_verdict_attach.o
  CLNG-BPF [test_maps] test_sockmap_update.o
  CLNG-BPF [test_maps] test_spin_lock.o
  CLNG-BPF [test_maps] test_stack_map.o
  CLNG-BPF [test_maps] test_stacktrace_build_id.o
  CLNG-BPF [test_maps] test_stacktrace_map.o
  CLNG-BPF [test_maps] test_stack_var_off.o
  CLNG-BPF [test_maps] test_static_linked1.o
  CLNG-BPF [test_maps] test_static_linked2.o
  CLNG-BPF [test_maps] test_subprogs.o
  CLNG-BPF [test_maps] test_subprogs_unused.o
  CLNG-BPF [test_maps] test_sysctl_loop1.o
  CLNG-BPF [test_maps] test_sysctl_loop2.o
  CLNG-BPF [test_maps] test_sysctl_prog.o
  CLNG-BPF [test_maps] test_tc_edt.o
  CLNG-BPF [test_maps] test_tc_neigh.o
  CLNG-BPF [test_maps] test_tc_neigh_fib.o
  CLNG-BPF [test_maps] test_tcpbpf_kern.o
  CLNG-BPF [test_maps] test_tcp_check_syncookie_kern.o
  CLNG-BPF [test_maps] test_tc_peer.o
  CLNG-BPF [test_maps] test_tcp_estats.o
  CLNG-BPF [test_maps] test_tcp_hdr_options.o
  CLNG-BPF [test_maps] test_tcpnotify_kern.o
  CLNG-BPF [test_maps] test_tc_tunnel.o
  CLNG-BPF [test_maps] test_trace_ext.o
  CLNG-BPF [test_maps] test_trace_ext_tracing.o
  CLNG-BPF [test_maps] test_tracepoint.o
  CLNG-BPF [test_maps] test_trampoline_count.o
  CLNG-BPF [test_maps] test_tunnel_kern.o
  CLNG-BPF [test_maps] test_varlen.o
  CLNG-BPF [test_maps] test_verif_scale1.o
  CLNG-BPF [test_maps] test_verif_scale2.o
  CLNG-BPF [test_maps] test_verif_scale3.o
  CLNG-BPF [test_maps] test_vmlinux.o
  CLNG-BPF [test_maps] test_xdp_adjust_tail_grow.o
  CLNG-BPF [test_maps] test_xdp_adjust_tail_shrink.o
  CLNG-BPF [test_maps] test_xdp_bpf2bpf.o
  CLNG-BPF [test_maps] test_xdp.o
  CLNG-BPF [test_maps] test_xdp_devmap_helpers.o
  CLNG-BPF [test_maps] test_xdp_link.o
  CLNG-BPF [test_maps] test_xdp_loop.o
  CLNG-BPF [test_maps] test_xdp_meta.o
  CLNG-BPF [test_maps] test_xdp_noinline.o
  CLNG-BPF [test_maps] test_xdp_redirect.o
  CLNG-BPF [test_maps] test_xdp_vlan.o
  CLNG-BPF [test_maps] test_xdp_with_cpumap_helpers.o
  CLNG-BPF [test_maps] test_xdp_with_devmap_helpers.o
  CLNG-BPF [test_maps] trace_printk.o
  CLNG-BPF [test_maps] trigger_bench.o
  CLNG-BPF [test_maps] udp_limit.o
  CLNG-BPF [test_maps] xdp_dummy.o
  CLNG-BPF [test_maps] xdping_kern.o
  CLNG-BPF [test_maps] xdp_redirect_map.o
  CLNG-BPF [test_maps] xdp_tx.o
  GEN-SKEL [test_progs] atomic_bounds.skel.h
  GEN-SKEL [test_progs] atomics.skel.h
  GEN-SKEL [test_progs] bind4_prog.skel.h
libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
  GEN-SKEL [test_progs] bind6_prog.skel.h
libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
  GEN-SKEL [test_progs] bind_perm.skel.h
  GEN-SKEL [test_progs] bpf_cubic.skel.h
libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
Error: failed to open BPF object file: No such file or directory
make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
[acme@seventh linux]$



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 14:56 ` Arnaldo Carvalho de Melo
  2021-06-16 16:40   ` Arnaldo Carvalho de Melo
@ 2021-06-16 17:40   ` Andrii Nakryiko
  2021-06-16 18:25     ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-16 17:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: bpf, dwarves, siudin

On Wed, Jun 16, 2021 at 7:56 AM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > Hey Arnaldo,
> >
> > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > by moving function encoding to separate method") break two selftests
> > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > because both tests rely on kernel BTF info.
> >
> > You've previously asked about staging pahole changes. Did you make up
> > your mind about branch names and the process overall? Seems like a
> > good chance to bring this up ;-P
> >
> >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
>
> Ok, please add tmp.master as the staging branch, I'll move things to
> master only after it passing thru CI.
>

So I'm thinking about what's the best setup to catch pahole staging
problems, but not break main libbpf CI and kernel-patches CI flows.

How about we keep all the existing CI jobs to use pahole's master.
Then add a separate job to do full kernel build with pahole built from
staging branch. And mark it as non-critical (or whatever the
terminology), so it doesn't mark the build red. I'd do that as a cron
job that runs every day. That way if you don't have anything urgent,
next day you'll get staging tested automatically. If you need to test
right now, there is a way to re-trigger previous build and it will
re-fetch latest staging (so there is a way for you to proactively
test).

Basically, I want broken staging pahole to not interrupt anything we
are doing. WDYT?

> Now looking at that code, must be something subtle...
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 17:40   ` Andrii Nakryiko
@ 2021-06-16 18:25     ` Arnaldo Carvalho de Melo
  2021-06-16 22:38       ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-16 18:25 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Arnaldo Carvalho de Melo, bpf, dwarves, siudin

Em Wed, Jun 16, 2021 at 10:40:45AM -0700, Andrii Nakryiko escreveu:
> On Wed, Jun 16, 2021 at 7:56 AM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > Hey Arnaldo,
> > >
> > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > by moving function encoding to separate method") break two selftests
> > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > because both tests rely on kernel BTF info.
> > >
> > > You've previously asked about staging pahole changes. Did you make up
> > > your mind about branch names and the process overall? Seems like a
> > > good chance to bring this up ;-P
> > >
> > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
> >
> > Ok, please add tmp.master as the staging branch, I'll move things to
> > master only after it passing thru CI.
> >
> 
> So I'm thinking about what's the best setup to catch pahole staging
> problems, but not break main libbpf CI and kernel-patches CI flows.
 
> How about we keep all the existing CI jobs to use pahole's master.

Agreed.

> Then add a separate job to do full kernel build with pahole built from
> staging branch. And mark it as non-critical (or whatever the
> terminology), so it doesn't mark the build red. I'd do that as a cron
> job that runs every day. That way if you don't have anything urgent,
> next day you'll get staging tested automatically. If you need to test
> right now, there is a way to re-trigger previous build and it will
> re-fetch latest staging (so there is a way for you to proactively
> test).
> 
> Basically, I want broken staging pahole to not interrupt anything we
> are doing. WDYT?

Sounds like a plan, please hand hold me on this, I'm not versed on
github.

- Arnaldo
 
> > Now looking at that code, must be something subtle...
> >
> > - Arnaldo

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 16:40   ` Arnaldo Carvalho de Melo
@ 2021-06-16 20:41     ` Arnaldo Carvalho de Melo
  2021-06-16 22:36       ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-16 20:41 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Andrii Nakryiko, bpf, dwarves, siudin

Em Wed, Jun 16, 2021 at 01:40:03PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Jun 16, 2021 at 11:56:06AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > Hey Arnaldo,

> > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > by moving function encoding to separate method") break two selftests
> > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > because both tests rely on kernel BTF info.

> > > You've previously asked about staging pahole changes. Did you make up
> > > your mind about branch names and the process overall? Seems like a
> > > good chance to bring this up ;-P

> > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152

> > Ok, please add tmp.master as the staging branch, I'll move things to
> > master only after it passing thru CI.

> > Now looking at that code, must be something subtle...

> Running selftests I'm getting a failure at:

>   GEN-SKEL [test_progs] bpf_cubic.skel.h
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> Error: failed to open BPF object file: No such file or directory
> make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> [acme@seventh linux]$
 
> I'll try to reproduce what you reported, i.e. revert that patch, and
> rebuild the kernel.

I tried with 1.21 plus that ftrace fix but I still get:

[acme@seventh linux]$ uname -a
Linux seventh 5.13.0-rc6.pahole-58a98f76ac95b1bb+ #1 SMP Wed Jun 16 15:47:50 -03 2021 x86_64 x86_64 x86_64 GNU/Linux

Which is pahole build up to:

⬢[acme@toolbox pahole]$ git log --oneline -4 58a98f76ac95b1bb
58a98f76ac95b1bb btf: Remove ftrace filter
7c60b0443cb01795 pahole: Fix error message when --header couldn't be read
7eea706c14997b4f pahole: Introduce --with_flexible_array option to show just types ending in a flexible array
25ad41e7b52e3ad6 (tag: v1.21) pahole: Prep 1.21
⬢[acme@toolbox pahole]$

But selftests is still failing at:

[acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ clean > /dev/null 2>&1
[sudo] password for acme:
[acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ clean > /dev/null 2>&1
[acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ | tail
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(5) .rodata.str1.1
libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
Error: failed to open BPF object file: No such file or directory
make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
  CLNG-BPF [test_maps] xdping_kern.o
  CLNG-BPF [test_maps] xdp_redirect_map.o
  CLNG-BPF [test_maps] xdp_tx.o
  GEN-SKEL [test_progs] atomic_bounds.skel.h
  GEN-SKEL [test_progs] atomics.skel.h
  GEN-SKEL [test_progs] bind4_prog.skel.h
  GEN-SKEL [test_progs] bind6_prog.skel.h
  GEN-SKEL [test_progs] bind_perm.skel.h
  GEN-SKEL [test_progs] bpf_cubic.skel.h
make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
[acme@seventh linux]$

And if I use pahole's BTF loader I find the info about that function:

[acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3

So this should be unrelated to the breakage you noticed in the CI.

I'm trying to to reproduce the CI breakage by building the kernel and
running selftests after a reboot.

I suspect I'm missing something, can you see what it is?

- Arnaldo
 
> [acme@seventh linux]$ uname -a
> Linux seventh 5.13.0-rc6+ #1 SMP Wed Jun 16 11:59:35 -03 2021 x86_64 x86_64 x86_64 GNU/Linux
> 
> [acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/
> make: Entering directory '/mnt/linux/tools/testing/selftests/bpf'
>   MKDIR    include
>   MKDIR    libbpf
>   HOSTCC  /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep.o
>   HOSTLD  /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep-in.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/fixdep
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/bpf_helper_defs.h
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/bpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/nlattr.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/btf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf_errno.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/str_error.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/netlink.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/bpf_prog_linfo.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf_probes.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/xsk.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/hashmap.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/btf_dump.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/ringbuf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/strset.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/linker.o
>   LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/staticobjs/libbpf-in.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.a
> 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'
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/bpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/nlattr.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/btf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf_errno.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/str_error.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/netlink.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/bpf_prog_linfo.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf_probes.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/xsk.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/hashmap.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/btf_dump.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/ringbuf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/strset.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/linker.o
>   LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/sharedobjs/libbpf-in.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.so.0.4.0
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/libbpf/libbpf.pc
>   INSTALL headers
>   CC       test_stub.o
>   BINARY   test_verifier
>   BINARY   test_tag
>   MKDIR    bpftool
> 
> Auto-detecting system features:
> ...                        libbfd: [ on  ]
> ...        disassembler-four-args: [ on  ]
> ...                          zlib: [ on  ]
> ...                        libcap: [ on  ]
> ...               clang-bpf-co-re: [ on  ]
> 
> 
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/btf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/btf_dumper.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/cfg.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/cgroup.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/common.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/feature.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/gen.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/iter.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/json_writer.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/link.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/main.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/map.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/map_perf_ring.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/net.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/netlink_dumper.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/perf.o
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/main.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/common.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/json_writer.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/gen.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/btf.o
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/bpf_helper_defs.h
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/bpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/nlattr.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/btf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf_errno.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/str_error.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/netlink.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/bpf_prog_linfo.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf_probes.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/xsk.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/hashmap.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/btf_dump.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/ringbuf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/strset.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/linker.o
>   LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/staticobjs/libbpf-in.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/libbpf/libbpf.a
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//bootstrap/bpftool
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/vmlinux.h
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/bpf_helper_defs.h
>   MKDIR   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/bpf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/nlattr.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/btf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf_errno.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/str_error.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/netlink.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/bpf_prog_linfo.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf_probes.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/xsk.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/hashmap.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/btf_dump.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/ringbuf.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/strset.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/linker.o
>   LD      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/staticobjs/libbpf-in.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool//libbpf/libbpf.a
>   CLANG   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pid_iter.bpf.o
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pid_iter.skel.h
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/pids.o
>   CLANG   /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/profiler.bpf.o
>   GEN     /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/profiler.skel.h
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/prog.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/struct_ops.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/tracelog.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/xlated_dumper.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/jit_disasm.o
>   CC      /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/disasm.o
>   LINK    /mnt/linux/tools/testing/selftests/bpf/tools/build/bpftool/bpftool
>   INSTALL bpftool
>   GEN      vmlinux.h
>   CLNG-BPF [test_maps] atomic_bounds.o
>   CLNG-BPF [test_maps] atomics.o
>   CLNG-BPF [test_maps] bind4_prog.o
>   CLNG-BPF [test_maps] bind6_prog.o
>   CLNG-BPF [test_maps] bind_perm.o
>   CLNG-BPF [test_maps] bpf_cubic.o
>   CLNG-BPF [test_maps] bpf_dctcp.o
>   CLNG-BPF [test_maps] bpf_flow.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_array_map.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_hash_map.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_map.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_percpu_array_map.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_percpu_hash_map.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_sk_storage_helpers.o
>   CLNG-BPF [test_maps] bpf_iter_bpf_sk_storage_map.o
>   CLNG-BPF [test_maps] bpf_iter_ipv6_route.o
>   CLNG-BPF [test_maps] bpf_iter_netlink.o
>   CLNG-BPF [test_maps] bpf_iter_sockmap.o
>   CLNG-BPF [test_maps] bpf_iter_task_btf.o
>   CLNG-BPF [test_maps] bpf_iter_task.o
>   CLNG-BPF [test_maps] bpf_iter_task_file.o
>   CLNG-BPF [test_maps] bpf_iter_task_stack.o
>   CLNG-BPF [test_maps] bpf_iter_task_vma.o
>   CLNG-BPF [test_maps] bpf_iter_tcp4.o
>   CLNG-BPF [test_maps] bpf_iter_tcp6.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern1.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern2.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern3.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern4.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern5.o
>   CLNG-BPF [test_maps] bpf_iter_test_kern6.o
>   CLNG-BPF [test_maps] bpf_iter_udp4.o
>   CLNG-BPF [test_maps] bpf_iter_udp6.o
>   CLNG-BPF [test_maps] bpf_tcp_nogpl.o
>   CLNG-BPF [test_maps] bprm_opts.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___diff_arr_dim.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___diff_arr_val_sz.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___equiv_zero_sz_arr.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___err_bad_zero_sz_arr.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___err_non_array.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___err_too_shallow.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___err_too_small.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___err_wrong_val_type.o
>   CLNG-BPF [test_maps] btf__core_reloc_arrays___fixed_arr.o
>   CLNG-BPF [test_maps] btf__core_reloc_bitfields___bitfield_vs_int.o
>   CLNG-BPF [test_maps] btf__core_reloc_bitfields___bit_sz_change.o
>   CLNG-BPF [test_maps] btf__core_reloc_bitfields.o
>   CLNG-BPF [test_maps] btf__core_reloc_bitfields___err_too_big_bitfield.o
>   CLNG-BPF [test_maps] btf__core_reloc_bitfields___just_big_enough.o
>   CLNG-BPF [test_maps] btf__core_reloc_enumval.o
>   CLNG-BPF [test_maps] btf__core_reloc_enumval___diff.o
>   CLNG-BPF [test_maps] btf__core_reloc_enumval___err_missing.o
>   CLNG-BPF [test_maps] btf__core_reloc_enumval___val3_missing.o
>   CLNG-BPF [test_maps] btf__core_reloc_existence.o
>   CLNG-BPF [test_maps] btf__core_reloc_existence___minimal.o
>   CLNG-BPF [test_maps] btf__core_reloc_existence___wrong_field_defs.o
>   CLNG-BPF [test_maps] btf__core_reloc_flavors.o
>   CLNG-BPF [test_maps] btf__core_reloc_flavors__err_wrong_name.o
>   CLNG-BPF [test_maps] btf__core_reloc_ints___bool.o
>   CLNG-BPF [test_maps] btf__core_reloc_ints.o
>   CLNG-BPF [test_maps] btf__core_reloc_ints___reverse_sign.o
>   CLNG-BPF [test_maps] btf__core_reloc_misc.o
>   CLNG-BPF [test_maps] btf__core_reloc_mods.o
>   CLNG-BPF [test_maps] btf__core_reloc_mods___mod_swap.o
>   CLNG-BPF [test_maps] btf__core_reloc_mods___typedefs.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___anon_embed.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___dup_compat_types.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_container.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_array_field.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_dup_incompat_types.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_missing_container.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_missing_field.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_nonstruct_container.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_partial_match_dups.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___err_too_deep.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___extra_nesting.o
>   CLNG-BPF [test_maps] btf__core_reloc_nesting___struct_union_mixup.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_enum_def.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_func_proto.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___diff_ptr_type.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_enum.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_int.o
>   CLNG-BPF [test_maps] btf__core_reloc_primitives___err_non_ptr.o
>   CLNG-BPF [test_maps] btf__core_reloc_ptr_as_arr.o
>   CLNG-BPF [test_maps] btf__core_reloc_ptr_as_arr___diff_sz.o
>   CLNG-BPF [test_maps] btf__core_reloc_size.o
>   CLNG-BPF [test_maps] btf__core_reloc_size___diff_sz.o
>   CLNG-BPF [test_maps] btf__core_reloc_size___err_ambiguous.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_based___all_missing.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_based.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_based___diff_sz.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_based___fn_wrong_args.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_based___incompat.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_id.o
>   CLNG-BPF [test_maps] btf__core_reloc_type_id___missing_targets.o
>   CLNG-BPF [test_maps] btf_data.o
>   CLNG-BPF [test_maps] btf_dump_test_case_bitfields.o
>   CLNG-BPF [test_maps] btf_dump_test_case_multidim.o
>   CLNG-BPF [test_maps] btf_dump_test_case_namespacing.o
>   CLNG-BPF [test_maps] btf_dump_test_case_ordering.o
>   CLNG-BPF [test_maps] btf_dump_test_case_packing.o
>   CLNG-BPF [test_maps] btf_dump_test_case_padding.o
>   CLNG-BPF [test_maps] btf_dump_test_case_syntax.o
>   CLNG-BPF [test_maps] cgroup_skb_sk_lookup_kern.o
>   CLNG-BPF [test_maps] cg_storage_multi_egress_only.o
>   CLNG-BPF [test_maps] cg_storage_multi_isolated.o
>   CLNG-BPF [test_maps] cg_storage_multi_shared.o
>   CLNG-BPF [test_maps] connect4_prog.o
>   CLNG-BPF [test_maps] connect6_prog.o
>   CLNG-BPF [test_maps] connect_force_port4.o
>   CLNG-BPF [test_maps] connect_force_port6.o
>   CLNG-BPF [test_maps] dev_cgroup.o
>   CLNG-BPF [test_maps] fentry_test.o
>   CLNG-BPF [test_maps] fexit_bpf2bpf.o
>   CLNG-BPF [test_maps] fexit_bpf2bpf_simple.o
>   CLNG-BPF [test_maps] fexit_sleep.o
>   CLNG-BPF [test_maps] fexit_test.o
>   CLNG-BPF [test_maps] fmod_ret_freplace.o
>   CLNG-BPF [test_maps] for_each_array_map_elem.o
>   CLNG-BPF [test_maps] for_each_hash_map_elem.o
>   CLNG-BPF [test_maps] freplace_attach_probe.o
>   CLNG-BPF [test_maps] freplace_cls_redirect.o
>   CLNG-BPF [test_maps] freplace_connect4.o
>   CLNG-BPF [test_maps] freplace_connect_v4_prog.o
>   CLNG-BPF [test_maps] freplace_get_constant.o
>   CLNG-BPF [test_maps] get_cgroup_id_kern.o
>   CLNG-BPF [test_maps] ima.o
>   CLNG-BPF [test_maps] kfree_skb.o
>   CLNG-BPF [test_maps] kfunc_call_test.o
>   CLNG-BPF [test_maps] kfunc_call_test_subprog.o
>   CLNG-BPF [test_maps] linked_funcs1.o
>   CLNG-BPF [test_maps] linked_funcs2.o
>   CLNG-BPF [test_maps] linked_maps1.o
>   CLNG-BPF [test_maps] linked_maps2.o
>   CLNG-BPF [test_maps] linked_vars1.o
>   CLNG-BPF [test_maps] linked_vars2.o
>   CLNG-BPF [test_maps] load_bytes_relative.o
>   CLNG-BPF [test_maps] local_storage.o
>   CLNG-BPF [test_maps] loop1.o
>   CLNG-BPF [test_maps] loop2.o
>   CLNG-BPF [test_maps] loop3.o
>   CLNG-BPF [test_maps] loop4.o
>   CLNG-BPF [test_maps] loop5.o
>   CLNG-BPF [test_maps] loop6.o
>   CLNG-BPF [test_maps] lsm.o
>   CLNG-BPF [test_maps] map_ptr_kern.o
>   CLNG-BPF [test_maps] metadata_unused.o
>   CLNG-BPF [test_maps] metadata_used.o
>   CLNG-BPF [test_maps] modify_return.o
>   CLNG-BPF [test_maps] netcnt_prog.o
>   CLNG-BPF [test_maps] netif_receive_skb.o
>   CLNG-BPF [test_maps] perfbuf_bench.o
>   CLNG-BPF [test_maps] perf_event_stackmap.o
>   CLNG-BPF [test_maps] profiler1.o
>   CLNG-BPF [test_maps] profiler2.o
>   CLNG-BPF [test_maps] profiler3.o
>   CLNG-BPF [test_maps] pyperf100.o
>   CLNG-BPF [test_maps] pyperf180.o
>   CLNG-BPF [test_maps] pyperf50.o
>   CLNG-BPF [test_maps] pyperf600.o
>   CLNG-BPF [test_maps] pyperf600_nounroll.o
>   CLNG-BPF [test_maps] pyperf_global.o
>   CLNG-BPF [test_maps] pyperf_subprogs.o
>   CLNG-BPF [test_maps] recursion.o
>   CLNG-BPF [test_maps] recvmsg4_prog.o
>   CLNG-BPF [test_maps] recvmsg6_prog.o
>   CLNG-BPF [test_maps] ringbuf_bench.o
>   CLNG-BPF [test_maps] sample_map_ret0.o
>   CLNG-BPF [test_maps] sample_ret0.o
>   CLNG-BPF [test_maps] sendmsg4_prog.o
>   CLNG-BPF [test_maps] sendmsg6_prog.o
>   CLNG-BPF [test_maps] skb_pkt_end.o
>   CLNG-BPF [test_maps] socket_cookie_prog.o
>   CLNG-BPF [test_maps] sockmap_parse_prog.o
>   CLNG-BPF [test_maps] sockmap_tcp_msg_prog.o
>   CLNG-BPF [test_maps] sockmap_verdict_prog.o
>   CLNG-BPF [test_maps] sockopt_inherit.o
>   CLNG-BPF [test_maps] sockopt_multi.o
>   CLNG-BPF [test_maps] sockopt_sk.o
>   CLNG-BPF [test_maps] strobemeta.o
>   CLNG-BPF [test_maps] strobemeta_nounroll1.o
>   CLNG-BPF [test_maps] strobemeta_nounroll2.o
>   CLNG-BPF [test_maps] strobemeta_subprogs.o
>   CLNG-BPF [test_maps] tailcall1.o
>   CLNG-BPF [test_maps] tailcall2.o
>   CLNG-BPF [test_maps] tailcall3.o
>   CLNG-BPF [test_maps] tailcall4.o
>   CLNG-BPF [test_maps] tailcall5.o
>   CLNG-BPF [test_maps] tailcall_bpf2bpf1.o
>   CLNG-BPF [test_maps] tailcall_bpf2bpf2.o
>   CLNG-BPF [test_maps] tailcall_bpf2bpf3.o
>   CLNG-BPF [test_maps] tailcall_bpf2bpf4.o
>   CLNG-BPF [test_maps] task_local_storage.o
>   CLNG-BPF [test_maps] task_local_storage_exit_creds.o
>   CLNG-BPF [test_maps] task_ls_recursion.o
>   CLNG-BPF [test_maps] tcp_rtt.o
>   CLNG-BPF [test_maps] test_attach_probe.o
>   CLNG-BPF [test_maps] test_autoload.o
>   CLNG-BPF [test_maps] test_btf_haskv.o
>   CLNG-BPF [test_maps] test_btf_map_in_map.o
>   CLNG-BPF [test_maps] test_btf_newkv.o
>   CLNG-BPF [test_maps] test_btf_nokv.o
>   CLNG-BPF [test_maps] test_btf_skc_cls_ingress.o
>   CLNG-BPF [test_maps] test_cgroup_link.o
>   CLNG-BPF [test_maps] test_check_mtu.o
>   CLNG-BPF [test_maps] test_cls_redirect.o
>   CLNG-BPF [test_maps] test_cls_redirect_subprogs.o
>   CLNG-BPF [test_maps] test_core_autosize.o
>   CLNG-BPF [test_maps] test_core_extern.o
>   CLNG-BPF [test_maps] test_core_read_macros.o
>   CLNG-BPF [test_maps] test_core_reloc_arrays.o
>   CLNG-BPF [test_maps] test_core_reloc_bitfields_direct.o
>   CLNG-BPF [test_maps] test_core_reloc_bitfields_probed.o
>   CLNG-BPF [test_maps] test_core_reloc_enumval.o
>   CLNG-BPF [test_maps] test_core_reloc_existence.o
>   CLNG-BPF [test_maps] test_core_reloc_flavors.o
>   CLNG-BPF [test_maps] test_core_reloc_ints.o
>   CLNG-BPF [test_maps] test_core_reloc_kernel.o
>   CLNG-BPF [test_maps] test_core_reloc_misc.o
>   CLNG-BPF [test_maps] test_core_reloc_mods.o
>   CLNG-BPF [test_maps] test_core_reloc_module.o
>   CLNG-BPF [test_maps] test_core_reloc_nesting.o
>   CLNG-BPF [test_maps] test_core_reloc_primitives.o
>   CLNG-BPF [test_maps] test_core_reloc_ptr_as_arr.o
>   CLNG-BPF [test_maps] test_core_reloc_size.o
>   CLNG-BPF [test_maps] test_core_reloc_type_based.o
>   CLNG-BPF [test_maps] test_core_reloc_type_id.o
>   CLNG-BPF [test_maps] test_core_retro.o
>   CLNG-BPF [test_maps] test_d_path.o
>   CLNG-BPF [test_maps] test_enable_stats.o
>   CLNG-BPF [test_maps] test_endian.o
>   CLNG-BPF [test_maps] test_get_stack_rawtp.o
>   CLNG-BPF [test_maps] test_get_stack_rawtp_err.o
>   CLNG-BPF [test_maps] test_global_data.o
>   CLNG-BPF [test_maps] test_global_func10.o
>   CLNG-BPF [test_maps] test_global_func11.o
>   CLNG-BPF [test_maps] test_global_func12.o
>   CLNG-BPF [test_maps] test_global_func13.o
>   CLNG-BPF [test_maps] test_global_func14.o
>   CLNG-BPF [test_maps] test_global_func15.o
>   CLNG-BPF [test_maps] test_global_func16.o
>   CLNG-BPF [test_maps] test_global_func1.o
>   CLNG-BPF [test_maps] test_global_func2.o
>   CLNG-BPF [test_maps] test_global_func3.o
>   CLNG-BPF [test_maps] test_global_func4.o
>   CLNG-BPF [test_maps] test_global_func5.o
>   CLNG-BPF [test_maps] test_global_func6.o
>   CLNG-BPF [test_maps] test_global_func7.o
>   CLNG-BPF [test_maps] test_global_func8.o
>   CLNG-BPF [test_maps] test_global_func9.o
>   CLNG-BPF [test_maps] test_global_func_args.o
>   CLNG-BPF [test_maps] test_hash_large_key.o
>   CLNG-BPF [test_maps] test_ksyms_btf.o
>   CLNG-BPF [test_maps] test_ksyms_btf_null_check.o
>   CLNG-BPF [test_maps] test_ksyms.o
>   CLNG-BPF [test_maps] test_ksyms_module.o
>   CLNG-BPF [test_maps] test_l4lb.o
>   CLNG-BPF [test_maps] test_l4lb_noinline.o
>   CLNG-BPF [test_maps] test_link_pinning.o
>   CLNG-BPF [test_maps] test_lirc_mode2_kern.o
>   CLNG-BPF [test_maps] test_lwt_ip_encap.o
>   CLNG-BPF [test_maps] test_lwt_seg6local.o
>   CLNG-BPF [test_maps] test_map_init.o
>   CLNG-BPF [test_maps] test_map_in_map.o
>   CLNG-BPF [test_maps] test_map_lock.o
>   CLNG-BPF [test_maps] test_misc_tcp_hdr_options.o
>   CLNG-BPF [test_maps] test_mmap.o
>   CLNG-BPF [test_maps] test_module_attach.o
>   CLNG-BPF [test_maps] test_ns_current_pid_tgid.o
>   CLNG-BPF [test_maps] test_obj_id.o
>   CLNG-BPF [test_maps] test_overhead.o
>   CLNG-BPF [test_maps] test_pe_preserve_elems.o
>   CLNG-BPF [test_maps] test_perf_branches.o
>   CLNG-BPF [test_maps] test_perf_buffer.o
>   CLNG-BPF [test_maps] test_pinning.o
>   CLNG-BPF [test_maps] test_pinning_invalid.o
>   CLNG-BPF [test_maps] test_pkt_access.o
>   CLNG-BPF [test_maps] test_pkt_md_access.o
>   CLNG-BPF [test_maps] test_probe_read_user_str.o
>   CLNG-BPF [test_maps] test_probe_user.o
>   CLNG-BPF [test_maps] test_queue_map.o
>   CLNG-BPF [test_maps] test_raw_tp_test_run.o
>   CLNG-BPF [test_maps] test_rdonly_maps.o
>   CLNG-BPF [test_maps] test_ringbuf.o
>   CLNG-BPF [test_maps] test_ringbuf_multi.o
>   CLNG-BPF [test_maps] test_seg6_loop.o
>   CLNG-BPF [test_maps] test_select_reuseport_kern.o
>   CLNG-BPF [test_maps] test_send_signal_kern.o
>   CLNG-BPF [test_maps] test_sk_assign.o
>   CLNG-BPF [test_maps] test_skb_cgroup_id_kern.o
>   CLNG-BPF [test_maps] test_skb_ctx.o
>   CLNG-BPF [test_maps] test_skb_helpers.o
>   CLNG-BPF [test_maps] test_skeleton.o
>   CLNG-BPF [test_maps] test_sk_lookup.o
>   CLNG-BPF [test_maps] test_sk_lookup_kern.o
>   CLNG-BPF [test_maps] test_skmsg_load_helpers.o
>   CLNG-BPF [test_maps] test_sk_storage_trace_itself.o
>   CLNG-BPF [test_maps] test_sk_storage_tracing.o
>   CLNG-BPF [test_maps] test_snprintf.o
>   CLNG-BPF [test_maps] test_snprintf_single.o
>   CLNG-BPF [test_maps] test_sock_fields.o
>   CLNG-BPF [test_maps] test_sockhash_kern.o
>   CLNG-BPF [test_maps] test_sockmap_invalid_update.o
>   CLNG-BPF [test_maps] test_sockmap_kern.o
>   CLNG-BPF [test_maps] test_sockmap_listen.o
>   CLNG-BPF [test_maps] test_sockmap_skb_verdict_attach.o
>   CLNG-BPF [test_maps] test_sockmap_update.o
>   CLNG-BPF [test_maps] test_spin_lock.o
>   CLNG-BPF [test_maps] test_stack_map.o
>   CLNG-BPF [test_maps] test_stacktrace_build_id.o
>   CLNG-BPF [test_maps] test_stacktrace_map.o
>   CLNG-BPF [test_maps] test_stack_var_off.o
>   CLNG-BPF [test_maps] test_static_linked1.o
>   CLNG-BPF [test_maps] test_static_linked2.o
>   CLNG-BPF [test_maps] test_subprogs.o
>   CLNG-BPF [test_maps] test_subprogs_unused.o
>   CLNG-BPF [test_maps] test_sysctl_loop1.o
>   CLNG-BPF [test_maps] test_sysctl_loop2.o
>   CLNG-BPF [test_maps] test_sysctl_prog.o
>   CLNG-BPF [test_maps] test_tc_edt.o
>   CLNG-BPF [test_maps] test_tc_neigh.o
>   CLNG-BPF [test_maps] test_tc_neigh_fib.o
>   CLNG-BPF [test_maps] test_tcpbpf_kern.o
>   CLNG-BPF [test_maps] test_tcp_check_syncookie_kern.o
>   CLNG-BPF [test_maps] test_tc_peer.o
>   CLNG-BPF [test_maps] test_tcp_estats.o
>   CLNG-BPF [test_maps] test_tcp_hdr_options.o
>   CLNG-BPF [test_maps] test_tcpnotify_kern.o
>   CLNG-BPF [test_maps] test_tc_tunnel.o
>   CLNG-BPF [test_maps] test_trace_ext.o
>   CLNG-BPF [test_maps] test_trace_ext_tracing.o
>   CLNG-BPF [test_maps] test_tracepoint.o
>   CLNG-BPF [test_maps] test_trampoline_count.o
>   CLNG-BPF [test_maps] test_tunnel_kern.o
>   CLNG-BPF [test_maps] test_varlen.o
>   CLNG-BPF [test_maps] test_verif_scale1.o
>   CLNG-BPF [test_maps] test_verif_scale2.o
>   CLNG-BPF [test_maps] test_verif_scale3.o
>   CLNG-BPF [test_maps] test_vmlinux.o
>   CLNG-BPF [test_maps] test_xdp_adjust_tail_grow.o
>   CLNG-BPF [test_maps] test_xdp_adjust_tail_shrink.o
>   CLNG-BPF [test_maps] test_xdp_bpf2bpf.o
>   CLNG-BPF [test_maps] test_xdp.o
>   CLNG-BPF [test_maps] test_xdp_devmap_helpers.o
>   CLNG-BPF [test_maps] test_xdp_link.o
>   CLNG-BPF [test_maps] test_xdp_loop.o
>   CLNG-BPF [test_maps] test_xdp_meta.o
>   CLNG-BPF [test_maps] test_xdp_noinline.o
>   CLNG-BPF [test_maps] test_xdp_redirect.o
>   CLNG-BPF [test_maps] test_xdp_vlan.o
>   CLNG-BPF [test_maps] test_xdp_with_cpumap_helpers.o
>   CLNG-BPF [test_maps] test_xdp_with_devmap_helpers.o
>   CLNG-BPF [test_maps] trace_printk.o
>   CLNG-BPF [test_maps] trigger_bench.o
>   CLNG-BPF [test_maps] udp_limit.o
>   CLNG-BPF [test_maps] xdp_dummy.o
>   CLNG-BPF [test_maps] xdping_kern.o
>   CLNG-BPF [test_maps] xdp_redirect_map.o
>   CLNG-BPF [test_maps] xdp_tx.o
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   GEN-SKEL [test_progs] atomics.skel.h
>   GEN-SKEL [test_progs] bind4_prog.skel.h
> libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
>   GEN-SKEL [test_progs] bind6_prog.skel.h
> libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
>   GEN-SKEL [test_progs] bind_perm.skel.h
>   GEN-SKEL [test_progs] bpf_cubic.skel.h
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> Error: failed to open BPF object file: No such file or directory
> make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> [acme@seventh linux]$
> 
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 20:41     ` Arnaldo Carvalho de Melo
@ 2021-06-16 22:36       ` Andrii Nakryiko
  2021-06-17 14:48         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-16 22:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: bpf, dwarves, siudin

On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Wed, Jun 16, 2021 at 01:40:03PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Jun 16, 2021 at 11:56:06AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > > Hey Arnaldo,
>
> > > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > > by moving function encoding to separate method") break two selftests
> > > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > > because both tests rely on kernel BTF info.
>
> > > > You've previously asked about staging pahole changes. Did you make up
> > > > your mind about branch names and the process overall? Seems like a
> > > > good chance to bring this up ;-P
>
> > > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
>
> > > Ok, please add tmp.master as the staging branch, I'll move things to
> > > master only after it passing thru CI.
>
> > > Now looking at that code, must be something subtle...
>
> > Running selftests I'm getting a failure at:
>
> >   GEN-SKEL [test_progs] bpf_cubic.skel.h
> > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > Error: failed to open BPF object file: No such file or directory
> > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> > [acme@seventh linux]$
>
> > I'll try to reproduce what you reported, i.e. revert that patch, and
> > rebuild the kernel.
>
> I tried with 1.21 plus that ftrace fix but I still get:
>
> [acme@seventh linux]$ uname -a
> Linux seventh 5.13.0-rc6.pahole-58a98f76ac95b1bb+ #1 SMP Wed Jun 16 15:47:50 -03 2021 x86_64 x86_64 x86_64 GNU/Linux
>
> Which is pahole build up to:
>
> ⬢[acme@toolbox pahole]$ git log --oneline -4 58a98f76ac95b1bb
> 58a98f76ac95b1bb btf: Remove ftrace filter
> 7c60b0443cb01795 pahole: Fix error message when --header couldn't be read
> 7eea706c14997b4f pahole: Introduce --with_flexible_array option to show just types ending in a flexible array
> 25ad41e7b52e3ad6 (tag: v1.21) pahole: Prep 1.21
> ⬢[acme@toolbox pahole]$
>
> But selftests is still failing at:
>
> [acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ clean > /dev/null 2>&1
> [sudo] password for acme:
> [acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ clean > /dev/null 2>&1
> [acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/ | tail
> 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(5) .rodata.str1.1
> libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> Error: failed to open BPF object file: No such file or directory
> make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
>   CLNG-BPF [test_maps] xdping_kern.o
>   CLNG-BPF [test_maps] xdp_redirect_map.o
>   CLNG-BPF [test_maps] xdp_tx.o
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   GEN-SKEL [test_progs] atomics.skel.h
>   GEN-SKEL [test_progs] bind4_prog.skel.h
>   GEN-SKEL [test_progs] bind6_prog.skel.h
>   GEN-SKEL [test_progs] bind_perm.skel.h
>   GEN-SKEL [test_progs] bpf_cubic.skel.h
> make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> [acme@seventh linux]$
>
> And if I use pahole's BTF loader I find the info about that function:
>
> [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
>
> So this should be unrelated to the breakage you noticed in the CI.
>
> I'm trying to to reproduce the CI breakage by building the kernel and
> running selftests after a reboot.
>
> I suspect I'm missing something, can you see what it is?

Oh, I didn't realize initially what it is. This is not kernel-related,
you are right. You just need newer Clang. Can you please use nightly
version or build from sources? Basically, your Clang is too old and it
doesn't generate BTF information for extern functions in BPF code.

>
> - Arnaldo
>
> > [acme@seventh linux]$ uname -a
> > Linux seventh 5.13.0-rc6+ #1 SMP Wed Jun 16 11:59:35 -03 2021 x86_64 x86_64 x86_64 GNU/Linux
> >
> > [acme@seventh linux]$ sudo make -C tools/testing/selftests/bpf/

[...]

>
> --
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 18:25     ` Arnaldo Carvalho de Melo
@ 2021-06-16 22:38       ` Andrii Nakryiko
  2021-06-17  0:16         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-16 22:38 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: bpf, dwarves, siudin

On Wed, Jun 16, 2021 at 11:25 AM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Wed, Jun 16, 2021 at 10:40:45AM -0700, Andrii Nakryiko escreveu:
> > On Wed, Jun 16, 2021 at 7:56 AM Arnaldo Carvalho de Melo
> > <arnaldo.melo@gmail.com> wrote:
> > >
> > > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > > Hey Arnaldo,
> > > >
> > > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > > by moving function encoding to separate method") break two selftests
> > > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > > because both tests rely on kernel BTF info.
> > > >
> > > > You've previously asked about staging pahole changes. Did you make up
> > > > your mind about branch names and the process overall? Seems like a
> > > > good chance to bring this up ;-P
> > > >
> > > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
> > >
> > > Ok, please add tmp.master as the staging branch, I'll move things to
> > > master only after it passing thru CI.
> > >
> >
> > So I'm thinking about what's the best setup to catch pahole staging
> > problems, but not break main libbpf CI and kernel-patches CI flows.
>
> > How about we keep all the existing CI jobs to use pahole's master.
>
> Agreed.
>
> > Then add a separate job to do full kernel build with pahole built from
> > staging branch. And mark it as non-critical (or whatever the
> > terminology), so it doesn't mark the build red. I'd do that as a cron
> > job that runs every day. That way if you don't have anything urgent,
> > next day you'll get staging tested automatically. If you need to test
> > right now, there is a way to re-trigger previous build and it will
> > re-fetch latest staging (so there is a way for you to proactively
> > test).
> >
> > Basically, I want broken staging pahole to not interrupt anything we
> > are doing. WDYT?
>
> Sounds like a plan, please hand hold me on this, I'm not versed on
> github.

I'll set up everything from my side, and then we'll just setup proper
access rights for you to be able to trigger builds. We are migrating
everything from Travis CI to Github Actions, and I'm not yet too
familiar with Github Actions, so I might need a few iterations.

BTW, while you are investigating pahole regression, can you please
revert the offending commit and push it to master to make out CIs
green again?

>
> - Arnaldo
>
> > > Now looking at that code, must be something subtle...
> > >
> > > - Arnaldo
>
> --
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 22:38       ` Andrii Nakryiko
@ 2021-06-17  0:16         ` Arnaldo Carvalho de Melo
  2021-06-17  4:26           ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-17  0:16 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Arnaldo Carvalho de Melo, bpf, dwarves, siudin

Em Wed, Jun 16, 2021 at 03:38:38PM -0700, Andrii Nakryiko escreveu:
> On Wed, Jun 16, 2021 at 11:25 AM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > Em Wed, Jun 16, 2021 at 10:40:45AM -0700, Andrii Nakryiko escreveu:
> > > On Wed, Jun 16, 2021 at 7:56 AM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > > > Hey Arnaldo,

> > > > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > > > by moving function encoding to separate method") break two selftests
> > > > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > > > because both tests rely on kernel BTF info.

> > > > > You've previously asked about staging pahole changes. Did you make up
> > > > > your mind about branch names and the process overall? Seems like a
> > > > > good chance to bring this up ;-P

> > > > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152

> > > > Ok, please add tmp.master as the staging branch, I'll move things to
> > > > master only after it passing thru CI.
> > >
> > > So I'm thinking about what's the best setup to catch pahole staging
> > > problems, but not break main libbpf CI and kernel-patches CI flows.

> > > How about we keep all the existing CI jobs to use pahole's master.

> > Agreed.

> > > Then add a separate job to do full kernel build with pahole built from
> > > staging branch. And mark it as non-critical (or whatever the
> > > terminology), so it doesn't mark the build red. I'd do that as a cron
> > > job that runs every day. That way if you don't have anything urgent,
> > > next day you'll get staging tested automatically. If you need to test
> > > right now, there is a way to re-trigger previous build and it will
> > > re-fetch latest staging (so there is a way for you to proactively
> > > test).

> > > Basically, I want broken staging pahole to not interrupt anything we
> > > are doing. WDYT?

> > Sounds like a plan, please hand hold me on this, I'm not versed on
> > github.

> I'll set up everything from my side, and then we'll just setup proper
> access rights for you to be able to trigger builds. We are migrating
> everything from Travis CI to Github Actions, and I'm not yet too
> familiar with Github Actions, so I might need a few iterations.

Ok dokey
 
> BTW, while you are investigating pahole regression, can you please
> revert the offending commit and push it to master to make out CIs
> green again?

Sure, just did it. Lets see if makes things green again.

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17  0:16         ` Arnaldo Carvalho de Melo
@ 2021-06-17  4:26           ` Andrii Nakryiko
  0 siblings, 0 replies; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-17  4:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: bpf, dwarves, siudin

On Wed, Jun 16, 2021 at 5:16 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Wed, Jun 16, 2021 at 03:38:38PM -0700, Andrii Nakryiko escreveu:
> > On Wed, Jun 16, 2021 at 11:25 AM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > Em Wed, Jun 16, 2021 at 10:40:45AM -0700, Andrii Nakryiko escreveu:
> > > > On Wed, Jun 16, 2021 at 7:56 AM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > > Em Tue, Jun 15, 2021 at 04:30:03PM -0700, Andrii Nakryiko escreveu:
> > > > > > Hey Arnaldo,
>
> > > > > > Seems like de3a7f912559 ("btf_encoder: Reduce the size of encode_cu()
> > > > > > by moving function encoding to separate method") break two selftests
> > > > > > in libbpf CI (see [0]). Please take a look. I suspect some bad BTF,
> > > > > > because both tests rely on kernel BTF info.
>
> > > > > > You've previously asked about staging pahole changes. Did you make up
> > > > > > your mind about branch names and the process overall? Seems like a
> > > > > > good chance to bring this up ;-P
>
> > > > > >   [0] https://travis-ci.com/github/libbpf/libbpf/jobs/514329152
>
> > > > > Ok, please add tmp.master as the staging branch, I'll move things to
> > > > > master only after it passing thru CI.
> > > >
> > > > So I'm thinking about what's the best setup to catch pahole staging
> > > > problems, but not break main libbpf CI and kernel-patches CI flows.
>
> > > > How about we keep all the existing CI jobs to use pahole's master.
>
> > > Agreed.
>
> > > > Then add a separate job to do full kernel build with pahole built from
> > > > staging branch. And mark it as non-critical (or whatever the
> > > > terminology), so it doesn't mark the build red. I'd do that as a cron
> > > > job that runs every day. That way if you don't have anything urgent,
> > > > next day you'll get staging tested automatically. If you need to test
> > > > right now, there is a way to re-trigger previous build and it will
> > > > re-fetch latest staging (so there is a way for you to proactively
> > > > test).
>
> > > > Basically, I want broken staging pahole to not interrupt anything we
> > > > are doing. WDYT?
>
> > > Sounds like a plan, please hand hold me on this, I'm not versed on
> > > github.
>
> > I'll set up everything from my side, and then we'll just setup proper
> > access rights for you to be able to trigger builds. We are migrating
> > everything from Travis CI to Github Actions, and I'm not yet too
> > familiar with Github Actions, so I might need a few iterations.
>
> Ok dokey

Please see https://github.com/libbpf/libbpf/pull/325, Sergey is
setting up staging pahole testing.

>
> > BTW, while you are investigating pahole regression, can you please
> > revert the offending commit and push it to master to make out CIs
> > green again?
>
> Sure, just did it. Lets see if makes things green again.

It did, thanks!

>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-16 22:36       ` Andrii Nakryiko
@ 2021-06-17 14:48         ` Arnaldo Carvalho de Melo
  2021-06-17 19:53           ` Arnaldo Carvalho de Melo
  2021-06-17 20:00           ` Andrii Nakryiko
  0 siblings, 2 replies; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-17 14:48 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Yonghong Song, bpf, dwarves, siudin

Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > And if I use pahole's BTF loader I find the info about that function:
> >
> > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> >
> > So this should be unrelated to the breakage you noticed in the CI.
> >
> > I'm trying to to reproduce the CI breakage by building the kernel and
> > running selftests after a reboot.
> >
> > I suspect I'm missing something, can you see what it is?
> 
> Oh, I didn't realize initially what it is. This is not kernel-related,
> you are right. You just need newer Clang. Can you please use nightly
> version or build from sources? Basically, your Clang is too old and it
> doesn't generate BTF information for extern functions in BPF code.

Oh well, I thought that that clang was new enough, the system being
Fedora rawhide:

[acme@seventh ~]$ clang -v |& head -1
clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)

I'm now building the single-repo main...

Would you consider a patch for libbpf that would turn this:

> > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > Error: failed to open BPF object file: No such file or directory
> > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'

Into:

libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
HINT: That is where clang started generating BTF information for extern functions in BPF code.

?

:-)

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 14:48         ` Arnaldo Carvalho de Melo
@ 2021-06-17 19:53           ` Arnaldo Carvalho de Melo
  2021-06-17 20:03             ` Andrii Nakryiko
  2021-06-17 20:00           ` Andrii Nakryiko
  1 sibling, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-17 19:53 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: Yonghong Song, bpf, dwarves, siudin

Em Thu, Jun 17, 2021 at 11:48:47AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > And if I use pahole's BTF loader I find the info about that function:

> > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3

> > > So this should be unrelated to the breakage you noticed in the CI.

> > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > running selftests after a reboot.

> > > I suspect I'm missing something, can you see what it is?

> > Oh, I didn't realize initially what it is. This is not kernel-related,
> > you are right. You just need newer Clang. Can you please use nightly
> > version or build from sources? Basically, your Clang is too old and it
> > doesn't generate BTF information for extern functions in BPF code.

> Oh well, I thought that that clang was new enough, the system being
> Fedora rawhide:

> [acme@seventh ~]$ clang -v |& head -1
> clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)

> I'm now building the single-repo main...

So I updated clang and now I'm stumbling on another one, again using
pahole 1.21 + fixes, without any of my changes, is this a known issue?

[root@seventh bpf]# pwd
/mnt/linux/tools/testing/selftests/bpf
[root@seventh bpf]# git log --oneline -5
94f0b2d4a1d0 (HEAD -> master, torvalds/master) proc: only require mm_struct for writing
a33d62662d27 afs: Fix an IS_ERR() vs NULL check
009c9aa5be65 (tag: v5.13-rc6) Linux 5.13-rc6
e4e453434a19 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
960f0716d80f Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[root@seventh bpf]#
[root@seventh bpf]# make run_tests
<SNIP>
  GEN-SKEL [test_progs] atomic_bounds.skel.h
  GEN-SKEL [test_progs] atomics.skel.h
  GEN-SKEL [test_progs] bind4_prog.skel.h
libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
  GEN-SKEL [test_progs] bind6_prog.skel.h
libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
  GEN-SKEL [test_progs] bind_perm.skel.h
  GEN-SKEL [test_progs] bpf_cubic.skel.h
libbpf: ELF relo #0 in section #15 has unexpected type 2 in /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o
Error: failed to link '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o': Unknown error -22 (-22)
make: *** [Makefile:456: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 234
[root@seventh bpf]# clang -v |& head -2
clang version 13.0.0 (https://github.com/llvm/llvm-project dee2c76b4c46e71903e3d86ab7555a80d51d1288)
Target: x86_64-unknown-linux-gnu
[root@seventh bpf]#

- Arnaldo
 
> Would you consider a patch for libbpf that would turn this:
> 
> > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > Error: failed to open BPF object file: No such file or directory
> > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> 
> Into:
> 
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> HINT: That is where clang started generating BTF information for extern functions in BPF code.
> 
> ?
> 
> :-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 14:48         ` Arnaldo Carvalho de Melo
  2021-06-17 19:53           ` Arnaldo Carvalho de Melo
@ 2021-06-17 20:00           ` Andrii Nakryiko
  2021-06-17 20:39             ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-17 20:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Yonghong Song, bpf, dwarves, siudin

On Thu, Jun 17, 2021 at 7:48 AM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > And if I use pahole's BTF loader I find the info about that function:
> > >
> > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> > >
> > > So this should be unrelated to the breakage you noticed in the CI.
> > >
> > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > running selftests after a reboot.
> > >
> > > I suspect I'm missing something, can you see what it is?
> >
> > Oh, I didn't realize initially what it is. This is not kernel-related,
> > you are right. You just need newer Clang. Can you please use nightly
> > version or build from sources? Basically, your Clang is too old and it
> > doesn't generate BTF information for extern functions in BPF code.
>
> Oh well, I thought that that clang was new enough, the system being
> Fedora rawhide:
>
> [acme@seventh ~]$ clang -v |& head -1
> clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
>
> I'm now building the single-repo main...
>
> Would you consider a patch for libbpf that would turn this:
>
> > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > Error: failed to open BPF object file: No such file or directory
> > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
>
> Into:
>
> libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> HINT: That is where clang started generating BTF information for extern functions in BPF code.
>
> ?
>
> :-)

I'd rather not :)

>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 19:53           ` Arnaldo Carvalho de Melo
@ 2021-06-17 20:03             ` Andrii Nakryiko
  2021-06-17 20:41               ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-17 20:03 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Yonghong Song, bpf, dwarves, siudin

On Thu, Jun 17, 2021 at 12:53 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Thu, Jun 17, 2021 at 11:48:47AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > And if I use pahole's BTF loader I find the info about that function:
>
> > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
>
> > > > So this should be unrelated to the breakage you noticed in the CI.
>
> > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > running selftests after a reboot.
>
> > > > I suspect I'm missing something, can you see what it is?
>
> > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > you are right. You just need newer Clang. Can you please use nightly
> > > version or build from sources? Basically, your Clang is too old and it
> > > doesn't generate BTF information for extern functions in BPF code.
>
> > Oh well, I thought that that clang was new enough, the system being
> > Fedora rawhide:
>
> > [acme@seventh ~]$ clang -v |& head -1
> > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
>
> > I'm now building the single-repo main...
>
> So I updated clang and now I'm stumbling on another one, again using
> pahole 1.21 + fixes, without any of my changes, is this a known issue?
>
> [root@seventh bpf]# pwd
> /mnt/linux/tools/testing/selftests/bpf
> [root@seventh bpf]# git log --oneline -5
> 94f0b2d4a1d0 (HEAD -> master, torvalds/master) proc: only require mm_struct for writing

Please use bpf-next tree. Bleeding edge clang started generating new
ELF relocation types, so you need bleeding edge libbpfs in selftests
to handle that during static linking.

> a33d62662d27 afs: Fix an IS_ERR() vs NULL check
> 009c9aa5be65 (tag: v5.13-rc6) Linux 5.13-rc6
> e4e453434a19 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> 960f0716d80f Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
> [root@seventh bpf]#
> [root@seventh bpf]# make run_tests

I never use make run_tests.

Try `make clean && make -j60 && sudo ./test_progs`.

> <SNIP>
>   GEN-SKEL [test_progs] atomic_bounds.skel.h
>   GEN-SKEL [test_progs] atomics.skel.h
>   GEN-SKEL [test_progs] bind4_prog.skel.h
> libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
>   GEN-SKEL [test_progs] bind6_prog.skel.h
> libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
>   GEN-SKEL [test_progs] bind_perm.skel.h
>   GEN-SKEL [test_progs] bpf_cubic.skel.h
> libbpf: ELF relo #0 in section #15 has unexpected type 2 in /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o
> Error: failed to link '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o': Unknown error -22 (-22)
> make: *** [Makefile:456: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 234
> [root@seventh bpf]# clang -v |& head -2
> clang version 13.0.0 (https://github.com/llvm/llvm-project dee2c76b4c46e71903e3d86ab7555a80d51d1288)
> Target: x86_64-unknown-linux-gnu
> [root@seventh bpf]#
>
> - Arnaldo
>
> > Would you consider a patch for libbpf that would turn this:
> >
> > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > Error: failed to open BPF object file: No such file or directory
> > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> >
> > Into:
> >
> > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> >
> > ?
> >
> > :-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 20:00           ` Andrii Nakryiko
@ 2021-06-17 20:39             ` Arnaldo Carvalho de Melo
  2021-06-17 21:52               ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-17 20:39 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Arnaldo Carvalho de Melo, Yonghong Song, bpf, dwarves, siudin

Em Thu, Jun 17, 2021 at 01:00:11PM -0700, Andrii Nakryiko escreveu:
> On Thu, Jun 17, 2021 at 7:48 AM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > And if I use pahole's BTF loader I find the info about that function:
> > > >
> > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> > > >
> > > > So this should be unrelated to the breakage you noticed in the CI.
> > > >
> > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > running selftests after a reboot.
> > > >
> > > > I suspect I'm missing something, can you see what it is?
> > >
> > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > you are right. You just need newer Clang. Can you please use nightly
> > > version or build from sources? Basically, your Clang is too old and it
> > > doesn't generate BTF information for extern functions in BPF code.
> >
> > Oh well, I thought that that clang was new enough, the system being
> > Fedora rawhide:
> >
> > [acme@seventh ~]$ clang -v |& head -1
> > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
> >
> > I'm now building the single-repo main...
> >
> > Would you consider a patch for libbpf that would turn this:
> >
> > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > Error: failed to open BPF object file: No such file or directory
> > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> >
> > Into:
> >
> > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> >
> > ?
> >
> > :-)
> 
> I'd rather not :)

Not even a "please update clang?"

"-2" and "Error 255" doesn't seem that helpful :-\

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 20:03             ` Andrii Nakryiko
@ 2021-06-17 20:41               ` Arnaldo Carvalho de Melo
  2021-06-17 21:56                 ` Andrii Nakryiko
  0 siblings, 1 reply; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-17 20:41 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Arnaldo Carvalho de Melo, Yonghong Song, bpf, dwarves, siudin

Em Thu, Jun 17, 2021 at 01:03:17PM -0700, Andrii Nakryiko escreveu:
> On Thu, Jun 17, 2021 at 12:53 PM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Thu, Jun 17, 2021 at 11:48:47AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > > And if I use pahole's BTF loader I find the info about that function:
> >
> > > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> >
> > > > > So this should be unrelated to the breakage you noticed in the CI.
> >
> > > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > > running selftests after a reboot.
> >
> > > > > I suspect I'm missing something, can you see what it is?
> >
> > > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > > you are right. You just need newer Clang. Can you please use nightly
> > > > version or build from sources? Basically, your Clang is too old and it
> > > > doesn't generate BTF information for extern functions in BPF code.
> >
> > > Oh well, I thought that that clang was new enough, the system being
> > > Fedora rawhide:
> >
> > > [acme@seventh ~]$ clang -v |& head -1
> > > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
> >
> > > I'm now building the single-repo main...
> >
> > So I updated clang and now I'm stumbling on another one, again using
> > pahole 1.21 + fixes, without any of my changes, is this a known issue?
> >
> > [root@seventh bpf]# pwd
> > /mnt/linux/tools/testing/selftests/bpf
> > [root@seventh bpf]# git log --oneline -5
> > 94f0b2d4a1d0 (HEAD -> master, torvalds/master) proc: only require mm_struct for writing
> 
> Please use bpf-next tree. Bleeding edge clang started generating new
> ELF relocation types, so you need bleeding edge libbpfs in selftests
> to handle that during static linking.

Yeah, bleeding edge indeed, will use that then
 
> > a33d62662d27 afs: Fix an IS_ERR() vs NULL check
> > 009c9aa5be65 (tag: v5.13-rc6) Linux 5.13-rc6
> > e4e453434a19 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> > 960f0716d80f Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
> > [root@seventh bpf]#
> > [root@seventh bpf]# make run_tests
> 
> I never use make run_tests.

One more thing to put into my BTF development cheat sheet, thanks.

I looked at git log tools/testing/selftests/bpf and looked for the first
commit, which I thought would have instructions on how to use it, and
there I found about 'make run_tests'.
 
> Try `make clean && make -j60 && sudo ./test_progs`.
> 
> > <SNIP>
> >   GEN-SKEL [test_progs] atomic_bounds.skel.h
> >   GEN-SKEL [test_progs] atomics.skel.h
> >   GEN-SKEL [test_progs] bind4_prog.skel.h
> > libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
> >   GEN-SKEL [test_progs] bind6_prog.skel.h
> > libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
> >   GEN-SKEL [test_progs] bind_perm.skel.h
> >   GEN-SKEL [test_progs] bpf_cubic.skel.h
> > libbpf: ELF relo #0 in section #15 has unexpected type 2 in /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o
> > Error: failed to link '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o': Unknown error -22 (-22)
> > make: *** [Makefile:456: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 234
> > [root@seventh bpf]# clang -v |& head -2
> > clang version 13.0.0 (https://github.com/llvm/llvm-project dee2c76b4c46e71903e3d86ab7555a80d51d1288)
> > Target: x86_64-unknown-linux-gnu
> > [root@seventh bpf]#
> >
> > - Arnaldo
> >
> > > Would you consider a patch for libbpf that would turn this:
> > >
> > > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > > Error: failed to open BPF object file: No such file or directory
> > > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> > >
> > > Into:
> > >
> > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> > >
> > > ?
> > >
> > > :-)

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 20:39             ` Arnaldo Carvalho de Melo
@ 2021-06-17 21:52               ` Andrii Nakryiko
  2021-06-18 17:21                 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-17 21:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Yonghong Song, bpf, dwarves, siudin

On Thu, Jun 17, 2021 at 1:39 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Thu, Jun 17, 2021 at 01:00:11PM -0700, Andrii Nakryiko escreveu:
> > On Thu, Jun 17, 2021 at 7:48 AM Arnaldo Carvalho de Melo
> > <arnaldo.melo@gmail.com> wrote:
> > >
> > > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > > And if I use pahole's BTF loader I find the info about that function:
> > > > >
> > > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> > > > >
> > > > > So this should be unrelated to the breakage you noticed in the CI.
> > > > >
> > > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > > running selftests after a reboot.
> > > > >
> > > > > I suspect I'm missing something, can you see what it is?
> > > >
> > > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > > you are right. You just need newer Clang. Can you please use nightly
> > > > version or build from sources? Basically, your Clang is too old and it
> > > > doesn't generate BTF information for extern functions in BPF code.
> > >
> > > Oh well, I thought that that clang was new enough, the system being
> > > Fedora rawhide:
> > >
> > > [acme@seventh ~]$ clang -v |& head -1
> > > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
> > >
> > > I'm now building the single-repo main...
> > >
> > > Would you consider a patch for libbpf that would turn this:
> > >
> > > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > > Error: failed to open BPF object file: No such file or directory
> > > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> > >
> > > Into:
> > >
> > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> > >
> > > ?
> > >
> > > :-)
> >
> > I'd rather not :)
>
> Not even a "please update clang?"
>

It could be old clang, it could also be because BPF program wasn't
built with BTF (i.e., you didn't specify -g during clang invocation),
it could probably be due to some other problems as well.

I don't want libbpf to turn into a library that's constantly trying to
guess possible problems. It will become a complete mess to maintain.
And when it will still be wrong sometimes, causing more harm than
being helpful. Especially for relatively uncommon problems like this.

Those people who are trying to use features like BPF unstable helpers
(calling whitelisted kernel functions), should know that they need
Clang of some version and build with BTF. We have that also mentioned
in selftest/bpf/README.rst. I'd rather not duplicate all that in
libbpf code as well.

> "-2" and "Error 255" doesn't seem that helpful :-\

But "failed to find BTF for extern 'tcp_cong_avoid_ai'" is pretty
helpful. -2 is for more involved debugging, if necessary.

>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 20:41               ` Arnaldo Carvalho de Melo
@ 2021-06-17 21:56                 ` Andrii Nakryiko
  0 siblings, 0 replies; 19+ messages in thread
From: Andrii Nakryiko @ 2021-06-17 21:56 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Yonghong Song, bpf, dwarves, siudin

On Thu, Jun 17, 2021 at 1:41 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Thu, Jun 17, 2021 at 01:03:17PM -0700, Andrii Nakryiko escreveu:
> > On Thu, Jun 17, 2021 at 12:53 PM Arnaldo Carvalho de Melo
> > <arnaldo.melo@gmail.com> wrote:
> > >
> > > Em Thu, Jun 17, 2021 at 11:48:47AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > > > And if I use pahole's BTF loader I find the info about that function:
> > >
> > > > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> > >
> > > > > > So this should be unrelated to the breakage you noticed in the CI.
> > >
> > > > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > > > running selftests after a reboot.
> > >
> > > > > > I suspect I'm missing something, can you see what it is?
> > >
> > > > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > > > you are right. You just need newer Clang. Can you please use nightly
> > > > > version or build from sources? Basically, your Clang is too old and it
> > > > > doesn't generate BTF information for extern functions in BPF code.
> > >
> > > > Oh well, I thought that that clang was new enough, the system being
> > > > Fedora rawhide:
> > >
> > > > [acme@seventh ~]$ clang -v |& head -1
> > > > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
> > >
> > > > I'm now building the single-repo main...
> > >
> > > So I updated clang and now I'm stumbling on another one, again using
> > > pahole 1.21 + fixes, without any of my changes, is this a known issue?
> > >
> > > [root@seventh bpf]# pwd
> > > /mnt/linux/tools/testing/selftests/bpf
> > > [root@seventh bpf]# git log --oneline -5
> > > 94f0b2d4a1d0 (HEAD -> master, torvalds/master) proc: only require mm_struct for writing
> >
> > Please use bpf-next tree. Bleeding edge clang started generating new
> > ELF relocation types, so you need bleeding edge libbpfs in selftests
> > to handle that during static linking.
>
> Yeah, bleeding edge indeed, will use that then
>
> > > a33d62662d27 afs: Fix an IS_ERR() vs NULL check
> > > 009c9aa5be65 (tag: v5.13-rc6) Linux 5.13-rc6
> > > e4e453434a19 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> > > 960f0716d80f Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
> > > [root@seventh bpf]#
> > > [root@seventh bpf]# make run_tests
> >
> > I never use make run_tests.
>
> One more thing to put into my BTF development cheat sheet, thanks.
>
> I looked at git log tools/testing/selftests/bpf and looked for the first
> commit, which I thought would have instructions on how to use it, and
> there I found about 'make run_tests'.
>

There is probably nothing wrong with running make run_tests, it's just
not something that I regularly do. Our CIs also run only test_progs,
test_verifier and test_maps, so that's what is tested all the time.

Speaking of CIs, please see [0]. Please look around and see if you can
subscribe to notifications about failures for that pahole staging
test. That way you'll get notification that something in tmp.master
breaks libbpf CI. Thanks!

  [0] https://github.com/libbpf/libbpf/actions/runs/947856692


> > Try `make clean && make -j60 && sudo ./test_progs`.
> >
> > > <SNIP>
> > >   GEN-SKEL [test_progs] atomic_bounds.skel.h
> > >   GEN-SKEL [test_progs] atomics.skel.h
> > >   GEN-SKEL [test_progs] bind4_prog.skel.h
> > > libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
> > >   GEN-SKEL [test_progs] bind6_prog.skel.h
> > > libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1
> > >   GEN-SKEL [test_progs] bind_perm.skel.h
> > >   GEN-SKEL [test_progs] bpf_cubic.skel.h
> > > libbpf: ELF relo #0 in section #15 has unexpected type 2 in /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o
> > > Error: failed to link '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.o': Unknown error -22 (-22)
> > > make: *** [Makefile:456: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 234
> > > [root@seventh bpf]# clang -v |& head -2
> > > clang version 13.0.0 (https://github.com/llvm/llvm-project dee2c76b4c46e71903e3d86ab7555a80d51d1288)
> > > Target: x86_64-unknown-linux-gnu
> > > [root@seventh bpf]#
> > >
> > > - Arnaldo
> > >
> > > > Would you consider a patch for libbpf that would turn this:
> > > >
> > > > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > > > Error: failed to open BPF object file: No such file or directory
> > > > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> > > >
> > > > Into:
> > > >
> > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > > > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> > > >
> > > > ?
> > > >
> > > > :-)
>
> --
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: latest pahole breaks libbpf CI and let's talk about staging
  2021-06-17 21:52               ` Andrii Nakryiko
@ 2021-06-18 17:21                 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 19+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-06-18 17:21 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Arnaldo Carvalho de Melo, Yonghong Song, bpf, dwarves, siudin

Em Thu, Jun 17, 2021 at 02:52:57PM -0700, Andrii Nakryiko escreveu:
> On Thu, Jun 17, 2021 at 1:39 PM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Thu, Jun 17, 2021 at 01:00:11PM -0700, Andrii Nakryiko escreveu:
> > > On Thu, Jun 17, 2021 at 7:48 AM Arnaldo Carvalho de Melo
> > > <arnaldo.melo@gmail.com> wrote:
> > > >
> > > > Em Wed, Jun 16, 2021 at 03:36:54PM -0700, Andrii Nakryiko escreveu:
> > > > > On Wed, Jun 16, 2021 at 1:41 PM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > > > > > And if I use pahole's BTF loader I find the info about that function:
> > > > > >
> > > > > > [acme@seventh linux]$ strace -e openat -o /tmp/bla pfunct -F btf tcp_cong_avoid_ai  ; grep vmlinux /tmp/bla
> > > > > > void tcp_cong_avoid_ai(struct tcp_sock * tp, u32 w, u32 acked);
> > > > > > openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 3
> > > > > >
> > > > > > So this should be unrelated to the breakage you noticed in the CI.
> > > > > >
> > > > > > I'm trying to to reproduce the CI breakage by building the kernel and
> > > > > > running selftests after a reboot.
> > > > > >
> > > > > > I suspect I'm missing something, can you see what it is?
> > > > >
> > > > > Oh, I didn't realize initially what it is. This is not kernel-related,
> > > > > you are right. You just need newer Clang. Can you please use nightly
> > > > > version or build from sources? Basically, your Clang is too old and it
> > > > > doesn't generate BTF information for extern functions in BPF code.
> > > >
> > > > Oh well, I thought that that clang was new enough, the system being
> > > > Fedora rawhide:
> > > >
> > > > [acme@seventh ~]$ clang -v |& head -1
> > > > clang version 12.0.0 (https://github.com/llvm/llvm-project 87369c626114ae17f4c637635c119e6de0856a9a)
> > > >
> > > > I'm now building the single-repo main...
> > > >
> > > > Would you consider a patch for libbpf that would turn this:
> > > >
> > > > > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > > > > Error: failed to open BPF object file: No such file or directory
> > > > > > > make: *** [Makefile:460: /mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h] Error 255
> > > > > > > make: *** Deleting file '/mnt/linux/tools/testing/selftests/bpf/bpf_cubic.skel.h'
> > > > > > > make: Leaving directory '/mnt/linux/tools/testing/selftests/bpf'
> > > >
> > > > Into:
> > > >
> > > > libbpf: failed to find BTF for extern 'tcp_cong_avoid_ai' [27] section: -2
> > > > HINT: Please update your clang/llvm toolchain to at least cset abcdef123456
> > > > HINT: That is where clang started generating BTF information for extern functions in BPF code.
> > > >
> > > > ?
> > > >
> > > > :-)
> > >
> > > I'd rather not :)
> >
> > Not even a "please update clang?"
> >
> 
> It could be old clang, it could also be because BPF program wasn't
> built with BTF (i.e., you didn't specify -g during clang invocation),
> it could probably be due to some other problems as well.

Perhaps:

"Please look at http://bla.html/known-reasons-for-failure.html?

Perhaps we could even ask the Cilium people to take care of that since
they have such wonderful, detailed docs? 8-)

I understand that it is indeed difficult (albeit I find it valid/useful)
to give useful information about the myriad ways this can blown up, but
reducing to some degree the difficulties of testing libbpf, etc, is
something I think is important.
 
> I don't want libbpf to turn into a library that's constantly trying to
> guess possible problems. It will become a complete mess to maintain.
> And when it will still be wrong sometimes, causing more harm than
> being helpful. Especially for relatively uncommon problems like this.
> 
> Those people who are trying to use features like BPF unstable helpers
> (calling whitelisted kernel functions), should know that they need
> Clang of some version and build with BTF. We have that also mentioned
> in selftest/bpf/README.rst. I'd rather not duplicate all that in
> libbpf code as well.

Perhaps then just say:

"Please run: cat tools/testing/selftest/bpf/README.rst"

8-)

This could be in the makefile, no need to bother libbpf with that.

You're working on this daily, some people do it from time to time, but
nah, I'll stop here, felt just that I had to say it fwiw.

- Arnaldo
 
> > "-2" and "Error 255" doesn't seem that helpful :-\
> 
> But "failed to find BTF for extern 'tcp_cong_avoid_ai'" is pretty
> helpful. -2 is for more involved debugging, if necessary.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-06-18 17:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 23:30 latest pahole breaks libbpf CI and let's talk about staging Andrii Nakryiko
2021-06-16 14:56 ` Arnaldo Carvalho de Melo
2021-06-16 16:40   ` Arnaldo Carvalho de Melo
2021-06-16 20:41     ` Arnaldo Carvalho de Melo
2021-06-16 22:36       ` Andrii Nakryiko
2021-06-17 14:48         ` Arnaldo Carvalho de Melo
2021-06-17 19:53           ` Arnaldo Carvalho de Melo
2021-06-17 20:03             ` Andrii Nakryiko
2021-06-17 20:41               ` Arnaldo Carvalho de Melo
2021-06-17 21:56                 ` Andrii Nakryiko
2021-06-17 20:00           ` Andrii Nakryiko
2021-06-17 20:39             ` Arnaldo Carvalho de Melo
2021-06-17 21:52               ` Andrii Nakryiko
2021-06-18 17:21                 ` Arnaldo Carvalho de Melo
2021-06-16 17:40   ` Andrii Nakryiko
2021-06-16 18:25     ` Arnaldo Carvalho de Melo
2021-06-16 22:38       ` Andrii Nakryiko
2021-06-17  0:16         ` Arnaldo Carvalho de Melo
2021-06-17  4:26           ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).