Bug 17160

Summary: times function call
Product: [Retired] Red Hat Linux Reporter: Brent Bice <bbice>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-22 08:09:11 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:

Description Brent Bice 2000-09-01 00:55:29 UTC
I think the times function call may be occasionally returning bogus 
results.  When I run the "speed" program that comes with libdes (version in
Crack 5.0a), it runs a variety of functions for around 10 seconds, and 
measures how many seconds it really ran for, then computes the number of 
crypt calls per second it did.  For instance, on a RedHat 6.2 ia64 machine:

Doing set_key for 10 seconds
5535402 set_key's in 102.39 seconds
Doing des_ecb_encrypt's for 10 seconds
8419500 des_ecb_encrypt's in 102.39 second
Doing des_cbc_encrypt on 8192 byte blocks for 10 seconds
8944 des_cbc_encrypt's of 8192 byte blocks in 102.40 second
Doing des_ede_cbc_encrypt on 8192 byte blocks for 10 seconds
3318 des_ede_cbc_encrypt's of 8192 byte blocks in 102.42 second
Doing crypt for 10 seconds
331519 crypts in 102.39 second
set_key            per sec =     54061.94 ( 18.5uS)
DES ecb bytes      per sec =    657837.68 ( 12.2uS)
DES cbc bytes      per sec =    715520.00 ( 11.2uS)
DES ede cbc bytes  per sec =    265388.17 ( 30.1uS)
crypt              per sec =      3237.81 (308.9uS)

   NOTE!! Even though it says it ran a few tests for 102 seconds, they
really only ran approximately 10 seconds!

The exact same binary on a TurboLinux ia64 machine:

Doing set_key for 10 seconds
5356235 set_key's in 9.53 seconds
Doing des_ecb_encrypt's for 10 seconds
8638977 des_ecb_encrypt's in 9.52 second
Doing des_cbc_encrypt on 8192 byte blocks for 10 seconds
8557 des_cbc_encrypt's of 8192 byte blocks in 9.53 second
Doing des_ede_cbc_encrypt on 8192 byte blocks for 10 seconds
3177 des_ede_cbc_encrypt's of 8192 byte blocks in 9.53 second
Doing crypt for 10 seconds
310854 crypts in 9.52 second
set_key            per sec =    562039.35 (  1.8uS)
DES ecb bytes      per sec =   7259644.54 (  1.1uS)
DES cbc bytes      per sec =   7355607.97 (  1.1uS)
DES ede cbc bytes  per sec =   2730953.20 (  2.9uS)
crypt              per sec =     32652.73 ( 30.6uS)

   It doesn't seem to matter which machine (the TurboLinux machine or
the Redhat machine) I compile it on.  In either case, it runs correctly on
TurboLinux but not on RedHat.

The redhat machine shows it has glibc-devel-2.1.3-0.0622.3 installed.

Comment 1 Ulrich Drepper 2003-04-22 00:40:12 UTC
times is a simple wrapper around the times syscall.  Whatever is reported to the
user program is received from the kernel.

Early ia64 kernel definitily had lots of programs.  I would guess this is just a
glitch in the kernel version we happened to use.  The kernel people might be
able to add more.

Comment 2 Arjan van de Ven 2003-04-22 08:09:11 UTC
this doesn't nearly sound like a remotely recent kernel at all

Comment 3 Brent Bice 2003-04-22 20:46:51 UTC
Well, DUUUUUUH! Of course it's not a recent kernel.  But look at the date that I
first posted about the bug.  OVER TWO YEARS AGO! (sigh)