Skip to content

Run CO-RE version's runqslower failed #2770

@ethercflow

Description

@ethercflow

I tried to run CO-RE version's runqslower failed, the error info:

libbpf: sched_wakeup is not found in vmlinux BTF
libbpf: failed to load object 'runqslower_bpf'
libbpf: failed to load BPF skeleton 'runqslower_bpf': -2
failed to load BPF object: -2

My test env is qemu:

#!/bin/bash

IMAGE=/data1/env/bpf-next
KERNEL=/data1/kernel/bpf-next

nohup qemu-system-x86_64 \
  -kernel $KERNEL/arch/x86/boot/bzImage \
  -append "console=ttyS0 root=/dev/sda debug earlyprintk=serial slub_debug=QUZ"\
  -hda $IMAGE/stretch.img \
  -fsdev local,security_model=passthrough,id=fsdev0,path=/data2/vmshare \
  -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \
  -net user,hostfwd=tcp::10021-:22 -net nic \
  -enable-kvm \
  -nographic \
  -m 2G \
  -smp 2 \
  -pidfile vm.pid \
  2>&1 &

I've checked .config about BPF and BTF related:

CONFIG_CGROUP_BPF=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_IPV6_SEG6_BPF=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_BPFILTER=y
CONFIG_BPFILTER_UMH=m
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
CONFIG_BPF_KPROBE_OVERRIDE=y
CONFIG_TEST_BPF=m
CONFIG_DEBUG_INFO_BTF=y

And /sys/kernel/btf/vmlinux exist.

bin/bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h is OK.

My host clang version is:

clang version 10.0.0-++20200115091412+1b264a8263f-1exp120200115082037.1442
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Qemu's clang version is:

clang version 10.0.0-+rc2-1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The tested kernel version is:

5.6.0-rc2+ (bpf-next: commit 8eece07c011f88da0ccf4127fca9a4e4faaf58ae)

BTW, I've submitted a topic in iovisor-dev@lists.iovisor.org, move to gitHub for better experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions