[Bug 2097317] Re: bpftrace: error while loading shared libraries: libLLVM-18.so.18.1: cannot open shared object file: No such file or directory
Andreas Hasenack
2097317 at bugs.launchpad.net
Wed Feb 5 20:45:09 UTC 2025
My personal noble system installed bpftrace 0.20.2-1ubuntu4.2 and it
presented this bug.
$ sudo bpftrace
[sudo] password for andreas:
bpftrace: error while loading shared libraries: libLLVM-18.so.18.1: cannot open shared object file: No such file or directory
I then updated to 0.20.2-1ubuntu4.3 from noble-proposed and bpftrace now
works:
$ sudo bpftrace 2>&1 | head -n 2
USAGE:
bpftrace [options] filename
and:
andreas at nsnx2:~$ sudo bpftrace -e 'kprobe:do_nanosleep { printf("%d sleeping\n", pid); }'
Attaching 1 probe...
2997 sleeping
2997 sleeping
2997 sleeping
2997 sleeping
2997 sleeping
2997 sleeping
2971 sleeping
2971 sleeping
^C
$ apt-cache policy bpftrace
bpftrace:
Installed: 0.20.2-1ubuntu4.3
Candidate: 0.20.2-1ubuntu4.3
Version table:
*** 0.20.2-1ubuntu4.3 100
100 http://br.archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
100 /var/lib/dpkg/status
0.20.2-1ubuntu4 500
500 http://br.archive.ubuntu.com/ubuntu noble/main amd64 Packages
I then proceeded to spawn a noble fresh vm. There I got bpftrace 0.20.2-1ubuntu4, which is working fine:
ubuntu at n-bpftrace:~$ apt-cache policy bpftrace
bpftrace:
Installed: 0.20.2-1ubuntu4
Candidate: 0.20.2-1ubuntu4
Version table:
*** 0.20.2-1ubuntu4 500
500 http://br.archive.ubuntu.com/ubuntu noble/main amd64 Packages
100 /var/lib/dpkg/status
ubuntu at n-bpftrace:~$ sudo bpftrace 2>&1|head -n 2
USAGE:
bpftrace [options] filename
ubuntu at n-bpftrace:~$ sudo bpftrace -e 'kprobe:do_nanosleep { printf("%d sleeping\n", pid); }'
Attaching 1 probe...
441 sleeping
366 sleeping
^C
I then upgraded to the version in noble-proposed:
ubuntu at n-bpftrace:~$ apt-cache policy bpftrace
bpftrace:
Installed: 0.20.2-1ubuntu4.3
Candidate: 0.20.2-1ubuntu4.3
Version table:
*** 0.20.2-1ubuntu4.3 100
100 http://br.archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
100 /var/lib/dpkg/status
0.20.2-1ubuntu4 500
500 http://br.archive.ubuntu.com/ubuntu noble/main amd64 Packages
And it continues to work:
ubuntu at n-bpftrace:~$ sudo bpftrace 2>&1|head -n 2
USAGE:
bpftrace [options] filename
ubuntu at n-bpftrace:~$ sudo bpftrace -e 'kprobe:do_nanosleep { printf("%d sleeping\n", pid); }'
Attaching 1 probe...
366 sleeping
366 sleeping
^C
And for the record, this is the llvm-18 version on both systems where I
conducted this test:
$ apt-cache policy libllvm18
libllvm18:
Installed: 1:18.1.3-1ubuntu1
Candidate: 1:18.1.3-1ubuntu1
Version table:
*** 1:18.1.3-1ubuntu1 500
500 http://br.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
100 /var/lib/dpkg/status
1:18.1.3-1 500
500 http://br.archive.ubuntu.com/ubuntu noble/main amd64 Packages
** Tags removed: verification-needed-noble
** Tags added: verification-done-noble
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bpftrace in Ubuntu.
https://bugs.launchpad.net/bugs/2097317
Title:
bpftrace: error while loading shared libraries: libLLVM-18.so.18.1:
cannot open shared object file: No such file or directory
Status in bpftrace package in Ubuntu:
Confirmed
Status in bpftrace source package in Noble:
Fix Committed
Bug description:
[impact]
bpftrace 0.20.2-1ubuntu4.2 is broken with the version of llvm-toolchain-18 in noble-updates:
Regression from https://bugs.launchpad.net/ubuntu/+source/bpftrace/+bug/2081848
root at nsnx2:~# bpftrace
bpftrace: error while loading shared libraries: libLLVM-18.so.18.1: cannot open shared object file: No such file or directory
[test plan]
bpftrace runs tests during build which verifies _something_ but also we should install bpftrace on a system that has no other packages from proposed run a simple command such as "sudo bpftrace -e 'kprobe:do_nanosleep { printf("%d sleeping\n", pid); }'".
[regression potential]
It is still possible that rebuilding bpftrace is not safe because of some other change in the archive since release. The tests should catch most of these, but if there is some other regression caused by building against a version in proposed and running against a version in release or updates it might not be caught (and sadly neither would the autopkgtests, they just build and run the tests). It's not clear what to do about this (other than improve the autopkgtests).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bpftrace/+bug/2097317/+subscriptions
More information about the foundations-bugs
mailing list