From: Jim Paris <jim@jtan.com>
To: linux-kernel@vger.kernel.org
Subject: time() glitch on 2.4.18 at 177 days uptime?
Date: Sat, 2 Nov 2002 01:37:04 -0500 [thread overview]
Message-ID: <20021102013704.A24684@neurosis.mit.edu> (raw)
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
http://neurosis.mit.edu/~jim/time-glitch/
(and would appreciate a CC of any replies)
-jim
next reply other threads:[~2002-11-02 6:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-02 6:37 Jim Paris [this message]
2002-11-03 19:32 ` time() glitch on 2.4.18: solved Jim Paris
2002-11-03 20:30 ` Alan Cox
2002-11-05 16:30 ` [PATCH] " Jim Paris
2002-11-05 16:54 ` george anzinger
2002-11-05 17:10 ` Willy Tarreau
2002-11-05 18:16 ` Alan Cox
2002-11-05 18:02 ` Jim Paris
2002-11-05 18:37 ` Alan Cox
2002-11-05 18:20 ` Willy Tarreau
2002-11-05 18:50 ` Jim Paris
2002-11-05 17:14 ` Willy Tarreau
2002-11-05 17:42 ` Jim Paris
2002-11-05 18:57 ` Richard B. Johnson
2002-11-05 19:08 ` Willy Tarreau
2002-11-05 19:29 ` Richard B. Johnson
2002-11-05 20:07 ` Alan Cox
2002-11-05 20:14 ` Willy Tarreau
2002-11-05 20:38 ` Richard B. Johnson
2002-11-05 23:15 ` Willy Tarreau
2002-11-06 12:47 ` Richard B. Johnson
2002-11-06 13:25 ` Alan Cox
2002-11-06 23:21 ` Jim Paris
2002-11-05 20:23 ` Richard B. Johnson
2002-11-05 20:57 ` Alan Cox
2002-11-05 20:41 ` Richard B. Johnson
2002-11-06 15:09 ` Christer Weinigel
2002-11-06 15:49 ` Richard B. Johnson
2002-11-05 20:06 ` Alan Cox
2002-11-05 17:32 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021102013704.A24684@neurosis.mit.edu \
--to=jim@jtan.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®