arc_summary doesn't work with HWE kernel 5.15
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
Fix Released
|
Medium
|
Heitor Alves de Siqueira | ||
Focal |
Fix Committed
|
Medium
|
Heitor Alves de Siqueira |
Bug Description
[ Impact ]
The arc_summary command doesn't work on HWE kernels for Focal
[ Test Plan ]
1) setup 20.04 with HWE kernel 5.15
2) install `zfsutils-linux`
3) run `arc_summary`, this should not cause any errors
$ arc_summary
Traceback (most recent call last):
File "/usr/sbin/
main()
File "/usr/sbin/
kstats = get_kstats()
File "/usr/sbin/
with open(PROC_
FileNotFoundError: [Errno 2] No such file or directory: '/proc/
[ Where problems could occur ]
Given that upstream does not have to deal with two kernel versions like Ubuntu (GA vs HWE), our SAUCE patch will skip any non-existent files under /proc/spl/
Users expecting the HWE kernel to contain output from xuio_stats like we had in GA will not see it in the ARC summary output. Any new stats that get introduced into the HWE kernel will also be skipped due to this patch, if they're missing from the GA kernel.
--
# 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/
main()
File "/usr/sbin/
kstats = get_kstats()
File "/usr/sbin/
with open(PROC_
FileNotFoundError: [Errno 2] No such file or directory: '/proc/
Indeed, the xuio_stats file isn't there anymore:
$ ll /proc/spl/
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/
--- /usr/sbin/
+++ /usr/sbin/
@@ -255,6 +255,8 @@
secs = SECTION_
for section in secs:
+ if not os.path.
+ continue
with open(PROC_
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-
zfsutils-linux:
Installed: 0.8.3-1ubuntu12.14
Candidate: 0.8.3-1ubuntu12.14
Version table:
*** 0.8.3-1ubuntu12.14 500
500 http://
100 /var/lib/
0.
500 http://
0.
500 http://
linux-image-
Installed: 5.15.0.
Candidate: 5.15.0.
Version table:
*** 5.15.0.
400 http://
100 /var/lib/
5.
500 http://
500 http://
5.4.0.26.32 500
500 http://
Changed in zfs-linux (Ubuntu Focal): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
Changed in zfs-linux (Ubuntu): | |
status: | Confirmed → Fix Released |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
importance: | Undecided → Medium |
description: | updated |
tags: | added: verification-done-focal |
tags: | added: verification-done |
Status changed to 'Confirmed' because the bug affects multiple users.