Hi, I'm still seeing this bug with 6.11.0-1006-realtime, which should
contain the patch [1] (thanks for the help Juerg)

```
wesley@oracular2:~$ uname -a
Linux oracular2 6.11.0-1006-realtime #6-Ubuntu SMP PREEMPT_RT Mon Feb 17 
15:51:31 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
wesley@oracular2:~$ 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.11.0-1006-realtime

You may need to install the following packages for this specific kernel:
  linux-tools-6.11.0-1006-realtime-generic
You may also want to install of the following package to keep up to date:
  linux-tools-generic
wesley@oracular2:~$ apt-cache policy linux-realtime
linux-realtime:
  Installed: 6.11.0-1006.6
  Candidate: 6.11.0-1006.6
  Version table:
 *** 6.11.0-1006.6 500
        500 
https://ppa.launchpadcontent.net/canonical-kernel-team/proposed2/ubuntu 
oracular/main amd64 Packages
        100 /var/lib/dpkg/status
     6.11.0-1005.5 500
        500 http://archive.ubuntu.com/ubuntu oracular-updates/universe amd64 
Packages
        500 http://security.ubuntu.com/ubuntu oracular-security/universe amd64 
Packages
     6.11.0-1001.1 500
        500 http://archive.ubuntu.com/ubuntu oracular/universe amd64 Packages
```

[1] https://kernel.ubuntu.com/reports/kernel-stable-
board/?cycle=s2025.01.13

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2089411

Title:
  python perf module missing in realtime kernel

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Noble:
  Fix Committed
Status in linux source package in Oracular:
  Fix Committed
Status in linux source package in Plucky:
  Fix Released

Bug description:
  [Impact]

  ubuntu@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.

  [Original Description]

  Issue is related to Bug #2051560
  In using tuned profile realtime-virtual-host under the realtime kernel, the 
operating system would lose network connection. Further viewing of the tuned 
logs pointed to the following error:

  ERROR    tuned.units.manager: WARNING: python perf module not found
  for kernel 6.8.1-1011-realtime

  Researching online Bug #2051560 was discovered. However, it looks as
  if the realtime kernel was not listed as fixed to include the perf
  Python module that affects tuned.

  Server info:

  uname -a:

  Linux 6.8.1-1011-realtime #11-Ubuntu SMP PREEMPT_RT Tue Oct 8 17:19:16 UTC 
2024 x86_64 x86_64 x86_64 GNU/Linux
  -----------------------

  lsb_release -crid:

  No LSB modules are available.
  Distributor ID: Ubuntu
  Description: Ubuntu 24.04.1 LTS
  Release: 24.04
  Codename: noble

  -----------------------

  apt policy linux-image-6.8.1-1011-realtime:

  linux-image-6.8.1-1011-realtime:
    Installed: 6.8.1-1011.11
    Candidate: 6.8.1-1011.11
    Version table:
   *** 6.8.1-1011.11 500
          500 https://esm.ubuntu.com/realtime/ubuntu noble/main amd64 Packages
          100 /var/lib/dpkg/status

  -----------------------

  Realtime kernel was installed via Ubuntu Pro subscription.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2089411/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to