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.