Re: [Ntp] Antw: [EXT] Re: New Version Notification for draft‑gruessing‑ntp‑ntpv5‑requirements‑03.txt

Warner Losh <imp@bsdimp.com> Mon, 18 October 2021 14:54 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 19D793A005F for <ntp@ietfa.amsl.com>; Mon, 18 Oct 2021 07:54:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=bsdimp-com.20210112.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 ScAN98gLDpaS for <ntp@ietfa.amsl.com>; Mon, 18 Oct 2021 07:54:20 -0700 (PDT)
Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) (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 264783A0062 for <ntp@ietf.org>; Mon, 18 Oct 2021 07:54:20 -0700 (PDT)
Received: by mail-ua1-x92b.google.com with SMTP id a17so2697764uax.12 for <ntp@ietf.org>; Mon, 18 Oct 2021 07:54:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EpYLiO57+V0pJxezJykfMTpLxYQok62EcYto0iwj4Ik=; b=zQpelmyGkuxWC5tBVCOCL6bqV4eUKL49aft43jZTXiRdHSJvOhdxenHkuhueuPeOa2 R8q8189Osapzm+M+cP+7bz5taxHZ/AhebNmvxP2A4BRKdsLk0mOZW2FoxGnnXA3R4a8z 5Nsz02npF8ekdQTL4+kwwnWgj2OrI6kQv+7CIBM1SFuHTkN2k5K1QC/qavKm2Wet/4xr M8bM9wmkmqW44lXESVRHpM/M2fjSGK6f9GErojbBGCMSN2XyHiRTAJ6VCoUrJ272N6iJ prgAcIKekJtjokFnJRj2+WkZOQnaMxM//BPrUquBuiStqpBNf//GCGpXhkiKOwXSXQSo amaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EpYLiO57+V0pJxezJykfMTpLxYQok62EcYto0iwj4Ik=; b=HIiHq6d5zo2nPrfljQpAd0PtqaFiCBDVqB+djyYeNrENYuvSXu7rZVMdGRrwpavVM3 WWg2d47XXdHZZ2vFr0GR+GnARrGQtuZv+r6Q2eEctQTx2KLFMdWEnsHshQ3PlMSoz0xm wX+Xd417s8UWEY5jinyRDvgNyKgW9kffcyl65ILOR8f9Q8wx4ScgMkg6WZ4rDn9SR4m4 n1LL4ccmgW4J/i3bkpl2OyCKD1W0YZG+sZktOzSDAqIHGCpFxgm7vCsL2JBc17QMY1KK s2L4ATzWfg/VMzKcLoCS2srHqAP/YUv1n35p6kLCJTvKT05B6sN8sZPWvTuF+UzCi21H xdkQ==
X-Gm-Message-State: AOAM531qC/wfVQuOQaitIOYrJMABHS9q04iouk8Ss7tqLtAmS41TbhQp jmqy/J/rDUT1SXoVUzacLkgIVm4cw6bQ3vOTkQLdtgkbuVg=
X-Google-Smtp-Source: ABdhPJz/x/lXlhBYD1fNpGkNevGNs3riK12JXya/pXp4ubsnE4cki/2tcvQB6SLZl/Syc7muME1+AXKrowfpDQ9dhgY=
X-Received: by 2002:ab0:45c4:: with SMTP id u62mr25575723uau.69.1634568856244; Mon, 18 Oct 2021 07:54:16 -0700 (PDT)
MIME-Version: 1.0
References: <163386015957.12424.6997038478834885480@ietfa.amsl.com> <CAO+dDx=6baLhf9LwSMvR1F0ieuLO6NXmExYLDvcCF2tgchHs8w@mail.gmail.com> <DB8PR02MB5772AC97BFE2D7C1139EFDC0CFB89@DB8PR02MB5772.eurprd02.prod.outlook.com> <E469D9A7-7445-49D9-A8A2-82BA7BF1FA27@gmail.com> <DB8PR02MB57726795E3AD479F0CCFA778CFB99@DB8PR02MB5772.eurprd02.prod.outlook.com> <616D0ADA020000A10004486B@gwsmtp.uni-regensburg.de> <08e60c82-5b4c-5f0f-55e4-206b0d8f18c4@pdmconsulting.net>
In-Reply-To: <08e60c82-5b4c-5f0f-55e4-206b0d8f18c4@pdmconsulting.net>
From: Warner Losh <imp@bsdimp.com>
Date: Mon, 18 Oct 2021 08:54:05 -0600
Message-ID: <CANCZdfqzduC=9oxhqgNJdxUqveRp=WyO+WNXHJTJZ01EO7jTAA@mail.gmail.com>
To: Danny Mayer <mayer@pdmconsulting.net>
Cc: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>, doug.arnold=40meinberg-usa.com@dmarc.ietf.org, james.ietf@gmail.com, "ntp@ietf.org" <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000009a32b05cea1b8df"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/zUZhYL0um_TbD57UY-BWp1R0iWU>
Subject: Re: [Ntp] Antw: [EXT] Re: New Version Notification for draft‑gruessing‑ntp‑ntpv5‑requirements‑03.txt
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Time Protocol <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: Mon, 18 Oct 2021 14:54:25 -0000

On Mon, Oct 18, 2021 at 8:10 AM Danny Mayer <mayer@pdmconsulting.net> wrote:

>
> On 10/18/21 1:49 AM, Ulrich Windl wrote:
> >>>> Doug Arnold <doug.arnold=40meinberg-usa.com@dmarc.ietf.org> schrieb
> am
> > 15.10.2021 um 17:53 in Nachricht
> > <
> DB8PR02MB57726795E3AD479F0CCFA778CFB99@DB8PR02MB5772.eurprd02.prod.outlook.com
> >
> >
> >> Hello James,
> >>
> >> I agree that leap smearing is a clumsy and dangerous way to avoid the
> >> complication of correctly handling leap seconds in distributed database
> >> software.  And if it was up to me all IT equipment would use TAI for all
> >> timing except what is displayed to humans.  But it is not up to me.  The
> >> people who are making the call tell me that they believe that leap
> seconds
> > is
> >> less bad than either moving everything from UTC to TAI, or writing and
> >> debugging database software that manages leap seconds properly.
> >>
> >> So given that state of affairs.  What do we do?
> > Hi!
> >
> > I guess the standard C library needs new functions to get the correct
> time
> > first ;-)
> > time_t has a problem
>

Yes. The fundamental problem is that POSIX says there's no such thing
as leap seconds in time_t. They don't exist, they don't have a unique
encoding. And any way you represent them (there's at least 3 I know
of) is ambiguous. This is the reason why smearing is a thing.


> > Amazingly gettimeofday can use struct timezone, while clock_gettime()
> can't.
> > So adding the TAI offset to struct timezone would not help much.
>

Look at the 'right' timezones.

But clock_gettime passes in the 'clock' that you want. You can ask for
TAI time, but you still have the ambiguity.


> The TAI-UTC decision was made over two decades ago. We just have to live
> with the consequences.
>

Sadly, POSIX standardized TAI-UTC == 0. Or rather, put leapseconds
outside of the standard as something that's not worth considering since
it makes time code more complicated. Hence no unique time_t encoding for
UTC leap seconds. Or really, any encoding at all for leap seconds (which is
why I know of several ways to do it). There's language that can be taken to
mean a specific encoding, but there's contradictory language that says the
other language shouldn't be construed to dictate an encoding :(.

Oh the hundreds of hours I've wasted coping with this issue back
when I was building timing systems for a living.

Warner