Bug 636241 - Discrepancy between gettimeofday and time
Summary: Discrepancy between gettimeofday and time
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Prarit Bhargava
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-21 17:50 UTC by Stefan Ring
Modified: 2010-09-21 18:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 636255 (view as bug list)
Environment:
Last Closed: 2010-09-21 18:44:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Test program (460 bytes, text/x-csrc)
2010-09-21 17:50 UTC, Stefan Ring
no flags Details

Description Stefan Ring 2010-09-21 17:50:52 UTC
Created attachment 448761 [details]
Test program

Description of problem:

This problem is very similar to bug #550968, yet it's something different. The attached test program shows that gettimeofday() exposes second increments earlier than time(). There is a fix for this in the mainline kernel, but it was never integrated in the stable 2.6.21 series or the RHEL kernel. The patch should be integrated in the RedHat kernel.

I have several wrongly-named dump/backup files at a customer site because of this.

Fix in mainline (between 2.6.22-rc2 and 2.6.22-rc3): http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0aff6e6f4e54f79f9c89d147d371bad384454e9


Version-Release number of selected component (if applicable):
2.6.18-194.el5

Comment 1 Prarit Bhargava 2010-09-21 18:44:11 UTC
From BZ 461184:

"jturner noted that performance testing on the new time() syscall
 resulted in a 2200% increase in the amount of time to call time().  This is
 unacceptable so I am reverting this small change which will leave time()
 and gettimeofday() unsynchronized in RHEL5."

P.


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