Re: [Ntp] Leap second draft

Warner Losh <imp@bsdimp.com> Sat, 30 March 2019 17:46 UTC

Return-Path: <wlosh@bsdimp.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 552CE120230 for <ntp@ietfa.amsl.com>; Sat, 30 Mar 2019 10:46:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=bsdimp-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qav4yyNFzNBB for <ntp@ietfa.amsl.com>; Sat, 30 Mar 2019 10:46:01 -0700 (PDT)
Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 22966120158 for <ntp@ietf.org>; Sat, 30 Mar 2019 10:46:01 -0700 (PDT)
Received: by mail-qt1-x82a.google.com with SMTP id z17so6013888qts.13 for <ntp@ietf.org>; Sat, 30 Mar 2019 10:46:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+12hybR40go2LcIQVi+kaLIwOmk79RuAFu2zDCRVZSs=; b=q2qKCaF940mBDJ+gZbBj3e0sp34m8PHaM0fk4pUyjJZ6w0uFzR60Xvrpjs5ExhMnIY 5kZMkUNFXciua9inUPo1isWgTlgTBZGynHQu85ZpvjmJocKOqe++kI6JLjsGejT1L8q0 6e0UNxMJnx3ybkyifxGYp4ubZYK147qSRkuMMTqilnoFKj51wRp80IOzbAdPxV8RRsT4 Mq7CO5pY6ZJrhwF0nr2+8S8GYrmgpmz6TZr77iYj0JNrg6dMGDBRN55LZzBlP7Bz/IlR 9xrtWf7ZgRSDmtHJKV+fhtVBvQuCdfzuBWBfucdcQQMfZUyM1jWzhd7vsUT5dDDmI+XV C2YA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+12hybR40go2LcIQVi+kaLIwOmk79RuAFu2zDCRVZSs=; b=b/zpr1jMREKI4T9dMJQDfW33QIICFEnWSNDIOYYZxrvC5i6d9Cawu6LhKUCugQtJLj JF8adCU+F/cZEde+FK/NQOJBzsyWh5Me10VYO9w5DfJxO98QLywqwijfkfekTP3KoSfM W9PLW9IWWGikaIBJITmbCf4kebSXe64Z+smdoMjnOu/YbDrvrtfTktQ9CRx3R+7juhZ8 Le58RZXG3EW5rzCIRfA5X0syR9DHcTc6oowMUw3n9FVszHXbfmvsGw/8oDVf8BNPkpTz 2sfbsFZkLJoU8wruTX9a3mwsF5epWQp5pBjw74a6wpIpj1z3EM013syxdBmqaWQuWLb+ uTZQ==
X-Gm-Message-State: APjAAAU7PR+/sSRUEfCZrlz4b60SEcqII0in2h+07lPVDcpBZN6rnede DY2qZ1diP80UZM30JlkwfU4g7wHLtSGWG0Uvuprfrg==
X-Google-Smtp-Source: APXvYqzGIb3Bs37HfpjNYmlzxUUfg4/a0gO/j2P7qn9yWYhqP54iEeeT7i3IUNa2Y4MRLKECWwuZch9pC9wjUIkMGKw=
X-Received: by 2002:ac8:1aec:: with SMTP id h41mr44731479qtk.345.1553967959972; Sat, 30 Mar 2019 10:45:59 -0700 (PDT)
MIME-Version: 1.0
References: <CAJm83bD5Ozkpg5TpkogOW6xeeNQL3ZziLO9URM7haqN8Wrp=Wg@mail.gmail.com> <CAJm83bCbVzO3NNCbjTy+O_16T7DBeA7O6018WWGu_-GyuN-8UA@mail.gmail.com> <20190330045928.GA31550@ucolick.org> <20190330133348.GA20646@ucolick.org> <20190330152948.GI7706@roeckx.be> <CAJm83bB6BF4_Ked5rVRdGmgYECz5gDrb+_7JeOUe1Lmq2ysVQQ@mail.gmail.com>
In-Reply-To: <CAJm83bB6BF4_Ked5rVRdGmgYECz5gDrb+_7JeOUe1Lmq2ysVQQ@mail.gmail.com>
From: Warner Losh <imp@bsdimp.com>
Date: Sat, 30 Mar 2019 11:45:48 -0600
Message-ID: <CANCZdfrbJhVsVJrsw5QRxDWmpHLJdsMMXi=Z=XvJDi1bGvnk=w@mail.gmail.com>
To: Daniel Franke <dfoxfranke@gmail.com>
Cc: Kurt Roeckx <kurt@roeckx.be>, Steve Allen <sla@ucolick.org>, NTP WG <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000003f37b20585535c74"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/__sQ3R_Fsk1nuSClE_SyFItGzhs>
Subject: Re: [Ntp] Leap second draft
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Mar 2019 17:46:05 -0000

