Live data from Hacker News

Windows feature that resets system clocks based on random data is wreaking havoc

arstechnica.com

21–30 of 169 posts

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#21
post #12

Windows Time bullshit was one of the most annoying things I dealt with during my years as an IT guy. Registering and unregistering w32time, trying different NTP servers. Trying to figure out why domain systems werent getting their time from the DC. It always felt so... stupid. Surely having the correct time on a device isnt that complicated. Turns out, its not, unless you're on Windows. Somewhat ironic that these day…

It's probably still the case that Windows will consider the firmware clock more reliable than anything but a stratum 1 (direct gps/glonas/atomic) or maybe 2 time source which can result in truly bizarre behavior if the firmwar/hypervisor drifts too far from dozens of stratum 2 or 3 active directory servers. It logs no messages about this logic fork.

I don't recall the exact conditions that determine this but troubleshooting it is an exercise in thinking you're having a stroke.

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#22
post #16

Earlier quoted context omitted.

This is what puzzles me - while time drift does occur, it tends to be in the form of minor errors which build up over time; large jumps are relatively rare. You'd think the mechanism described in the article would have a failsafe ensuring that only minor time recalibrations are performed.

It kind of depends. There's a lot of poor clocks at boot up time, but a continuously running host usually doesn't get too off, too quickly; I've seen some things, but even at 10% fast/slow, you don't have to jump days unless you're checking infrequently. On the other hand, with virtualization, who knows how long it's really been between clock ticks. Let's say someone suspends a VM for a couple months and then unsuspe…

Every VM software I've ever used automatically syncs the guest OS's clock to the host OS's clock. I've never used VMs in a server context, but do servers not do this too? It seems like the logical solution here.

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#24

I sometimes experience a similar issue with my linux laptop where time jumps to the year 2077 when waking up from sleep. My guess is that it is a hardware glitch as it doesn't happen often, but when it does it is quite impactful. One of the annoying consequences is that some parts of the system decide to clean up "old" data. Surely data that has been stale for 50 years can be deleted, right? I cannot imagine the impa…

Coincidence?

    $ TZ=UTC date --date=@$[$(date +%s)*2]
    Wed 31 Mar 15:33:50 UTC 2077

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#25
post #17

While this Windows feature does sound quite bonkers as described, it is also baffling to me that the timekeeping on computers is such a mess; would it really be that difficult to have my multithousand dollar computer keep time at least as well as a dollar-store quartz watch? Have time already set in factory, and be correct to within few hours at least; enough to do networking and more accurate time syncing safely.

The problem of computer timekeeping lives on the margins. Your computer is probably more accurate than the quartz watch, but there's all sorts of ways that timekeeping can fail even on a system that's accurately counting time when on. Many of these have to do with early boot or unattended scenarios where trustworthy sources of time data are scarce or difficult to reach. e.g. maybe the motherboard clock chip is five months off because of a firmware bug or something, and this is a server so there's no user to notice the incorrect time and not having it set itself would cause catastrophic application failures somewhere else. Computer timekeeping is a comedy of errors.

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#27
That feature is simply insane. How did MS think this was a good idea?

To address the issue they were trying to address (what happens when a mission critical server's RTC malfunctions or the battery dies?), Windows should treat it no differently than any other hardware malfunction in a mission-critical server: raise an alarm so a system operator can take a look and address the issue.

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#28

I can't imagine the sequence of horrible decisions that led to doing this. Like, why would the time service ever want to depend on all this insanity when if it has a network and everything else is bizarro world, just like scrape the time and date text from weather.gov. Or just accept that absent NTP, w32time maybe just shouldn't try to set the clock to whatever a circus clown tells it? This sort of reminds me how the…

It's already discussed in the article -- because to determine that weather.gov connection is sound and not hacked, you first need to check its certificate expiration date. Chicken/Egg problem.

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#29
post #2

The article doesn’t talk about a fix—scary. I know OpenBSD uses a similar SSL-based method for time keeping on startup, but I’ve never experienced an issue like this.

Openbsd does an https (with expiry checks disabled) GET to google.com (or another server) and uses the Date header in the response.

If it's assuming that it can make an internet connection, why does it do that rather than NTP?

Re: Windows feature that resets system clocks based on random data is wreaking havoc

#30
post #2

The article doesn’t talk about a fix—scary. I know OpenBSD uses a similar SSL-based method for time keeping on startup, but I’ve never experienced an issue like this.

It's easy to turn off the feature, and its described in their original blog post. The article doesn't mention it directly though.
Post reply on HN