[SRU][O][N][PATCH 0/2] python perf module missing in realtime kernel (LP: #2089411)
Juerg Haefliger
juerg.haefliger at canonical.com
Tue Jan 21 15:50:13 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2089411
[Impact]
ubuntu at ubuntu-plucky:~$ python3 -c 'import perf; [print(c) for c in perf.cpu_map()]'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/perf/__init__.py", line 24, in <module>
raise KernelNotFoundError()
perf.KernelNotFoundError: WARNING: python perf module not found for kernel 6.12.0-4-generic
You may need to install the following packages for this specific kernel:
linux-tools-6.12.0-4-generic-generic
You may also want to install of the following package to keep up to date:
linux-tools-generic
This works only with the main generic kernel but not with any of the derivatives. Packaging is
broken and the perf python modules is looking in the wrong place for the library.
[Test Plan]
Run:
$ python3 -c 'import perf; [print(c) for c in perf.cpu_map()]'
$ perf
The above must not result in errors.
[Where Problems Could Occur]
Potential issues when using the perf python module or any scripts/binaries provided by the
linux-tools packages.
More information about the kernel-team
mailing list