Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Fix Version/s: OpenVZ-legacy
-
Component/s: Containers::Kernel
-
Security Level: Public
-
Environment:Operating System: RHEL/CentOS 5
Platform: x86_64 (AMD64)
-
External issue URL:
-
External issue ID:2179
Description
I am using 2.6.32-042stab044.11.
I found vmstat threw floating a floating point exception in VE and the reason.
/proc/stat cpu idle task time is reduced in sometimes.
I can reproduce following steps:
1. vzctl enter <ctid>
2. execute following python script
root@ubuntu-64:/# cat proc_stat_problem.py
import time
while True:
f = open('/proc/stat')
for x in f:
if x.startswith('cpu '):
print x.strip()
f.close()
time.sleep(1)
root@ubuntu-64:/# python proc_stat_problem.py
cpu 13367 0 5512 494801 18113 0 0 0
cpu 13367 0 5512 508076 18113 0 0 0
cpu 13367 0 5512 508115 18113 0 0 0
cpu 13367 0 5512 508154 18113 0 0 0
cpu 13367 0 5512 495215 18113 0 0 0 <= D'oh!
cpu 13367 0 5512 502007 18113 0 0 0
^CTraceback (most recent call last):
File "proc_stat_problem.py", line 8, in <module>
time.sleep(1)
KeyboardInterrupt
root@ubuntu-64:/#
3. check above 5th field of the result. cpu idle time should be increased but it seems decrease.
BTW, I cannot reproduce following command line.
root@ubuntu-64:/# while :; do cat /proc/stat | egrep '^cpu '; sleep 1; done
I found vmstat threw floating a floating point exception in VE and the reason.
/proc/stat cpu idle task time is reduced in sometimes.
I can reproduce following steps:
1. vzctl enter <ctid>
2. execute following python script
root@ubuntu-64:/# cat proc_stat_problem.py
import time
while True:
f = open('/proc/stat')
for x in f:
if x.startswith('cpu '):
print x.strip()
f.close()
time.sleep(1)
root@ubuntu-64:/# python proc_stat_problem.py
cpu 13367 0 5512 494801 18113 0 0 0
cpu 13367 0 5512 508076 18113 0 0 0
cpu 13367 0 5512 508115 18113 0 0 0
cpu 13367 0 5512 508154 18113 0 0 0
cpu 13367 0 5512 495215 18113 0 0 0 <= D'oh!
cpu 13367 0 5512 502007 18113 0 0 0
^CTraceback (most recent call last):
File "proc_stat_problem.py", line 8, in <module>
time.sleep(1)
KeyboardInterrupt
root@ubuntu-64:/#
3. check above 5th field of the result. cpu idle time should be increased but it seems decrease.
BTW, I cannot reproduce following command line.
root@ubuntu-64:/# while :; do cat /proc/stat | egrep '^cpu '; sleep 1; done