linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jakub Drnec" <jaydee@email.cz>
To: "linuxppc-dev" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: PROBLEM: monotonic clock going backwards on ppc64
Date: Fri, 01 Mar 2019 14:33:33 +0100 (CET)	[thread overview]
Message-ID: <21Z.Zf5M.7zwRiKSx98z.1SUJIj@seznam.cz> (raw)
In-Reply-To: CA+7wUswyzc5SGjjb+WS4QpopyL0qoGYj0WF1jNaTfsC5ZsMpdw@mail.gmail.com

Hi,

>> Decreasing the realtime clock across the y2k38 threshold is one reliable way to reproduce.
>> Allegedly this can also happen just by running ntpd, I have not managed to reproduce that other
>> than booting with rtc at >2038 and then running ntp.

> Isn't it the expected behavior. Here is what I see for powermac:
>...    gives us a time in the documented 1904..2040 year range. I decided not

This (or some related issue involving monotonic time going wonky) surfaced on a system running 4.5 kernel with sane clock values running ntpd. It may not be limited to setting the clock beyond 2038, that is just a convenient way to reproduce something visibly wrong.

If the "ntpd-related monotonic" issue is separate from what I reported, I did not find anything in the commit history that looks likely to have fixed that, so I think that is still a thing.

Another way of looking at the issue is that when you set the clock beyond 2038 (or the mystery ntpd thing happens), vdso and syscall versions of clock_gettime start reporting wildly different values for CLOCK_MONOTONIC. If someone manages to somehow interlace calls to those two assuming they are consistent, crazy bugs will ensue...

Regards,
Jakub

  parent reply	other threads:[~2019-03-01 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 16:13 PROBLEM: monotonic clock going backwards on ppc64 Jakub Drnec
2019-02-28  6:48 ` Daniel Axtens
2019-02-28  7:04 ` Mathieu Malaterre
2019-02-28 11:17   ` Daniel Axtens
2019-03-01 13:33   ` Jakub Drnec [this message]
2019-03-01 13:24 ` Michael Ellerman
2019-03-01 23:59   ` Thomas Gleixner

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=21Z.Zf5M.7zwRiKSx98z.1SUJIj@seznam.cz \
    --to=jaydee@email.cz \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).