stime and utime overflow in /proc/stat
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I'am using Ubuntu Server amd64 10.04
Linux alge 2.6.32-28-server #55-Ubuntu SMP Mon Jan 10 23:57:16 UTC 2011 x86_64 GNU/Linux
The utime counter in /proc/stat is overflowing at a value of roughly 2^32/10, also the stime counter is roughly 2^62 afterwards.
Here i dumped the content of /proc/stat for a process which used >2.1 mil cpu sec every 60 seconds - last correct line:
29630 (main) R 29629 27811 17057 34818 27811 4202496 48883664 0 3 0 214675699 42974 0 0 20 0 24 0 199761349 15510073344 3561325 184467440737095
214675699 and 42974 are correct values of user and system time
60 secs later:
29630 (main) R 29629 27811 17057 34818 27811 4202496 48889323 0 3 0 85858531240 4611685932568856662 0 0 20 0 24 0 199761349 15510749184 3565333 184467440737095
85858531240 and 4611685932568856662 - not so good....
ps or top or htop are showing garbage for usertime afterwards.
_SC_CLK_TCK seems to be 100 on my system.
affects: | ubuntu → linux (Ubuntu) |
Same problem here. 51615 4194304 7543765 140733910046816 140733910039880 5147444 0 0 0 0 0 0 0 17 2 0 0 0 0 0
The /proc/<pid>/stat is
24958 (my_prog) R 2715 24958 2715 34821 24958 4202496 9880 0 12 0 85865547142 4611685932561840760 0 0 20 0 1 0 260208895 82169856 7534 184467440737095
ps aux gives
my_login 24958 305466865 0.7 80244 30136 pts/5 R+ May27 17179869:11 my_prog
uname -a
Linux frpar1lx052 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux
I'm not an expert in kernel but looking at numbers given by Jochen : 429740+ 60000 < 2**31 (why overflow now)
2146756990+
4611685932568856662 + 85858531240 ~ 2**62
I would say that the overflow is rather in the total time (current_time - stating_time)