On 2021/10/16 3:30 AM, Martin KaFai Lau wrote: > On Thu, Oct 14, 2021 at 12:35:42AM +0800, Hengqi Chen wrote: >> Hi, BPF community, >> >> >> I would like to report a possible bug in bpf-next, >> hope I don't make any stupid mistake. Here is the details: >> >> I have two VMs: >> >> One has the kernel built against the following commit: >> >> 0693b27644f04852e46f7f034e3143992b658869 (bpf-next) >> >> The ksnoop tool (from BCC repo) works well on this VM. >> >> >> Another has the kernel built against the following commit: >> >> 5319255b8df9271474bc9027cabf82253934f28d (bpf-next) >> >> On this VM, the ksnoop tool failed with the following message: > I see the error in both mentioned bpf-next commits above. > I use the latest llvm and bcc from github. > > Can you confirm which llvm version (or llvm git commit) you are using > in both the good and the bad case? > Indeed, this could be the problem of LLVM, not the kernel. The following is the version info of my environment: The good one: llvm-config-14 --version 14.0.0 clang -v Ubuntu clang version 14.0.0-++20210915052613+c78ed20784ee-1~exp1~20210915153417.547 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9 Candidate multilib: .;@m64 Selected multilib: .;@m64 The bad one: llvm-config-14 --version 14.0.0 clang -v Ubuntu clang version 14.0.0-++20211008104411+f4145c074cb8-1~exp1~20211008085218.709 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 Candidate multilib: .;@m64 Selected multilib: .;@m64