Uprobes not available on Debian Stretch

Hi folks, I manually installed the following packages on a system running Debian Stretch and kernel 4.9

bpftrace_0.8+git60-gccac69c2239b-2_amd64.deb
libbpfcc_0.8.0-4_amd64.deb
libtinfo6_6.1+20181013-2+deb10u2_amd64.deb

The check_kernel_features.sh script found all necessary features and I can see lots of kprobes. A simple ‘hello world’ bpftrace script runs fine as well, but I’m not seeing any uprobes. For example,

# bpftrace -l 'u:/bin/bash'

Doesn’t list any probes. What did I miss ?

Thanks,
Rafael

Does nm /bin/bash show any symbols? Maybe the binary is stripped.

Ah, yes… good point. /bin/bash is stripped but the binary I’m building isn’t stripped and it’s not showing any symbols. I disabled compiler optimizations just in case and still nothing.

bpftrace 0.8 is a bit old and lacks the support of listing uprobes (https://github.com/iovisor/bpftrace/issues/673).

objdump -tT /bin/bash | grep "F .text" | grep -oE '[^[:space:]]+$'

shows symbol names in the text section, and these should be able to use as uprobe probes.

Cool, I built the latest release and I can list uprobes from my binary. Thanks!