I'm running Linux 2.4.18 on an Athlon (i386).
My uptime is 182 days. About five days ago, I started noticing
strange date effects. It may be hardware related, but I'm also
suspecting that it may be due to the long uptime, and so I'm hesitant
to reboot, in case there is a bug here that needs to get fixed.
The problem is with time(). Every second, for approximately 1.1ms,
time() reports a value that is about 2^32 microseconds (4295 seconds,
or about an hour and a quarter) in the future. The glitches always
occur between a change of seconds. Look at this:
$ while true; do paste <( cat /proc/uptime ) <( date ) ; done | grep -A 1 -B 1 ' 02:' | head -11
15765463.31 15455589.84 Sat Nov 2 00:59:16 EST 2002
15765463.32 15455589.84 Sat Nov 2 02:10:51 EST 2002
15765463.33 15455589.84 Sat Nov 2 00:59:17 EST 2002
-- 15765465.31 15455589.84 Sat Nov 2 00:59:18 EST 2002 15765465.32 15455589.84 Sat Nov 2 02:10:53 EST 2002 15765465.34 15455589.84 Sat Nov 2 00:59:19 EST 2002 -- 15765466.30 15455589.84 Sat Nov 2 00:59:19 EST 2002 15765466.32 15455589.84 Sat Nov 2 02:10:54 EST 2002 15765466.33 15455589.84 Sat Nov 2 00:59:20 EST 2002
The first two values on each line are from /proc/uptime, and the rest is of course from "date". This bash script runs a bit slow, which is why it missed the glitch between :17 and :18, but by watching time()s more frequently, I can definitely see that they're there. I don't know for certain whether this happens at all times during the day, but I believe it does. I can do some more logging to figure that out if necessary.
I've been running ntpdate (and therefore calling do_adjtime()) every half hour since the system booted, in case that might affect something.
This glitch does _not_ occur on a 2.2.? system on some x86 processor with about 256 days uptime (I unfortunately don't know any more details than that; I only have very limited access to that machine). I also don't have access to any other 2.4 systems with an uptime of greater than about 80 days.
This is not a glibc bug; the erroneous values are being returned by the kernel. Perhaps someone can help me track this down. I've put my kernel config and relevant info from /proc at
(and would appreciate a CC of any replies)
-jim - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:23 EST