Bug 801386

Summary: \usr\bin\time command inncorect count user time after 64 seconds on pentium 4
Product: [Fedora] Fedora Reporter: wywrotowiec
Component: timeAssignee: Petr Pisar <ppisar>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 19CC: ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-27 09:05:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test case
none
test case none

Description wywrotowiec 2012-03-08 12:15:24 UTC
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
3.
  
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 13:25:27 UTC
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 14:22:58 UTC
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 11:47:23 UTC
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 11:58:56 UTC
i686 F16 with PAE kernel is not affected:

kernel-PAE-3.2.10-3.fc16.i686
glibc-2.14.90-24.fc16.6.i686
time-1.7-39.fc16.i686

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 16:53:24 UTC
i686 F17 with PAE kernel is not affected:

kernel-PAE-3.3.0-0.rc4.git1.4.fc17.i686
glibc-2.15-28.fc17.i686
time-1.7-40.fc17.i686

Comment 6 Fedora End Of Life 2013-04-03 17:07:23 UTC
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:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 7 Red Hat Bugzilla 2023-09-14 01:27:56 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days