Re: [Ntp] Antw: [EXT] Re: Negative leap‑second?

Warner Losh <imp@bsdimp.com> Wed, 03 August 2022 15:03 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 E5CDFC15A73B for <ntp@ietfa.amsl.com>; Wed, 3 Aug 2022 08:03:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.904
X-Spam-Level:
X-Spam-Status: No, score=-1.904 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, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4aNz-3ysMQQV for <ntp@ietfa.amsl.com>; Wed, 3 Aug 2022 08:03:17 -0700 (PDT)
Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0F7F2C15A73D for <ntp@ietf.org>; Wed, 3 Aug 2022 08:03:16 -0700 (PDT)
Received: by mail-vs1-xe35.google.com with SMTP id 66so18139197vse.4 for <ntp@ietf.org>; Wed, 03 Aug 2022 08:03:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=8bbvqeDdia137RZjdzSDqhkoNuKEqotX0n4c9Uiwgl4=; b=t/xuim3LBVtQjhdegheh8wRXZo6xqcELPGeVo3hgzujyxrRvB+VK70Att4f5I6VBKF BFDbMWNmvrBMZecs3rjulZ6/na7NaH8Twd0OpWiRpJUj+KXxts6WP+yrwrN+1YlaJV6h WqpnNNOXxvizovhpDdRKH7iRUMUuNJNFSVk/r/DmHd9dECRiCJG8uMz5XStXYmYDPIxZ LzxtVyp9/LhF/89DYfKacRL27K0MpUfPpPy6v8nRnwdWAVPEAGbRKOxeWdEdzkQbdqgR nqD2mpRKpUt9Tst5R6RaFVr491DWzeMQvjWJa6gDah+gNufscMs7aaJnFO30gu0v3kGc sGLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=8bbvqeDdia137RZjdzSDqhkoNuKEqotX0n4c9Uiwgl4=; b=X6h5oEACiJ1kZR756ClOf/XnLNcH68KypY8E/QieW48ePq0sx7rJkYIuP7f14m5oui HibCFltlQ6ZJTSTsiVchvXj9bLD+ugxabNAiL2a9FJGMNW2WuJ8hgw5/IByT5HMo291Z ug01/A2qwzwyjSDAo/Y7qL2h6buHtGDxfq3GxEiBzfd+CPZUter+o4qKe3La5d4qtQDy TxWNv7Fqx7C7OvRomhp2kbIwvVP9B76vb3gqd5DbFFa5CIXn0ZOoiW7hKJAQLKUMdHIW UQmmWYYtEBLPP7HPAqaAukkPHeak43H3TNxldbZkhcPuyy/xa+kdAOkGoi6t2Oz1ak6P LzuQ==
X-Gm-Message-State: ACgBeo2vbW+Z0+n8h4apJ7dEfdhdzVCsz//gZaKFx50HuvaotG0lV+kr DuyP9i4NQh1Oa9UoOINR9Uefjy8n5wsoXvjXahahkQ==
X-Google-Smtp-Source: AA6agR5afSGdyc853QwG2Wcsgrf8bS4FxWeRtsev8cPHyjfkLVYfclkti63gVtPeeKnk1gm9my09avzkB7pqTGLBhMo=
X-Received: by 2002:a67:ca88:0:b0:356:51a5:993e with SMTP id a8-20020a67ca88000000b0035651a5993emr4483914vsl.12.1659538995353; Wed, 03 Aug 2022 08:03:15 -0700 (PDT)
MIME-Version: 1.0
References: <b023985d-76c3-c6b9-3b5b-f10b3cabd2f5@pdmconsulting.net> <CAJm83bAZgW=xgkO8BAW8HFTsSkGfdQKjkdQnfkyNWRAHdVTB3w@mail.gmail.com> <62EA177E020000A10004C0F3@gwsmtp.uni-regensburg.de>
In-Reply-To: <62EA177E020000A10004C0F3@gwsmtp.uni-regensburg.de>
From: Warner Losh <imp@bsdimp.com>
Date: Wed, 03 Aug 2022 09:03:03 -0600
Message-ID: <CANCZdfrsUmO_TemocAqO48tmGM7=bdj56_-1Zrc=gboPJPc=Eg@mail.gmail.com>
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
Cc: Daniel Franke <dfoxfranke@gmail.com>, Danny Mayer <mayer@pdmconsulting.net>, "ntp@ietf.org" <ntp@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000004f2ef005e55788b9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/PoX06PkuajNMCOKrM4_yDpZozAA>
Subject: Re: [Ntp] Antw: [EXT] Re: Negative leap‑second?
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 03 Aug 2022 15:03:21 -0000

On Wed, Aug 3, 2022 at 12:37 AM Ulrich Windl <
Ulrich.Windl@rz.uni-regensburg.de> wrote:

> >>> Daniel Franke <dfoxfranke@gmail.com> schrieb am 03.08.2022 um 01:19 in
> Nachricht
> <CAJm83bAZgW=xgkO8BAW8HFTsSkGfdQKjkdQnfkyNWRAHdVTB3w@mail.gmail.com>:
> > I think predictions of a negative leap second are very premature, but I
> > have fewer worries about a negative one than about a positive one. I've
> > reviewed quite a lot of leap second handling code and never encountered
> any
> > that gets the positive case right but the negative case wrong;
> programmers
> > clued into the issue at all and generally clued in enough to know that
> > negative ones are a possibility. What makes me *less* worried about
> > negative leap seconds (rather than just not-much-more worried) is their
> > effect on leap-second-naive code: they make POSIX time jump forward
> rather
> > than backward. Lots of code out there wrongly assumes that POSIX time can
> > never jump backward. Code that assumes it can never jump forward would
> get
>
> Well, there are probably also assumptions that CLOCK_MONOTONIC never jumps
> back (it could when the device is restarted).
> It depends how the timestamps are used.
>

Yea, CLOCK_MONOTONIC is a made up thing that is perfect for your running
program, and nothing else. It
won't be the same across reboots, it won't be the same on other machines
and the standard says that it doesn't
even have to be the same for all observers on the same system. Applications
cope with this today, and a leap
second (of either flavor) wouldn't affect it at all... Some systems will
even pause this clock during suspend
time.

The problem is with applications that use CLOCK_REALTIME and take evasive
actions of some sort
when they, for example, detect that a heartbeat is missing...


> > broken every time someone every time someone suspends their laptop or
> > pauses their VM or just puts their OS scheduler under a lot of load.
>
> BTW: Recently I migrated some Linux machines to VMware where the
> assumption is that the RTC runs on local time (while a standard Linux
> installation assumes it runs on UTC).
> On boot the time was two hours (CEST in effect) ahead and was corrected in
> a rather brute way (jumping back):
> An hour later a "journalctl -S <10 minutes before)" still had an
> interesting output...


Nice.

Warner


> > On Tue, Aug 2, 2022, 19:06 Danny Mayer <mayer@pdmconsulting.net> wrote:
> >
> >> Apparently the earth's rotation is speeding up:
> >> https://www.timeanddate.com/news/astronomy/shortest-day-2022
> >>
> >> If we have to subtract a leap-second I think we will see failures, since
> >> this is rarely if ever tested.
> >>
> >> Danny
> >>
> >> _______________________________________________
> >> ntp mailing list
> >> ntp@ietf.org
> >> https://www.ietf.org/mailman/listinfo/ntp
> >>
>
>
>
>
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp
>