The upcoming Y2038 catastrophe

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Monotonicity

Post by syzygy »

sje wrote:Monotonicity is not a guarantee of anything other than monotonicity. If scratch a tally mark on the bathroom wallpaper every time I take a leak, that's monotonic but it's not a reliable time keeper.
An engine will not break if time is slowed down a bit.
An engine might very well break if time goes backward.
This is why the advice was to use a monotonic timing source.
http://talkchess.com/forum/viewtopic.ph ... 684#589684
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: If you can read this...

Post by syzygy »

bob wrote:Unless there is a hardware failure, or human intervention, time NEVER advances too fast on a computer. It ALWAYS slips backward due to missed RTC interrupts. But by "slipping backward" it does NOT "jump backward" it simply does not advance as quickly as it should.
http://www.ehow.com/how_7379772_fix-pc- ... -fast.html
http://social.technet.microsoft.com/For ... progeneral
http://www.tomshardware.co.uk/forum/279 ... -runs-fast

Just the top 3 hits.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: If you can read this...

Post by bob »

syzygy wrote:
bob wrote:Unless there is a hardware failure, or human intervention, time NEVER advances too fast on a computer. It ALWAYS slips backward due to missed RTC interrupts. But by "slipping backward" it does NOT "jump backward" it simply does not advance as quickly as it should.
http://www.ehow.com/how_7379772_fix-pc- ... -fast.html
http://social.technet.microsoft.com/For ... progeneral
http://www.tomshardware.co.uk/forum/279 ... -runs-fast

Just the top 3 hits.
You should read 'em. Operating system bug. Sort of hard to have ANY useful time when the system is broken. We've been primarily talking about unix anyway, but if something is broken, who expects it to work?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Often, the best thing to do is to do nothing

Post by sje »

bob wrote:The original statement I made was that it is dangerous to have a root user that can adjust the clock, as there is nothing you can do to prevent him from jumping it forward, jumping it backward, etc.
Although all Internet connected machines should use ntpd, some don't. For those hosts, there is the program ntpdate, runnable only by root when used to set the time (like date).

Interestingly, ntpdate refuses to run if it sees that ntpd is already doing the job. This is in part because they both use the same socket, but also because unnecessary manual intervention involving time setting needs to be discouraged.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Probabilities

Post by sje »

syzygy wrote:An engine might very well break if time goes backward.
My program will also break if God tosses a meteor at my house as a punishment for me wasting too much time on trivial issues. I suggest that these two events have roughly equal probability.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: If you can read this...

Post by sje »

bob wrote:Unless there is a hardware failure, or human intervention, time NEVER advances too fast on a computer. It ALWAYS slips backward due to missed RTC interrupts.
And missed RTC interrupts rarely, if ever, occur with modern machinery. From what I've seen, clock interrupts are always given a very high priority, or the highest priority and are far more likely to cause other interrupts to be missed than to be missed themselves.

The exceptions were interrupts for power supply failure and for CPU-on-fire. These could be problems for a chess program, too.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: If you can read this...

Post by syzygy »

bob wrote:
syzygy wrote:
bob wrote:Unless there is a hardware failure, or human intervention, time NEVER advances too fast on a computer. It ALWAYS slips backward due to missed RTC interrupts. But by "slipping backward" it does NOT "jump backward" it simply does not advance as quickly as it should.
http://www.ehow.com/how_7379772_fix-pc- ... -fast.html
http://social.technet.microsoft.com/For ... progeneral
http://www.tomshardware.co.uk/forum/279 ... -runs-fast

Just the top 3 hits.
You should read 'em. Operating system bug. Sort of hard to have ANY useful time when the system is broken. We've been primarily talking about unix anyway, but if something is broken, who expects it to work?
I had a quick look and found no indication of a Windows bug. Please show me what you saw then... yawn.

Anyway:
http://askubuntu.com/questions/3689/clo ... g-too-fast
http://www.linuxquestions.org/questions ... st-285791/
http://www.linuxquestions.org/questions ... -a-514702/
http://www.linuxquestions.org/questions ... -a-132078/
http://superuser.com/questions/235178/w ... k-on-linux

Whatever the precise reason in each case, it is simply "false" that a PC clock could not run too fast, to put it in nice words.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: If you can read this...

Post by bob »

second link you posted:
Question
Sign in to vote
0
Sign in to vote
Hi Mleiper,

Mostly, this issue is caused by Windows Time service corrupt. You can try to take following steps to troubleshoot this issue.

Run the following command in a elevate privileges cmd window.
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
Then, please restart the computer to test the issue again.
That was from the 2nd thread you posted the first time.

Did you actually read the stuff you posted? A bad crystal oscillator. Bad this. Bad that.

I believe I said that time works perfectly with no human interference and with no broken hardware. Toss in either of those and all bets are off.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: If you can read this...

Post by bob »

sje wrote:
bob wrote:Unless there is a hardware failure, or human intervention, time NEVER advances too fast on a computer. It ALWAYS slips backward due to missed RTC interrupts.
And missed RTC interrupts rarely, if ever, occur with modern machinery. From what I've seen, clock interrupts are always given a very high priority, or the highest priority and are far more likely to cause other interrupts to be missed than to be missed themselves.

The exceptions were interrupts for power supply failure and for CPU-on-fire. These could be problems for a chess program, too.
The problem is, when interrupts are disabled, and two RTC interrupts occur, you will only see one when you re-enable. In any case, ntpd handles that just fine.
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: Probabilities

Post by syzygy »

sje wrote:
syzygy wrote:An engine might very well break if time goes backward.
My program will also break if God tosses a meteor at my house as a punishment for me wasting too much time on trivial issues. I suggest that these two events have roughly equal probability.
Do you know what we are talking about?