When trying to extract the layout of kernel structures that should exist
on recent kernels from the Ubuntu debug kernel repo, I get the following
error:
die__process: DW_TAG_compile_unit, DW_TAG_type_unit or
DW_TAG_partial_unit expected got INVALID!
pahole: type 'mount' not found
As far as I can tell, 'struct mount' should still exist - and I can pull
other structures out without trouble. The issue starts appearing
somewhere in the 5.15 kernel version - earlier kernels work exactly as
expected and I can extract the full offsets.
https://elixir.bootlin.com/linux/v5.15.48/source/fs/mount.h indicates
that 'struct mount' still exists in the source, and it remains present
into the 6.0 kernel with no substantial changes. I can also produce the
same response with some of the other structures in that file -
mountpoint, mnt_namespace, and mnt_pcp all lead to the same error message.
I've tried building pahole from head (Oct 4, 2022, e819d737) without any
changes to the behavior, and v1.21 and 1.24 both lead to the same results.
Steps to reproduce (warning, will take ~10GB - the unzipped kernel debug
symbols are rather large):
cd /tmp
wget
http://ddebs.ubuntu.com/pool/main/l/linux/linux-image-unsigned-5.15.0-48-generic-dbgsym_5.15.0-48.54_amd64.ddeb
ar x linux-image-unsigned-5.15.0-48-generic-dbgsym_5.15.0-48.54_amd64.ddeb
tar -xf data.tar.xz
cd usr/lib/debug/boot
pahole -C mount vmlinux-5.15.0-48-generic
die__process: DW_TAG_compile_unit, DW_TAG_type_unit or
DW_TAG_partial_unit expected got INVALID!
pahole: type 'mount' not found
Any suggestions on how to resolve this? I'm not familiar enough with
the various debug formats to know how to troubleshoot beyond this point
right now.