Bug 801386 - \usr\bin\time command inncorect count user time after 64 seconds on pentium 4 [NEEDINFO]
\usr\bin\time command inncorect count user time after 64 seconds on pentium 4
Product: Fedora
Classification: Fedora
Component: time (Show other bugs)
i686 Linux
unspecified Severity low
: ---
: ---
Assigned To: Petr Pisar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-08 07:15 EST by wywrotowiec
Modified: 2014-03-27 05:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-03-27 05:05:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ppisar: needinfo? (wywrotowiec)

Attachments (Terms of Use)
test case (977 bytes, text/plain)
2012-03-16 09:25 EDT, Petr Pisar
no flags Details
test case (1.01 KB, text/plain)
2012-03-20 07:47 EDT, Petr Pisar
no flags Details

  None (edit)
Description wywrotowiec 2012-03-08 07:15:24 EST
Description of problem:
I have executing some performance tests ,and i noticed that for every tests that takes longer then 65 sec output of \usr\bin\time command is that :  USER time is allways less then 65 sec and system time is increase  depend on tests time.

for test period less then <65 sec everything look ok ,but after 65 sec time is starting adding user time to system time .
where mpstat output looks like this for all test time :
12:40:17 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
12:40:22 PM  all   66.10    0.00    4.20    0.00    0.20    0.00    0.00    0.00   29.5

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.start \usr\bin\time [any program that spend most of his time in user mode 
2.wait  120 sec
Actual results:

64 sec user time + 56 system time  
Expected results:
119 user time, 1 sec system time 

Additional info:
this may be related to HT on pentium 4.Here is detailed info about CPU

[root@localhost ~]# cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 2
model name	: Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping	: 9
cpu MHz		: 2400.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
bogomips	: 4821.07
clflush size	: 64
cache_alignment	: 128
address sizes	: 36 bits physical, 32 bits virtua
Comment 1 Petr Pisar 2012-03-16 09:25:27 EDT
Created attachment 570609 [details]
test case

Run "/bin/time -p ./a.out 66" to measure 66 wall-clock seconds running time spent mostly in user space. Numbers on stdout are times obtained by the process, numbers on stderr by /bin/time.
Comment 2 Petr Pisar 2012-03-16 10:22:58 EDT
Which kernel do you have. Pure 32-bit without PAE, or 32-bit with PAE or 64-bit kernel and 32-bit userspace?
Comment 3 Petr Pisar 2012-03-20 07:47:23 EDT
Created attachment 571367 [details]
test case

This casts the time_t values because size of timeval members do not match on i386.
Comment 4 Petr Pisar 2012-03-20 07:58:56 EDT
i686 F16 with PAE kernel is not affected:


vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 9
Comment 5 Petr Pisar 2012-03-20 12:53:24 EDT
i686 F17 with PAE kernel is not affected:

Comment 6 Fedora End Of Life 2013-04-03 13:07:23 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Note You need to log in before you can comment on or make changes to this bug.