bpftrace is broken on Oracular

Bug #2086104 reported by Athos Ribeiro
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bpftrace (Ubuntu)
Fix Committed
Critical
Mate Kukri
Oracular
Fix Committed
Critical
Mate Kukri

Bug Description

[ Impact ]

Running any arbitrary bpftrace commands in oracular, such as

$ sudo bpftrace -l '*sleep*'

fails with

: CommandLine Error: Option 'debug-counter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted

Making the package currently unusable there.

[ Test Plan ]

In an oracular fresh install, run

$ sudo bpftrace -l '*sleep*'

affected systems will output

: CommandLine Error: Option 'debug-counter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted

while a fixed system will show a list such as

kfunc:vmlinux:__bpf_prog_array_free_sleepable_cb
kfunc:vmlinux:__ia32_sys_clock_nanosleep
kfunc:vmlinux:__ia32_sys_clock_nanosleep_time32
kfunc:vmlinux:__ia32_sys_nanosleep
...

Note that bpftrace is a seeded package so you will not need to install it to run the tests above.

[ Where problems could occur ]

The patch changes a CMakeLists.txt to *always* link against shared LLVM libraries (because that is what we want). If we saw problems, it would most likely be in the package build itself.

[ Other Info ]

This issue only affects oracular.

Rationale for this patch explained on the bug report: https://github.com/bpftrace/bpftrace/issues/1855#issuecomment-2463034672

[ Original bug report ]

In oracular, with bpftrace version 0.21.2-1ubuntu1, when I run any arbitrary bpftrace command such as

$ sudo bpftrace -l '*sleep*'

I get the following error:

: CommandLine Error: Option 'debug-counter' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted

Making the package currently unusable in oracular.

Possibly related upstream bug: https://github.com/bpftrace/bpftrace/issues/1855

Related branches

Mate Kukri (mkukri)
Changed in bpftrace (Ubuntu):
importance: Undecided → Critical
summary: - Option 'debug-counter' registered more than once
+ bpftrace is broken on Oracular
tags: added: rls-oo-incoming
Mate Kukri (mkukri)
Changed in bpftrace (Ubuntu):
status: New → Confirmed
Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

This is caused by two copies of LLVM being linked into the bpftrace binary: both the shared libraryand the static ones.

I guess if these are the same version this doesnt cause issues, but a later LLVM update left the static one s out of date.

The patch is to change the build process to only link the shared LLVM.

Seems like the LLVM in plucky is linked correctly.

Revision history for this message
Mate Kukri (mkukri) wrote :
Changed in bpftrace (Ubuntu):
assignee: nobody → Mate Kukri (mkukri)
tags: added: foundations-todo
description: updated
Revision history for this message
Zixing Liu (liushuyu-011) wrote :

I have a different upstream-able patch posted on https://github.com/bpftrace/bpftrace/pull/3580

Nick Rosbrook (enr0n)
description: updated
Revision history for this message
Nick Rosbrook (enr0n) wrote :

The bug is not currently present in plucky, but my understanding is that it *could* happen in a future build. So, I have sponsored the change to both plucky and oracular.

description: updated
Changed in bpftrace (Ubuntu Oracular):
assignee: nobody → Mate Kukri (mkukri)
importance: Undecided → Critical
status: New → In Progress
Changed in bpftrace (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Can we please add a simple dep8 smoke test, just like the test plan?

Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

There is autopkgtest that should have stopped the LLVM update that broke it from migrating, but there is something up with the triggers.

I checked yesterday and @builddeps@ is on the list so i am not yet sure how it exactly happened

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Athos, or anyone else affected,

Accepted bpftrace into oracular-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bpftrace/0.21.2-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-oracular to verification-done-oracular. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-oracular. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in bpftrace (Ubuntu Oracular):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-oracular
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.