pahole creates BTF with lots of duplicate types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dwarves (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned | ||
Kinetic |
Invalid
|
Undecided
|
Unassigned | ||
Lunar |
Won't Fix
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
pahole 1.24-4ubuntu1 creates buggy BTF from vmlinux:
$ bpftool btf dump file 1.24-ubuntu.btf | grep "STRUCT 'net'" | wc -l
44
Upstream pahole from debian doesn't have this problem:
$ bpftool btf dump file 1.24-debian.btf | grep "STRUCT 'net'" | wc -l
1
This is also apparent in the created file sizes:
$ ls -lh *.btf
-rw-r-----. 1 lorenz lorenz 3.6M Jun 29 15:19 1.24.btf
-rw-r-----. 1 lorenz lorenz 3.6M Jun 29 15:26 1.24-debian.btf
-rw-r-----. 1 lorenz lorenz 8.5M Jun 29 15:16 1.24-ubuntu.btf
1.24.btf is created using pahole v1.24 built from source.
Looking at the Debian patch tracker, it seems like you are missing one patch: https:/
This causes problems in tools which use vmlinux BTF to do CO-RE relocations against the running kernel. On recent ubuntu kernels these are excruciatingly slow since your pahole creates bloated types.
Changed in dwarves (Ubuntu Mantic): | |
status: | New → Fix Released |
Changed in dwarves (Ubuntu Kinetic): | |
status: | New → Invalid |
Changed in dwarves (Ubuntu Jammy): | |
status: | New → Invalid |
Changed in dwarves (Ubuntu Lunar): | |
status: | New → In Progress |
See https:/ /bugs.launchpad .net/ubuntu/ +source/ dwarves/ +bug/2025988