From: "Linas Vepstas" <linasvepstas@gmail.com>
To: "Nick Andrew" <nick@nick-andrew.net>
Cc: "David Newall" <davidn@davidnewall.com>,
david@lang.hm, "Kyle Moffett" <kyle@moffetthome.net>,
"Ben Goodger" <goodgerster@gmail.com>,
"Robert Hancock" <hancockr@shaw.ca>,
linux-kernel@vger.kernel.org,
"Jeffrey J. Kosowsky" <jeff@kosowsky.org>,
MentalMooMan <slashdot@jameshallam.info>,
"Travis Crump" <pretzalz@techhouse.org>,
burdell@iruntheinter.net
Subject: Re: Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009
Date: Mon, 5 Jan 2009 10:08:50 -0600 [thread overview]
Message-ID: <3ae3aa420901050808r100e533fo5f88edfbb5f0747a@mail.gmail.com> (raw)
In-Reply-To: <20090105143335.GC18055@mail.local.tull.net>
2009/1/5 Nick Andrew <nick@nick-andrew.net>:
> On Sun, Jan 04, 2009 at 11:48:31PM -0600, Linas Vepstas wrote:
>> There *was* talk of eliminating them forever (so as to
>> avoid this kind of bug, which affects banks, satellites,
>> telecom equipment, etc.) but I guess they didn't do it.
>
> I can sympathise with the opinion that linux should be able to accurately
> distinguish xx:59:60 when a leap second is added (or the missing :59 when
> one is subtracted) but not at the expense of making a day which is not
> 86400 seconds long.
Careful: This seems to be *exactly* the intent of the
maintainers of the UTC definition: some days really
will have 86401 seconds in them. That's why there's
all this talk of 'solar time' (see e.g. the wikipedia article)
> To fix the problem would require accurately modeling international
> timekeeping standards such as TAI and use of different syscalls to
> return time in TAI and UTC-with-leap-seconds represented. It
> wouldn't be good to change the semantics of time().
Now, this is the first proposal that I've heard that makes
sense. I believe that the Linux kernel/userspace
infrastructure already " accurately models international
timekeeping standards", so we're good.
Changing the kernel to track TAI instead of UTC seems
like an excellent idea -- but not one without a significant
amount of work -- maybe new syscalls are needed, as
well as new monkeying-about in glibc, maybe in ntpd, etc.
> * http://en.wikipedia.org/wiki/International_Atomic_Time
> * http://en.wikipedia.org/wiki/Leap_second
>
> Arguably the kernel's responsibility should be to keep track of the
> most fundamental representation of time possible for a machine (that's
> probably TAI) and it is a userspace responsibility to map from that
> value to other time standards including UTC,
Yes, this really does seem like the right solution.
> using control files
> which are updated as leap seconds are declared.
Lets be clear on what "control files" means. This does
*NOT* mean some config file shipped by some distro
for some package. That would be a horrid solution.
People don't install updates, patches, etc. Distros
ship them late, or never, if the distro is old enough.
A more appropriate solution would be to have
either the kernel or ntpd track the leap seconds
automatically. First, the ntp protocol already provides
the needed notification of a leap second to anyone
who cares about it (i.e. there is no point in getting a
Linux distro involved in this -- a distribution mechanism
already exists, and works *better* than having a distro
do it).
If the kernel needs to track leap seconds, it could do
so using a mechanism similar to the "random pool"
that is saved across reboots. Alternately, ntpd already
stores slew rates &etc. in files, and could track leap
seconds likewise.
> Just so long as the
> existing behaviour of time() which doesn't recognise leap seconds
> is preserved.
Well, 'man 2 time' is as clear as mud. It talks about leap seconds,
but I can't figure out what its saying. I rather
doubt that time() is doing what POSIX.1 seems to want
it to do (which is to ignore leap seconds?)
The reason I'm guessing that time() is wrong, is because
it seems that POSIX wants time() to use TAI time, and
we don't have that handy anywhere (because we've lost
track of those leap seconds)
--linas
next prev parent reply other threads:[~2009-01-05 16:09 UTC|newest]
Thread overview: 109+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 19:25 Linas Vepstas
2009-01-02 20:04 ` Diego Calleja
2009-01-02 20:25 ` Robert Hancock
2009-01-03 6:32 ` David Newall
2009-01-03 6:37 ` Ben Goodger
2009-01-04 8:43 ` David Newall
2009-01-04 9:00 ` Kyle Moffett
2009-01-04 10:03 ` David Newall
2009-01-04 11:13 ` david
2009-01-04 23:15 ` David Newall
2009-01-04 23:25 ` Chris Adams
2009-01-05 0:01 ` David Newall
2009-01-05 0:41 ` Alan Cox
2009-01-05 8:43 ` David Newall
2009-01-05 19:47 ` Alan Cox
2009-01-05 0:29 ` david
2009-01-04 23:37 ` David Newall
2009-01-05 1:05 ` david
2009-01-05 0:14 ` David Newall
2009-01-05 0:21 ` Ben Goodger
2009-01-05 6:34 ` David Newall
2009-01-05 23:03 ` Linas Vepstas
2009-01-05 0:44 ` Alan Cox
2009-01-05 5:48 ` Linas Vepstas
2009-01-05 14:33 ` Nick Andrew
2009-01-05 16:08 ` Linas Vepstas [this message]
2009-01-05 17:51 ` david
2009-01-05 17:42 ` Linas Vepstas
2009-01-06 2:27 ` john stultz-lkml
2009-01-06 4:53 ` Linas Vepstas
2009-01-06 5:00 ` Linas Vepstas
2009-01-06 19:40 ` [ntpwg] " M. Warner Losh
2009-01-06 19:50 ` M. Warner Losh
2009-01-07 3:50 ` Danny Mayer
2009-01-07 4:52 ` Linas Vepstas
2009-01-07 10:03 ` David Newall
2009-01-07 17:24 ` M. Warner Losh
2009-01-08 16:51 ` Magnus Danielson
2009-01-07 14:34 ` Danny Mayer
2009-01-07 15:42 ` Linas Vepstas
2009-01-07 19:23 ` Danny Mayer
2009-01-07 16:04 ` john stultz
2009-01-07 17:36 ` M. Warner Losh
2009-01-07 17:39 ` M. Warner Losh
2009-01-07 19:31 ` Alan Cox
2009-01-07 19:42 ` M. Warner Losh
2009-01-08 3:57 ` Danny Mayer
2009-01-08 4:42 ` M. Warner Losh
2009-01-08 10:48 ` Alan Cox
2009-01-08 10:56 ` Alan Cox
2009-01-08 22:22 ` David Mills
2009-01-08 15:02 ` M. Warner Losh
2009-01-08 18:57 ` Marshall Eubanks
2009-01-08 20:09 ` Steve Allen
2009-01-12 16:11 ` Pavel Machek
2009-01-12 17:07 ` [ntpwg] " M. Warner Losh
2009-01-12 21:45 ` Valdis.Kletnieks
2009-01-06 2:31 ` Nick Andrew
2009-01-06 1:59 ` David Newall
2009-01-06 2:18 ` Chris Adams
2009-01-06 2:51 ` Nick Andrew
2009-01-06 9:40 ` Alan Cox
2009-01-07 1:17 ` Nick Andrew
2009-01-07 9:37 ` Alan Cox
2009-01-07 9:46 ` David Newall
2009-01-07 9:54 ` Alan Cox
2009-01-07 10:18 ` David Newall
2009-01-07 10:52 ` Alan Cox
2009-01-07 13:45 ` David Newall
2009-01-07 14:10 ` Alan Cox
2009-01-07 14:36 ` David Newall
2009-01-07 15:40 ` Alan Cox
2009-01-10 9:46 ` David Newall
2009-01-07 22:13 ` Chris Adams
2009-01-07 13:33 ` Chris Adams
2009-01-07 13:37 ` Alan Cox
2009-01-07 14:12 ` David Newall
2009-01-07 14:09 ` David Newall
2009-01-07 21:42 ` Chris Adams
2009-01-04 11:35 ` Valdis.Kletnieks
2009-01-05 0:08 ` David Newall
2009-01-06 3:53 ` Valdis.Kletnieks
2009-01-04 17:20 ` Kyle Moffett
2009-01-03 7:00 ` Chris Adams
2009-01-04 8:41 ` David Newall
2009-01-02 20:29 ` Linas Vepstas
[not found] ` <8752a8760901021328t545a0327v58faebe1e921680a@mail.gmail.com>
2009-01-02 21:29 ` Ben Goodger
2009-01-03 0:21 ` Chris Adams
2009-01-03 2:23 ` Duane Griffin
2009-01-03 3:45 ` Linas Vepstas
2009-01-03 4:41 ` [PATCH] " Chris Adams
2009-01-03 4:52 ` Duane Griffin
2009-01-03 18:01 ` [PATCH] v2 " Chris Adams
2009-01-03 19:04 ` Duane Griffin
2009-01-03 20:01 ` Linas Vepstas
2009-06-08 2:18 ` Ben Hutchings
2009-06-18 22:34 ` Chris Friesen
2009-06-18 22:58 ` Ben Hutchings
2009-06-18 23:48 ` Chris Friesen
2009-01-06 2:21 ` john stultz-lkml
2009-01-06 2:25 ` Chris Adams
2009-01-06 4:35 ` Linas Vepstas
2009-01-03 3:49 ` Linas Vepstas
2009-01-03 4:02 ` Ben Goodger
2009-01-03 4:46 ` Duane Griffin
2009-01-03 4:50 ` Ben Goodger
2009-01-03 22:58 ` Jeffrey J. Kosowsky
[not found] <fa.dw2l5ZM+UL3xoF6IYh5RLMmbYfw@ifi.uio.no>
[not found] ` <fa.XOM1F85uBvmj4QzZKaDu36nYBk0@ifi.uio.no>
[not found] ` <fa.rviZJBmVqkAE5uxDjhJOpIuKT4g@ifi.uio.no>
[not found] ` <fa.OPVERUiJ763jH2/QynTxgBgoKYw@ifi.uio.no>
[not found] ` <fa.v3FUjJ43bw2G7KiZGaxqL3tD4xo@ifi.uio.no>
[not found] ` <fa.BrNhgY8S+TEOLMiPd27M7YHo9bI@ifi.uio.no>
2009-01-04 16:15 ` Sitsofe Wheeler
2009-01-04 17:26 ` Kyle Moffett
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=3ae3aa420901050808r100e533fo5f88edfbb5f0747a@mail.gmail.com \
--to=linasvepstas@gmail.com \
--cc=burdell@iruntheinter.net \
--cc=david@lang.hm \
--cc=davidn@davidnewall.com \
--cc=goodgerster@gmail.com \
--cc=hancockr@shaw.ca \
--cc=jeff@kosowsky.org \
--cc=kyle@moffetthome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@nick-andrew.net \
--cc=pretzalz@techhouse.org \
--cc=slashdot@jameshallam.info \
/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
Powered by JetHome