oracle / bpftune

bpftune uses BPF to auto-tune Linux systems
Other
659 stars 56 forks source link

Not build #12

Closed delvin-fil closed 1 year ago

delvin-fil commented 1 year ago
make
cd src; make
make[1]: вход в каталог «/home/delvin/git/bpftune/src»
clang -g -D__TARGET_ARCH_x86 -O2 -target bpf            \
    -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_buffer_tuner.bpf.c -o tcp_buffer_tuner.bpf.o;
tcp_buffer_tuner.bpf.c:167:1: error: A call to built-in function '__stack_chk_fail' is not supported.
BPF_FENTRY(tcp_enter_memory_pressure, struct sock *sk)
^
../include/bpftune/bpftune.bpf.h:98:15: note: expanded from macro 'BPF_FENTRY'
        int BPF_PROG(entry__##func, ##args)
                     ^
<scratch space>:82:1: note: expanded from here
entry__tcp_enter_memory_pressure
^
tcp_buffer_tuner.bpf.c:192:1: error: A call to built-in function '__stack_chk_fail' is not supported.
BPF_FENTRY(tcp_sndbuf_expand, struct sock *sk)
^
../include/bpftune/bpftune.bpf.h:98:15: note: expanded from macro 'BPF_FENTRY'
        int BPF_PROG(entry__##func, ##args)
                     ^
<scratch space>:118:1: note: expanded from here
entry__tcp_sndbuf_expand
^
tcp_buffer_tuner.bpf.c:232:1: error: A call to built-in function '__stack_chk_fail' is not supported.
BPF_FENTRY(tcp_rcv_space_adjust, struct sock *sk)
^
../include/bpftune/bpftune.bpf.h:98:15: note: expanded from macro 'BPF_FENTRY'
        int BPF_PROG(entry__##func, ##args)
                     ^
<scratch space>:151:1: note: expanded from here
entry__tcp_rcv_space_adjust
^
tcp_buffer_tuner.bpf.c:276:1: error: A call to built-in function '__stack_chk_fail' is not supported.
BPF_FENTRY(tcp_init_sock, struct sock *sk)
^
../include/bpftune/bpftune.bpf.h:98:15: note: expanded from macro 'BPF_FENTRY'
        int BPF_PROG(entry__##func, ##args)
                     ^
<scratch space>:184:1: note: expanded from here
entry__tcp_init_sock
^
4 errors generated.
make[1]: *** [Makefile:148: tcp_buffer_tuner.bpf.o] Ошибка 1
make[1]: выход из каталога «/home/delvin/git/bpftune/src»
make: *** [Makefile:41: srcdir] Ошибка 2
alan-maguire commented 1 year ago

Can you provide details of disto, kernel version, libbpf version and clang version used? thanks!

delvin-fil commented 1 year ago

Can you provide details of disto, kernel version, libbpf version and clang version used? thanks!

Gentoo default/linux/amd64/17.1/desktop (stable) Kernel 5.15.79-rt54 dev-libs/libbpf 1.2.0 clang 16.0.5 x86_64-pc-linux-gnu

alan-maguire commented 1 year ago

it could be some sort of issue with stack checking in the compiler; i don't see the __stack_chk_fail errors on Oracle Linux or Ubuntu. I'll try and reproduce the config more fully to test..

alan-maguire commented 1 year ago

see https://www.spinics.net/lists/netdev/msg556400.html . it's possible adding -fno-stack-protect will resolve this. I've pushed the change to main; can you pull and retry? thanks!

delvin-fil commented 1 year ago

see https://www.spinics.net/lists/netdev/msg556400.html . it's possible adding -fno-stack-protect will resolve this. I've pushed the change to main; can you pull and retry? thanks!

Yes, it solved the problem. Thanks

alan-maguire commented 1 year ago

thanks for confirming! closing the issue