* Re: runqslower build failed on Debian9 [not found] <60b05d23-6352-b978-3bf7-5a86466bb297@cn.fujitsu.com> @ 2020-03-26 20:28 ` Andrii Nakryiko [not found] ` <84a70348-62e3-728b-d934-28e902d40fd0@cn.fujitsu.com> 0 siblings, 1 reply; 4+ messages in thread From: Andrii Nakryiko @ 2020-03-26 20:28 UTC (permalink / raw) To: Liu Yiding; +Cc: linux-kselftest, bpf On 3/25/20 10:26 PM, Liu Yiding wrote: > Hi, Andrii. > > I noticed you had added runqslower tool to tools/bpf, so drop this > problem to you. > > > Now i failed to run bpf tests since i can't build runqslower. > > Testing env: "Debian GNU/Linux 9 (stretch)" > > kernel: 5.6.0-rc5 > > gcc: gcc 6.3 > > clang: clang-11. > > > Description: Build runqslower failed due to build error "incomplete > type" and libbpf show unsupported BTF_KIND:7. > > Whole build log please see the attatchment. > > > Error info > > ``` > > root@vm-snb-144 ~/linus/tools/bpf# make > > Auto-detecting system features: > ... libbfd: [ on ] > ... disassembler-four-args: [ OFF ] > > [snip] > > INSTALL bpftool > LINK bpf_asm > GEN vmlinux.h > libbpf: unsupported BTF_KIND:7 (Many unsupported errors) > libbpf: unsupported BTF_KIND:7 > libbpf: unsupported BTF_KIND:7 > Would you be able to share BTF of vmlinux that is used to generate vmlinux.h? Please run in verbose mode: `make V=1` and search for `bpftool btf dump file` command. It should point either to /sys/kernel/btf/vmlinux or some other location, depending on how things are set up on your side. If it's /sys/kernel/btf/vmlinux, you can just `cat /sys/kernel/btf/vmlinux > my_btf.bin`. If it's some other file, easiest would be to just share that file. If not, it's possible to extract .BTF ELF section, let me know if you need help with that. > [snip] > > (Many incomplete type errors) > > .output/vmlinux.h:8401:18: error: field has incomplete type 'struct > idt_bits' > struct idt_bits bits; > ^ > .output/vmlinux.h:8396:8: note: forward declaration of 'struct idt_bits' > struct idt_bits; > ^ > .output/vmlinux.h:8598:21: error: field has incomplete type 'struct > trace_entry' > struct trace_entry ent; > ^ > .output/vmlinux.h:8595:8: note: forward declaration of 'struct trace_entry' > struct trace_entry; > ^ > .output/vmlinux.h:9006:25: error: array has incomplete element type > 'struct cyc2ns_data' > struct cyc2ns_data data[2]; > ^ > .output/vmlinux.h:3669:8: note: forward declaration of 'struct cyc2ns_data' > struct cyc2ns_data; > ^ > fatal error: too many errors emitted, stopping now [-ferror-limit=] > 20 errors generated. > Makefile:56: recipe for target '.output/runqslower.bpf.o' failed > make[1]: *** [.output/runqslower.bpf.o] Error 1 > Makefile:119: recipe for target 'runqslower' failed > make: *** [runqslower] Error 2 > > ``` > > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <84a70348-62e3-728b-d934-28e902d40fd0@cn.fujitsu.com>]
* Re: runqslower build failed on Debian9 [not found] ` <84a70348-62e3-728b-d934-28e902d40fd0@cn.fujitsu.com> @ 2020-03-30 0:46 ` Liu Yiding [not found] ` <a2771f66-b7ff-f320-dbd6-0967c189834f@cn.fujitsu.com> 0 siblings, 1 reply; 4+ messages in thread From: Liu Yiding @ 2020-03-30 0:46 UTC (permalink / raw) To: Andrii Nakryiko; +Cc: linux-kselftest, bpf Something wrong with my smtp and this email missed. Send again. On 3/27/20 11:09 AM, Liu Yiding wrote: > Hi, Andrii. > > Thanks for your prompt reply! > > Please check attatchment for my_btf.bin. > > > On 3/27/20 4:28 AM, Andrii Nakryiko wrote: >> Would you be able to share BTF of vmlinux that is used to generate >> vmlinux.h? Please run in verbose mode: `make V=1` and search for >> `bpftool btf dump file` command. It should point either to >> /sys/kernel/btf/vmlinux or some other location, depending on how >> things are set up on your side. >> >> If it's /sys/kernel/btf/vmlinux, you can just `cat >> /sys/kernel/btf/vmlinux > my_btf.bin`. If it's some other file, >> easiest would be to just share that file. If not, it's possible to >> extract .BTF ELF section, let me know if you need help with that. > -- Best Regards. Liu Yiding ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <a2771f66-b7ff-f320-dbd6-0967c189834f@cn.fujitsu.com>]
* Re: runqslower build failed on Debian9 [not found] ` <a2771f66-b7ff-f320-dbd6-0967c189834f@cn.fujitsu.com> @ 2020-03-30 6:09 ` Andrii Nakryiko [not found] ` <7705ca15-0d63-2e17-b947-51852c196c4b@cn.fujitsu.com> 0 siblings, 1 reply; 4+ messages in thread From: Andrii Nakryiko @ 2020-03-30 6:09 UTC (permalink / raw) To: Liu Yiding; +Cc: linux-kselftest, bpf, andrii.nakryiko On 3/29/20 5:48 PM, Liu Yiding wrote: > Add attachment. > Your BTF seems to be invalid. It has struct perf_ibs, which has a first field `struct pmu pmu` field with valid-looking size of 296 bytes, **but** the type that field points to is not a complete `struct pmu` definition, but rather just forward declaration. The way it is it shouldn't be even compilable, because forward declaration of a struct doesn't specify the size of a struct, so compiler should have rejected it. So it must be that either DWARF generated by compiler isn't correct, or there is DWARF -> BTF conversion bug somewhere. Are you using any special DWARF Kconfig settings? Maybe you can share your full .config and I might try to repro it on my machine. But either way, that warning you get is a valid one, it should be illegal to have non-pointer forward-declared struct as a type for a struct member. > > On 3/30/20 8:46 AM, Liu Yiding wrote: >> Something wrong with my smtp and this email missed. >> >> Send again. >> >> >> On 3/27/20 11:09 AM, Liu Yiding wrote: >>> Hi, Andrii. >>> >>> Thanks for your prompt reply! >>> >>> Please check attatchment for my_btf.bin. >>> >>> >>> On 3/27/20 4:28 AM, Andrii Nakryiko wrote: >>>> Would you be able to share BTF of vmlinux that is used to generate >>>> vmlinux.h? Please run in verbose mode: `make V=1` and search for >>>> `bpftool btf dump file` command. It should point either to >>>> /sys/kernel/btf/vmlinux or some other location, depending on how >>>> things are set up on your side. >>>> >>>> If it's /sys/kernel/btf/vmlinux, you can just `cat >>>> /sys/kernel/btf/vmlinux > my_btf.bin`. If it's some other file, >>>> easiest would be to just share that file. If not, it's possible to >>>> extract .BTF ELF section, let me know if you need help with that. >>> ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <7705ca15-0d63-2e17-b947-51852c196c4b@cn.fujitsu.com>]
* Re: runqslower build failed on Debian9 [not found] ` <7705ca15-0d63-2e17-b947-51852c196c4b@cn.fujitsu.com> @ 2020-03-31 19:47 ` Andrii Nakryiko 0 siblings, 0 replies; 4+ messages in thread From: Andrii Nakryiko @ 2020-03-31 19:47 UTC (permalink / raw) To: Liu Yiding Cc: Andrii Nakryiko, open list:KERNEL SELFTEST FRAMEWORK, bpf, Philip Li On Mon, Mar 30, 2020 at 5:19 PM Liu Yiding <liuyd.fnst@cn.fujitsu.com> wrote: > > > On 3/30/20 2:09 PM, Andrii Nakryiko wrote: > > On 3/29/20 5:48 PM, Liu Yiding wrote: > >> Add attachment. > >> > > > > Your BTF seems to be invalid. It has struct perf_ibs, which has a > > first field `struct pmu pmu` field with valid-looking size of 296 > > bytes, **but** the type that field points to is not a complete `struct > > pmu` definition, but rather just forward declaration. The way it is it > > shouldn't be even compilable, because forward declaration of a struct > > doesn't specify the size of a struct, so compiler should have rejected > > it. So it must be that either DWARF generated by compiler isn't > > correct, or there is DWARF -> BTF conversion bug somewhere. Are you > > using any special DWARF Kconfig settings? Maybe you can share your > > full .config and I might try to repro it on my machine. > > > > >> Are you using any special DWARF Kconfig settings? > > Sorry, i'm a newbie at this. I don't know which settings are related to > DWARF. > > Just search keywords. > > ``` > > liuyd@localhost:~$ cat config-5.6.0-rc5 | grep DWARF > # CONFIG_DEBUG_INFO_DWARF4 is not set > > ``` > > I built attached config on a clear ubuntu machine. Error could be > reproduced. So you are right, there is a conflict between kconfigs. > > > >> Maybe you can share your full .config and I might try to repro it on > my machine. > > Thanks a lot. I attached the broken config. Thanks a lot! I think it's due to DEBUG_INFO_REDUCED which produces not entirely correct DWARF. I'm asking Slava to disable this config when BTF is requested in [0]. [0] https://lore.kernel.org/bpf/CAEf4BzadnfAwfa1D0jZb=01Ou783GpK_U7PAYeEJca-L9kdnVA@mail.gmail.com > > > > But either way, that warning you get is a valid one, it should be > > illegal to have non-pointer forward-declared struct as a type for a > > struct member. > > > >> > >> On 3/30/20 8:46 AM, Liu Yiding wrote: > >>> Something wrong with my smtp and this email missed. > >>> > >>> Send again. > >>> > >>> > >>> On 3/27/20 11:09 AM, Liu Yiding wrote: > >>>> Hi, Andrii. > >>>> > >>>> Thanks for your prompt reply! > >>>> > >>>> Please check attatchment for my_btf.bin. > >>>> > >>>> > >>>> On 3/27/20 4:28 AM, Andrii Nakryiko wrote: > >>>>> Would you be able to share BTF of vmlinux that is used to generate > >>>>> vmlinux.h? Please run in verbose mode: `make V=1` and search for > >>>>> `bpftool btf dump file` command. It should point either to > >>>>> /sys/kernel/btf/vmlinux or some other location, depending on how > >>>>> things are set up on your side. > >>>>> > >>>>> If it's /sys/kernel/btf/vmlinux, you can just `cat > >>>>> /sys/kernel/btf/vmlinux > my_btf.bin`. If it's some other file, > >>>>> easiest would be to just share that file. If not, it's possible to > >>>>> extract .BTF ELF section, let me know if you need help with that. > >>>> > > > > > > > -- > Best Regards. > Liu Yiding > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-31 19:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <60b05d23-6352-b978-3bf7-5a86466bb297@cn.fujitsu.com> 2020-03-26 20:28 ` runqslower build failed on Debian9 Andrii Nakryiko [not found] ` <84a70348-62e3-728b-d934-28e902d40fd0@cn.fujitsu.com> 2020-03-30 0:46 ` Liu Yiding [not found] ` <a2771f66-b7ff-f320-dbd6-0967c189834f@cn.fujitsu.com> 2020-03-30 6:09 ` Andrii Nakryiko [not found] ` <7705ca15-0d63-2e17-b947-51852c196c4b@cn.fujitsu.com> 2020-03-31 19:47 ` 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).