Bug 100 - LTP - gettimeofday02 fails (time is going backwards)
Summary: LTP - gettimeofday02 fails (time is going backwards)
Status: CLOSED CODE_FIX
Alias: None
Product: Timers
Classification: Unclassified
Component: gettimeofday (show other bugs)
Hardware: IA-32 Linux
: P2 normal
Assignee: john stultz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-19 06:45 UTC by Paul Larson
Modified: 2003-02-21 04:31 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Paul Larson 2002-11-19 06:45:37 UTC
(Please check that the problem happens on Linus' tree if not then file under the
Alternate Trees category.)
Exact Kernel version:
2.5.47 (and many other 2.5 kernels, not specific to this version)

Distribution:
SuSE 8.0

Hardware Environment:
2-way PIII-550

Software Environment:
Problem Description:
I've been getting a somewhat random error in a few of the recent 2.5
kernels with SMP machines.  I noticed this on a 2.5.47 bk pull, but I
was also able to reproduce it on 2.5.46.  I haven't tried any earlier
kernels yet.  The LTP gettimeofday02 test sometimes fails with this
message:
gettimeofday02    0  INFO  :  checking if gettimeofday is monotonous,
takes 30s
gettimeofday02    1  FAIL  :  Time is going backwards (old
1037138184.846333 vs new 1037138184.843346!

I have not been able to reproduce this on a single processor machine
though.

Basically, all the test does is:
gettimeofday(&tv1, NULL);
while(!done) {
        gettimeofday(&tv2, NULL);
        FAIL if tv2 < tv1
        tv1 = tv2;
}

Steps to reproduce:
Run gettimeofday02 from LTP on a SMP machine.  It happens at random and may take
several tries.
Comment 1 john stultz 2002-11-19 20:08:55 UTC
I've reproduced the bug here. Will continue researching it.  
Comment 2 Paul Larson 2003-01-23 12:39:08 UTC
any update on this? It's still failing.
Comment 3 john stultz 2003-01-24 15:31:52 UTC
xtime_lock starvation and lost-interrupts are two known causes of this problem. 
Once those are shot down, hopefully this can be closed or researched further. 
 
Comment 4 john stultz 2003-02-12 11:38:36 UTC
lost-ticks and seqence locks (accepted into 2.5.60) should have fixed this and so far 
it hasn't reoccured in testing, so I'm marking this fixed.  
Comment 5 Thomas Molina 2003-02-21 04:31:45 UTC
Fix has been incorporated into mainline tree.  Therefore this bug is closed.

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