clone 977549 -1 reassign -1 libbpfcc retitle -1 libbpfcc: please compile with -DENABLE_LLVM_SHARED=on severity -1 normal found -1 0.17.0-8 block 977549 by -1 thanks
❦ 16 décembre 2020 16:48 +01, Emanuele Rocca: > Package: bpftrace > Version: 0.11.3-3 > Severity: grave > Justification: renders package unusable > > Any attempt of running bpftrace programs fails on my sid workstation: > > $ sudo bpftrace -e 'kprobe:do_nanosleep { printf("PID %d sleeping\n", pid); > }' > Two passes with the same argument (-tti) attempted to be registered! > Segmentation fault > > The issue isn't limited to kprobes, uprobes fail too: > > $ sudo bpftrace -e 'uprobe:/bin/bash:readline { printf("Hello\n") }' > Two passes with the same argument (-tti) attempted to be registered! > Segmentation fault > > Even bpftrace -V fails, though with a different error: > > $ sudo bpftrace -V > bpftrace v0.11.3 > free(): double free detected in tcache 2 > Aborted > > I'm running linux-image-5.9.0-4-amd64 5.9.11-1 and libllvm11 > 1:11.0.0-5+b1. Downgrading libbpfcc to 0.17.0-7 fixes this issue. The change between this version and 0.17.0-8 seems not related to this regression. I think this is more a change from LLVM 9 to LLVM 11 that triggered that: the versions used by libbcc and bpftrace are the same and the initialization is done twice, once for the dynamic initialization from bpftrace and once for static initialization from libbcc. This can be fixed by compiling libbcc with -DENABLE_LLVM_SHARED=on (tested by adding this flag in debian/rules, no other change). I don't know if there is a drawback to that. -- Modularise. Use subroutines. - The Elements of Programming Style (Kernighan & Plauger)