Iotop stops working after upgrade to Red Hat Enterprise Linux v7.5
Environment
- Red Hat Enterprise Linux v7.5
- kernel version 3.10.0-862.3.2.el7.x86_64
- iotop-0.6-2.el7
Issue
- Iotop stops working after upgrade to Red Hat Enterprise Linux v7.5
- Iotop stops working after upgrade to kernel version 3.10.0-862.3.2.el7.x86_64
- iotop fails with the error, ValueError: need more than 1 value to unpack
Resolution
This issue is fixed in kernel version 3.10.0-862.6.3.el7.x86_64
Root Cause
The new kernel includes a new line in /proc/$pid/status for SpeculationStoreBypass: vulnerable but this is prefixed by a completely blank line in the "file". This blank line appears to be the problem that breaks iotop. It is possible to amend iotop to handle a blank line but the problem appears to have been caused by the SSBP code and addition to the proc_pid_status file.
Diagnostic Steps
- Install kernel-3.10.0-862.3.2.el7.x86_64 and reboot into it
- Run iotop
- Watch the nice python stacktrace
# iotop
Traceback (most recent call last):
File "/usr/sbin/iotop", line 17, in
main()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 620, in main
main_loop()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 610, in
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 508, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib64/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 501, in run_iotop_window
ui.run()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 434, in refresh_display
lines = self.get_data()
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 415, in get_data
return list(map(format, processes))
File "/usr/lib/python2.7/site-packages/iotop/ui.py", line 388, in format
cmdline = p.get_cmdline()
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 292, in get_cmdline
proc_status = parse_proc_pid_status(self.pid)
File "/usr/lib/python2.7/site-packages/iotop/data.py", line 196, in parse_proc_pid_status
key, value = line.split(':\t', 1)
ValueError: need more than 1 value to unpack
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments