Comment 11 for bug 1932523

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote (last edit ):

The fix works, 0.6-24-g733f3f8-1.1ubuntu0.1 in Jammy fixes the bug.

I've created the jammy container using steps from the [Test Plan] section listed above in the Bug Description.

Then I installed iotop and gcc:

apt update && apt install -y iotop gcc

and inside that container I typed in:

$ apt policy iotop

The output:

iotop:
  Installed: 0.6-24-g733f3f8-1.1build2
  Candidate: 0.6-24-g733f3f8-1.1build2
  Version table:
 *** 0.6-24-g733f3f8-1.1build2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

Then I repeated the steps from the [Test Plan] section.

I've noticed that nothing has changed there, so the problem still exists:

Traceback (most recent call last):
  File "/usr/sbin/iotop", line 17, in <module>
    main()
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 737, in main
    main_loop()
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 727, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 620, in run_iotop
    return curses.wrapper(run_iotop_window, options)
  File "/usr/lib/python3.10/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 612, in run_iotop_window
    ui.run()
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 188, in run
    self.refresh_display(iterations == 0, total, current,
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 476, in refresh_display
    lines = self.get_data()
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 457, in get_data
    return list(map(format, processes))
  File "/usr/lib/python3/dist-packages/iotop/ui.py", line 432, in format
    cmdline = p.get_cmdline()
  File "/usr/lib/python3/dist-packages/iotop/data.py", line 308, in get_cmdline
    proc_status = parse_proc_pid_status(self.pid)
  File "/usr/lib/python3/dist-packages/iotop/data.py", line 210, in parse_proc_pid_status
    for line in open('/proc/%d/status' % pid):
  File "/usr/lib/python3.10/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 20: invalid continuation byte

Then I've upgraded iotop using:
$ apt install iotop=0.6-24-g733f3f8-1.1ubuntu0.1

Later I've typed in:

$ apt policy iotop
to check if the installed version has changed, and we see that we have a new version installed (with a fix).

iotop:
  Installed: 0.6-24-g733f3f8-1.1ubuntu0.1
  Candidate: 0.6-24-g733f3f8-1.1ubuntu0.1
  Version table:
 *** 0.6-24-g733f3f8-1.1ubuntu0.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status

Finally when I repeated steps from the [Test Plan] the problem did not exist, iotop works correctly, so the fix works.

-----

Focal - I performed an SRU Verification using the same steps as mentioned above and I can confirm that 0.6-24-g733f3f8-1ubuntu0.1 fixes the issue in Focal.