sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
691 stars 48 forks source link

Update libbpf commit hash #396

Closed otteryc closed 1 week ago

otteryc commented 1 week ago

libbpf has added a member link in the struct bpf_map_skeleton, which causes a build failure in SCX. This commit updates the libbpf commit hash to the latest version to avoid this error.

Please refer to commit be998aa in libbpf repo.

Error message: ninja: Entering directory `/home/otteryc/linux2024/scx/build' [3/25] Compiling C object scheds/c/scx_simple.p/scx_simple.c.o FAILED: scheds/c/scx_simple.p/scx_simple.c.o cc -Ischeds/c/scx_simple.p -Ischeds/c -I../scheds/c -I../scheds/include -I../build/libbpf/src/usr/include -I../build/libbpf/include/uapi -fdiagnostics-color=alway s -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -pthread -MD -MQ scheds/c/scx_simple.p/scx_simple.c.o -MF scheds/c/scx_simple.p/scx_simple.c.o.d -o scheds/c/s cx_simple.p/scx_simple.c.o -c ../scheds/c/scx_simple.c In file included from ../scheds/c/scx_simple.c:13: scheds/c/scx_simple.p/scx_simple.bpf.skel.h: In function ‘scx_simple__create_skeleton’: scheds/c/scx_simple.p/scx_simple.bpf.skel.h:243:19: error: ‘struct bpf_map_skeleton’ has no member named ‘link’ 243 | s->maps[5].link = &obj->links.simple_ops; | ^

arighi commented 1 week ago

The build is fine, but the new libbpf seems to break the run of any scheduler:

libbpf: struct_ops reloc bpfland_ops: for 63 value 0 shdr_idx 4 rel->r_offset 0 map->sec_offset 0 name 836 ('bpfland_select_cpu')
libbpf: struct_ops reloc bpfland_ops: for 76 value 0 shdr_idx 5 rel->r_offset 8 map->sec_offset 0 name 1096 ('bpfland_enqueue')
libbpf: struct_ops reloc bpfland_ops: for 82 value 0 shdr_idx 6 rel->r_offset 24 map->sec_offset 0 name 1210 ('bpfland_dispatch')
libbpf: struct_ops reloc bpfland_ops: for 84 value 0 shdr_idx 7 rel->r_offset 48 map->sec_offset 0 name 1243 ('bpfland_running')
libbpf: struct_ops reloc bpfland_ops: for 86 value 0 shdr_idx 8 rel->r_offset 56 map->sec_offset 0 name 1270 ('bpfland_stopping')
libbpf: struct_ops reloc bpfland_ops: for 91 value 0 shdr_idx 10 rel->r_offset 128 map->sec_offset 0 name 1330 ('bpfland_init_task')
libbpf: struct_ops reloc bpfland_ops: for 90 value 0 shdr_idx 9 rel->r_offset 144 map->sec_offset 0 name 1315 ('bpfland_enable')
libbpf: struct_ops reloc bpfland_ops: for 92 value 0 shdr_idx 11 rel->r_offset 248 map->sec_offset 0 name 1348 ('bpfland_init')
libbpf: struct_ops reloc bpfland_ops: for 97 value 0 shdr_idx 12 rel->r_offset 256 map->sec_offset 0 name 1436 ('bpfland_exit')
libbpf: failed to find skeleton map ''
libbpf: failed to populate skeleton maps for 'bpf_bpf': -3
Error: Failed to open BPF program

Caused by:
    No such process (os error 3)