On Sat, Mar 30, 2019 at 11:06 AM Daniel Franke <dfoxfranke@gmail.com> wrote:

> On Sat, Mar 30, 2019 at 11:29 AM Kurt Roeckx <kurt@roeckx.be> wrote:
> > I think this is all not very relevant for NTP where we care about
> > the current time, not about what happened in 1972. I'm not sure
> > we need all that historic information in the draft.
>
> My earlier, off-list reply to Steve was:
>
> > I'll do my best to revise the background on historical UTC and TAI so
> > that it is fully accurate while not overwhelming the reader with
> > information that isn't necessary for understanding the rest of the
> > draft. Patches welcome if they meet those desiderata.
>
> I've put the XML source for my draft into a git repo at
> https://github.com/dfoxfranke/ntp-leap-seconds. The latest HEAD has
> revised text which I think should be satisfactory.
>

https://www.itu.int/rec/r-rec-tf.460/en says the latest version is TF.460-6
published in 2002. There's a TF.460.5 published in 1997, but nothing
published in 1996. You should reference this.

I'm not sure that the definition of SI second adds anything to the
explanation of TAI time.

I'm not sure that saying TAI time is a physical manifestation of TT time is
useful, and later references to it.

I'd omit that these clocks are authoritative. TAI is a paper time scale
that's based on the input of these clocks, but no one clock in it is
authoritative and there's no real-time realization of TAI anywhere, just
national standard's lab's UTC. If you are going for simplicity, these
details can be omitted because they won't affect the implementation, nor
the necessary bits of timekeeping needed to understand the rest of the
document.

TAI did not measure solar seconds prior to 1972. You should not mention
that, as it is misleading. I'd opt instead for the more bland "The NTP
timescales assume nothing about TAI and UTC prior to 1972." instead. There
will be no NTP time exchanges for those times, so keeping it simple and
reducing the fiction here would be good.

A reference to the POSIX standard would be likely be helpful.
http://pubs.opengroup.org/onlinepubs/9699919799/ has the definition, and
the reference on all the pages is "The Open Group Base Specifications Issue
7, 2018 edition IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)"

POSIX does not assign a value to the leap second. To say it embraces the
ambiguity by giving it any specific value goes farther than POSIX actually
goes. Since it doesn't exist in the POSIX world view, you cannot say the
standard assigns a value to it. You can read the section on time conversion
to maybe imply this, but it's not explicit as leap seconds simply do not
exist in the POSIX time scale (the reading is by setting seconds to 60
which is the second after 59 which does translate to the first second of
the next day, but the POSIX standard makes no statement on the value of
leap seconds in a time_t because leap seconds don't exist in that time
scale: this is the crux of all the heartburn we have today with them).
POSIX totally punted on leap seconds, alas.

POSIX does not specify that time_t is 32-bit. It merely specifies it must
be an integer type (which is a narrowing of the allowed types from ISO C's
numeric type). There are many implementations that have 64-bit time_t. So
strictly speaking, it's not a POSIX 2036 problem, but rather a historic
representation of time_t problem. There are many system that are POSIX
compliant that don't have the 32-bit issues.

ELI likely should be specified relative to the receive timestamp. It would
be good to specify what happens in the next second after the leap second.
Some historic implementations kept these values on for some number of hours
after the transition because their upstream sources kept them on due to
bugs or ignorance. In the past, I've had to filter this data on the first
day of the month to prevent inferring a leap second that's not really
there, for example. This has been a decade ago, but the ambiguity stuck
with me. Adding that it SHALL be cleared after the leap second will
suffice, though it could be set to '11' as well (though given at least 3
months between leaps, clearing will give the right answer for the month).
It may be important to note as well if the ELI in this extension tracks the
LEAP INDICATOR or not, since '00' means we don't know the if there's a leap
at the end of the month, and the leap indicator is a SHOULD be cleared all
days but the last day of the month.

Sorry for the maybe nitpicky stuff here. Too many years of being on the
leap seconds mailing list...

Warner