iotop crashes when system time updates to a value in the past
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iotop (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
1) lsb_release -rd
Description: Ubuntu 14.04.5 LTS
Release: 14.04
2) apt-cache policy iotop
iotop:
Installed: 0.6-1
Candidate: 0.6-1
Version table:
*** 0.6-1 0
500 http://
100 /var/lib/
3) while "iotop" or "sudo iotop" is running, when system time updates to a value in the past, "iotop" should continue running and not crash
4) iotop crashes when system time updates to a value in the past
Steps to reproduce:
a) modify system time to be set manually and set it to a future date, for example 1 year from now (i.e., just change the year to 2018). you can do this with minutes as well. this is a realistic scenario in some cases when the date is wrongly set by hand or by BIOS
b) in a terminal start iotop (e.g., "sudo iotop") and have iotop running
c) change the system to update its time from the internet/NTP and confirm the system date was updated
d) watch the iotop crash in the terminal and the Ubuntu AppPort error reporting popping-up
e) iotop traceback follows:
Traceback (most recent call last):
File "/usr/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/
main_loop()
File "/usr/lib/
main_loop = lambda: run_iotop(options)
File "/usr/lib/
return curses.
File "/usr/lib/
return func(stdscr, *args, **kwds)
File "/usr/lib/
ui.run()
File "/usr/lib/
self.
File "/usr/lib/
format_
File "/usr/lib/
return format_
File "/usr/lib/
return human_size(bytes)
File "/usr/lib/
return '%s%.2f %s' % (sign, (float(size) / (1 << (10 * expo))), UNITS[expo])
ValueError: negative shift count
First of all thank you for your report Andrei and your help to make Ubuntu better.
I can confirm the behavior - looking into what is affected and if there might be a solution already ...