Bug 478380

Summary: Gettimeofday(2) Off-by-one after Settimeofday(2)
Product: Red Hat Enterprise Linux 4 Reporter: Qian Cai <qcai>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED WONTFIX QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: medium    
Version: 4.7   
Target Milestone: rc   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-05 15:45:53 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
reproducer none

Description Qian Cai 2008-12-29 07:08:25 UTC
Description of problem:
On all (at least 5) IA-64 machines tested, the following test will fail,

curr_time = gettimeofday()
settimeofday (curr_time + 10)
pres_time = gettimeofday()

The result that gettimeofday() returned was one less that we set.

# ./time
curr_time = 1228827598
pres_time = 1228827607
Failed.

Version-Release number of selected component (if applicable):
kernel-2.6.9-78.EL
kernel-2.6.9-78.0.12.EL

How reproducible:
always

Steps to Reproduce:
1. run the reproducer
  
Actual results:
The test failed.

Expected results:
The test should pass.


Additional info:
* I have only seen this on IA-64.
* I have only seen this on RHEL 4.
* RHEL 5 has the same behaviour if using time() instead of gettimeofday.
Bug 475477 - Time(2) Off-by-one after Settimeofday(2)

Comment 1 Qian Cai 2008-12-29 07:12:38 UTC
Created attachment 327913 [details]
reproducer

Comment 2 Qian Cai 2008-12-29 07:40:41 UTC
By the way, NTP has been stopped during the test.

Comment 3 Prarit Bhargava 2009-01-05 15:45:53 UTC
Since this is RHEL4 ia64, and we're at the end of development, I'm closing this as WONTFIX.

P.