FS#68259 - [bpftrace] BEGIN_trigger and END_trigger symbols are stripped

Attached to Project: Community Packages
Opened by Daniel Xu (dxu) - Thursday, 15 October 2020, 03:38 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 15 October 2020, 20:26 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: I think all the symbols in the final binary are being stripped. This breaks the BEGIN and END probes.

Additional info:
* package version(s)

$ pacman -Qi bpf
Name : bpf
Version : 5.7-1
Description : BPF tools
Architecture : x86_64
URL : https://www.kernel.org
Licenses : GPL2
Groups : linux-tools
Provides : None
Depends On : glibc
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 5.35 MiB
Packager : Sébastien Luttringer <seblu@seblu.net>
Build Date : Tue 02 Jun 2020 08:33:52 AM PDT
Install Date : Fri 05 Jun 2020 10:01:46 AM PDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature


* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

# bpftrace -e 'BEGIN { print(PERF_UPROBE_REF_CTR_OFFSET_SHIFT) }'
Attaching 1 probe...
Could not resolve symbol: /proc/self/exe:BEGIN_trigger
# bpftrace -e 'END { print(PERF_UPROBE_REF_CTR_OFFSET_SHIFT) }'
Attaching 1 probe...
^CCould not resolve symbol: /proc/self/exe:END_trigger

$ nm `which bpftrace`
nm: /bin/bpftrace: no symbols

I'm assuming `strip` is being called somewhere in the build process. One way to keep the symbols is to do something like: https://github.com/iovisor/bpftrace/blob/320338dfd44fea0c5b603a48c70d61b756aa79b1/.github/workflows/embedded.yml#L219
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Thursday, 15 October 2020, 20:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  bpftrace-0.11.0-4
Comment by Daniel Xu (dxu) - Thursday, 15 October 2020, 20:09 GMT
Whoops, sent the info about the wrong package. Here's the right info:

Name : bpftrace
Version : 0.11.0-3
Description : High-level tracing language for Linux eBPF
Architecture : x86_64
URL : https://github.com/iovisor/bpftrace
Licenses : Apache
Groups : None
Provides : None
Depends On : libelf zlib llvm-libs clang bcc libbpf
Optional Deps : libbpf: BTF support - required at compile time [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 3.76 MiB
Packager : Anatol Pomozov <anatol.pomozov@gmail.com>
Build Date : Mon 12 Oct 2020 02:33:16 PM PDT
Install Date : Wed 14 Oct 2020 08:35:52 PM PDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

Loading...