I can confirm that the (naive) patch sidesteps the issue, but that it is
otherwise present on all our 5.15/ZFS installs.

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

Title:
  arc_summary doesn't work with HWE kernel 5.15

Status in zfs-linux package in Ubuntu:
  Confirmed

Bug description:
  # Issue description

  `arc_summary` no longer works with kernel 5.15. It used to work with
  previous kernel like 5.13.

  # Steps to reproduce

  1) setup 20.04 with HWE kernel 5.15
  2) install `zfsutils-linux`
  3) run `arc_summary`
  $ arc_summary 
  Traceback (most recent call last):
    File "/usr/sbin/arc_summary", line 875, in <module>
      main()
    File "/usr/sbin/arc_summary", line 826, in main
      kstats = get_kstats()
    File "/usr/sbin/arc_summary", line 259, in get_kstats
      with open(PROC_PATH+section, 'r') as proc_location:
  FileNotFoundError: [Errno 2] No such file or directory: 
'/proc/spl/kstat/zfs/xuio_stats'


  Indeed, the xuio_stats file isn't there anymore:
  $ ll /proc/spl/kstat/zfs/
  total 0
  dr-xr-xr-x 21 root root 0 Jul  6 10:49 ./
  dr-xr-xr-x  4 root root 0 Jul  6 10:49 ../
  -rw-r--r--  1 root root 0 Jul  6 10:49 abdstats
  -rw-r--r--  1 root root 0 Jul  6 10:49 arcstats
  dr-xr-xr-x 20 root root 0 Jul  6 10:49 data/
  -rw-------  1 root root 0 Jul  6 10:49 dbgmsg
  -rw-------  1 root root 0 Jul  6 10:49 dbufs
  -rw-r--r--  1 root root 0 Jul  6 10:49 dbufstats
  dr-xr-xr-x 70 root root 0 Jul  6 10:49 default/
  -rw-r--r--  1 root root 0 Jul  6 10:49 dmu_tx
  -rw-r--r--  1 root root 0 Jul  6 10:49 dnodestats
  -rw-r--r--  1 root root 0 Jul  6 10:49 fletcher_4_bench
  -rw-r--r--  1 root root 0 Jul  6 10:49 fm
  -rw-r--r--  1 root root 0 Jul  6 10:49 import_progress
  -rw-r--r--  1 root root 0 Jul  6 10:49 metaslab_stats
  -rw-r--r--  1 root root 0 Jul  6 10:49 vdev_cache_stats
  -rw-r--r--  1 root root 0 Jul  6 10:49 vdev_mirror_stats
  -rw-r--r--  1 root root 0 Jul  6 10:49 vdev_raidz_bench
  -rw-r--r--  1 root root 0 Jul  6 10:49 zfetchstats
  -rw-r--r--  1 root root 0 Jul  6 10:49 zil
  -rw-r--r--  1 root root 0 Jul  6 10:49 zstd

  
  # Workaround

  This (naive) patch sidesteps the problem:

  $ diff -Naur /usr/sbin/arc_summary.old /usr/sbin/arc_summary
  --- /usr/sbin/arc_summary.old 2022-07-06 10:59:50.752833101 -0400
  +++ /usr/sbin/arc_summary     2022-07-06 10:59:22.449113169 -0400
  @@ -255,6 +255,8 @@
       secs = SECTION_PATHS.values()
   
       for section in secs:
  +        if not os.path.exists(PROC_PATH+section):
  +            continue
   
           with open(PROC_PATH+section, 'r') as proc_location:
               lines = [line for line in proc_location]

  
  # Additional information
  $ lsb_release -rd
  Description:  Ubuntu 20.04.4 LTS
  Release:      20.04
  $ uname -r
  5.15.0-41-generic
  $ apt-cache policy zfsutils-linux linux-image-generic-hwe-20.04
  zfsutils-linux:
    Installed: 0.8.3-1ubuntu12.14
    Candidate: 0.8.3-1ubuntu12.14
    Version table:
   *** 0.8.3-1ubuntu12.14 500
          500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       0.8.3-1ubuntu12.9 500
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
       0.8.3-1ubuntu12 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
  linux-image-generic-hwe-20.04:
    Installed: 5.15.0.41.44~20.04.13
    Candidate: 5.15.0.41.44~20.04.13
    Version table:
   *** 5.15.0.41.44~20.04.13 400
          400 http://us.archive.ubuntu.com/ubuntu focal-proposed/main amd64 
Packages
          100 /var/lib/dpkg/status
       5.13.0.52.59~20.04.31 500
          500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
          500 http://security.ubuntu.com/ubuntu focal-security/main amd64 
Packages
       5.4.0.26.32 500
          500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1980848/+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