libbpf.so.0 missing version information

Bug #1929899 reported by Matthew Berryman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libbpf (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

➜ ip address
ip: /lib/x86_64-linux-gnu/libbpf.so.0: no version information available (required by ip)
ip: /lib/x86_64-linux-gnu/libbpf.so.0: no version information available (required by ip)
ip: /lib/x86_64-linux-gnu/libbpf.so.0: no version information available (required by ip)
ip: /lib/x86_64-linux-gnu/libbpf.so.0: no version information available (required by ip)
ip: symbol lookup error: ip: undefined symbol: bpf_object__open_file, version LIBBPF_0.0.6

➜ lsb_release -rd
Description: Ubuntu 21.04
Release: 21.04

➜ sudo apt-cache policy libbpf0:amd64
libbpf0:
  Installed: 1:0.3-2ubuntu1
  Candidate: 1:0.3-2ubuntu1
  Version table:
 *** 1:0.3-2ubuntu1 500
        500 http://au.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I am unable to reprodce the problem on 21.04.
The command "ip address" does not give me any error.
Can you please confirm the version of "iproute2" you have..
In my system:
$ dpkg -l libbpf0 iproute2
ii iproute2 5.10.0-4ubuntu1
ii libbpf0:amd64 1:0.3-2ubuntu1

And, also what is the output from:
"nm -gDC /usr/lib/x86_64-linux-gnu/libbpf.so.0 | grep bpf_object__open_file" ?

Revision history for this message
Matthew Berryman (mattjb) wrote :

ii iproute2 5.10.0-4ubuntu1 amd64 networking and traffic control tools
ii libbpf0:amd64 1:0.3-2ubuntu1 amd64 eBPF helper library (shared library)

There was no bpf_object__open_file symbol present.
For reference I ran:
➜ sha256sum /usr/lib/x86_64-linux-gnu/libbpf.so.0
f07eec45762596dd43e129344f106cf020b163b1831ae9df3e0a018371c3a3ac /usr/lib/x86_64-linux-gnu/libbpf.so.0

Running
➜ sudo apt-get clean
➜ sudo apt-get install --reinstall libbpf0:amd64
resulted in same .so with missing symbol.

I figured out the problem is happening on install, because the downloaded deb does have an so with that symbol:
➜ cp /var/cache/apt/archives/libbpf0_1%3a0.3-2ubuntu1_amd64.deb .
➜ ar x libbpf0_1%3a0.3-2ubuntu1_amd64.deb
➜ tar xf data.tar.xz
➜ nm -gDC usr/lib/x86_64-linux-gnu/libbpf.so.0 | grep bpf_object__open_file
000000000001e090 T bpf_object__open_file@@LIBBPF_0.0.6

and also a different sha256:
➜ sha256sum usr/lib/x86_64-linux-gnu/libbpf.so.0
d517e897a7d36b706f62fe7d71e7a9dd8bc50c186c507264b10fb1e5d9ccabd7 usr/lib/x86_64-linux-gnu/libbpf.so.0

Looking into the versions in /usr/lib/x86_64-linux-gnu there was a libbpf.so.0.9.0 version installed and symlinked from libbpf.so > libbpf.so.0 > libbpf.so.0.9.0 rather than the libbpf.so.0.3.0 that was installed back when I was playing with bpftrace, however I am unsure how it ended up in /usr/lib and not /usr/local/lib unless there was a separate .deb I installed (I forget and neither /var/log/apt/history.log.* nor /var/log/dpkg.log.* go back that far to the time the libbpf.so.0.9.0 was installed). Anyway, removing that and setting up the symlinks has fixed it, although shouldn't a failure to symlink the version being installed be flagged somewhere?

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Thanks for confirming that its not a bug with libbbpf.

It was not a failure. You had "libbpf.so.0.9.0" wihch is a higher version than "libbpf.so.0.3.0" and so iiuc, ldconfig will not update the link as it is attempting to link to a lower version.
But I am totally confused about how you got libbpf.so.0.9.0, it has not been released yet, the latest is 0.4.0 which I just uploaded to Debian few days ago.

Revision history for this message
Matthew Berryman (mattjb) wrote :

I gather the version number came from BCC BPF which is currently 0.20.0 https://github.com/iovisor/bcc/tags

It was a failure in dpkg in the sense that dpkg reports the library was installed fine. To me, that would mean it is the version currently set to be used (and if there are alternatives, these should be flagged if not configurable as alternatives).

Changed in libbpf (Ubuntu):
status: New → Invalid
Revision history for this message
david (deivid27) wrote :

I was also affected by this; I instead had 0.8.0 + 0.7.0
I know I manually built these (probably installed as well?) some time ago, this bug report helped me figure out why my networking wasn't working.

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.