Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2150330

Summary: bpftrace crashes on every run
Product: Red Hat Enterprise Linux 9 Reporter: Wander <wcosta>
Component: bpftraceAssignee: Viktor Malik <vmalik>
Status: CLOSED CURRENTRELEASE QA Contact: Ziqian SUN (Zamir) <zsun>
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.2Keywords: TestOnly, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: bpftrace-0.16.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-03 07:48:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2118995    
Bug Blocks:    

Description Wander 2022-12-02 14:23:09 UTC
Description of problem:

When running bpftrace in RHEL 9.2, it crashes with the following messages:

[root@dell-r750-02 ~]# bpftrace
: CommandLine Error: Option 'use-dbg-addr' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)


Version-Release number of selected component (if applicable):
0.13.1-1.el9


How reproducible:
Always


Steps to Reproduce:
1. dnf install -y bpftrace
2. bpftrace
3.

Actual results:
Crash dump


Expected results:
The command is to run successfully.

Additional info:
There is an issue in Github that says it is related to llvm being statically linked in both bcc and bpftrace

https://github.com/iovisor/bpftrace/issues/1855

Comment 1 Viktor Malik 2022-12-05 07:06:03 UTC
I believe that the problem is that bpftrace has not yet been rebased to LLVM 15. I'll do it after the last BPF subsystem rebase is merged, to rebase against correct libbpf.

Comment 2 Carlos Rodriguez-Fernandez 2022-12-13 23:20:48 UTC
Same here.
I started a brand new Centos Stream 9 VM in digitalocean. I did a "dnf up -y", and then installed bpftrace and a simple run shows the same error:

```
$ bpftrace -l
: CommandLine Error: Option 'use-dbg-addr' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)
```

Thank you for working on this Viktor.

Comment 3 Viktor Malik 2023-01-09 09:19:00 UTC
bpftrace 0.16.0-1 which supports LLVM 15 is now in the buildroot and the nightly compose, so this bug should not happen anymore.

Wander, Carlos, could you please confirm?

Thanks!

Comment 4 Wander 2023-01-09 12:27:11 UTC
(In reply to Viktor Malik from comment #3)
> bpftrace 0.16.0-1 which supports LLVM 15 is now in the buildroot and the
> nightly compose, so this bug should not happen anymore.
> 
> Wander, Carlos, could you please confirm?
> 
> Thanks!

I suppose by tomorrow 9.2 builds will ship it?

Comment 5 Viktor Malik 2023-01-09 13:16:20 UTC
> I suppose by tomorrow 9.2 builds will ship it?

Yes, it appeared in the compose yesterday, so it's likely in today's builds, too.

Comment 6 Carlos Rodriguez-Fernandez 2023-01-09 18:06:16 UTC
(In reply to Viktor Malik from comment #3)
> bpftrace 0.16.0-1 which supports LLVM 15 is now in the buildroot and the
> nightly compose, so this bug should not happen anymore.
> 
> Wander, Carlos, could you please confirm?
> 
> Thanks!

Hi Viktor,
I can confirm that the problem is fixed in Centos 9 Stream.

Thank you!

Comment 7 Viktor Malik 2023-01-16 09:25:38 UTC
Thanks Carlos, marking the bug TestOnly and moving it to ON_QA.

Comment 11 Viktor Malik 2024-05-03 07:48:01 UTC
Closing as CURRENTRELEASE.