Hello community, here is the log from the commit of package iotop for openSUSE:Factory checked in at 2018-05-30 12:24:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iotop (Old) and /work/SRC/openSUSE:Factory/.iotop.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iotop" Wed May 30 12:24:09 2018 rev:26 rq:612962 version:0.6 Changes: -------- --- /work/SRC/openSUSE:Factory/iotop/iotop.changes 2018-02-22 15:01:12.972658407 +0100 +++ /work/SRC/openSUSE:Factory/.iotop.new/iotop.changes 2018-05-30 12:29:15.154133385 +0200 @@ -1,0 +2,9 @@ +Tue May 29 15:33:22 UTC 2018 - [email protected] + +- Add iotop-0.60-fix-proc-status-split.patch: Upstream commit to + fix crash when /proc/*/status doesn't have tab character (this + can be the case with vserver kernels) +- Add iotop-0.6-ignore-invalid-lines-in-proc-status.patch: Upstream + commit to fix crash when /proc/*/status has invalid lines + +------------------------------------------------------------------- New: ---- iotop-0.6-ignore-invalid-lines-in-proc-status.patch iotop-0.60-fix-proc-status-split.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iotop.spec ++++++ --- /var/tmp/diff_new_pack.F8TMLE/_old 2018-05-30 12:29:15.946104684 +0200 +++ /var/tmp/diff_new_pack.F8TMLE/_new 2018-05-30 12:29:15.950104539 +0200 @@ -30,6 +30,8 @@ Patch0: iotop-0.6-python3_build.patch Patch1: iotop-0.6-python3-header.patch Patch2: iotop-0.6-noendcurses.patch +Patch3: iotop-0.60-fix-proc-status-split.patch +Patch4: iotop-0.6-ignore-invalid-lines-in-proc-status.patch BuildRequires: fdupes BuildRequires: python3-devel Requires: python3-curses @@ -47,6 +49,8 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build python3 setup.py build ++++++ iotop-0.6-ignore-invalid-lines-in-proc-status.patch ++++++ >From 0392b205b5c3973a326721c2e9f97f0fa2eefa82 Mon Sep 17 00:00:00 2001 From: Paul Wise <[email protected]> Date: Fri, 25 May 2018 15:13:26 +0800 Subject: [PATCH] Ignore invalid lines in /proc/*/status files One Ubuntu Linux kernel security fix introduced a blank line. Some other Linux kernels may have invalid lines in the future. See-also: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772671 Fixes: https://bugs.launchpad.net/ubuntu/+source/iotop/+bug/1772856 Reported-by: Paul Jaros <[email protected]> Reported-in: <caeh_nc0_dxtmfu16pxmvyrci6qqesrpngghtfnu60wjyfa_...@mail.gmail.com> Traceback (most recent call last): File "/usr/sbin/iotop", line 17, in <module> main() File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 620, in main main_loop() File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 610, in <lambda> main_loop = lambda: run_iotop(options) File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 508, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 501, in run_iotop_window ui.run() File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 155, in run self.process_list.duration) File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 434, in refresh_display lines = self.get_data() File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 415, in get_data return list(map(format, processes)) File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 388, in format cmdline = p.get_cmdline() File "/usr/lib/python2.7/dist-packages/iotop/data.py", line 292, in get_cmdline proc_status = parse_proc_pid_status(self.pid) File "/usr/lib/python2.7/dist-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 --- iotop/data.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iotop/data.py b/iotop/data.py index 115bb8f..e0387f0 100644 --- a/iotop/data.py +++ b/iotop/data.py @@ -208,7 +208,13 @@ def parse_proc_pid_status(pid): result_dict = {} try: for line in open('/proc/%d/status' % pid): - key, value = line.split(':', 1) + try: + key, value = line.split(':', 1) + except ValueError: + # Ignore lines that are not formatted correctly as + # some downstream kernels may have weird lines and + # the needed fields are probably formatted correctly. + pass result_dict[key] = value.strip() except IOError: pass # No such process -- 2.10.5.GIT ++++++ iotop-0.60-fix-proc-status-split.patch ++++++ >From 7814f30a5ed65acd07f284bba991ca557788ee80 Mon Sep 17 00:00:00 2001 From: Paul Wise <[email protected]> Date: Thu, 28 Jul 2016 13:25:54 +0800 Subject: [PATCH] Only split /proc/*/status lines on the : character. Apparently vserver kernels have some lines that don't appear to have the tab character so iotop crashes. The tab character will be stripped by the next code line. Closes: https://bugs.gentoo.org/show_bug.cgi?id=458556 --- iotop/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iotop/data.py b/iotop/data.py index c4e961e..d18ca9d 100644 --- a/iotop/data.py +++ b/iotop/data.py @@ -197,7 +197,7 @@ def parse_proc_pid_status(pid): result_dict = {} try: for line in open('/proc/%d/status' % pid): - key, value = line.split(':\t', 1) + key, value = line.split(':', 1) result_dict[key] = value.strip() except IOError: pass # No such process -- 2.10.5.GIT
