(serious) bug with wrong system clock #2007

Closed
Diapolo opened this Issue Nov 13, 2012 · 7 comments

Projects

None yet

3 participants

@Diapolo
Diapolo commented Nov 13, 2012

I set my computers date to 2012-07-13 and tried to start the client (current master) and during startup it simply crashes. This is from the debug.log:

07/13/12 13:56:32 ERROR: CheckBlock() : block timestamp too far in the future
07/13/12 13:56:32 LoadBlockIndex() : *** found bad block at 34105, hash=0000000037c57b5ff0ebedd38469b9797c89e8640cbcd52dc967d3805e487b51
07/13/12 13:56:32 ERROR: LoadBlockIndex(): chain database corrupted

There should be a check and warning like the one in util.cpp - AddTimeData(), but this needs to be done from some core dev.

@Diapolo
Diapolo commented Nov 14, 2012

Did any other dev try this? Or am I the only one that can re-create that crash situation?

@Diapolo
Diapolo commented Nov 20, 2012

@sipa Did you check this out? Does it happen also on Linux or with bitcoind?

@Azulan
Azulan commented Nov 26, 2012

Would it be possible to make an NTP request to a one of a list of well known time servers to check for this kind of problem?

@laanwj
Member
laanwj commented Nov 26, 2012

This problem would be solved with a friendlier error message. Bailing out
as early as possible is all we can do when the user's clock is detected to
be wrong by this much.

(p2p nodes already send their time so ntp is not needed, and relying on
well known servers would be a big nono for a distributed protocol)

@Diapolo
Diapolo commented Nov 26, 2012

@laanwj I would prefer an error message before the client simply crashes, before we talk about how friedly that message should be :-D. Does a wrong time cause a crash on Linux, too with current master?

@Azulan
Azulan commented Nov 27, 2012

I would suggest it as a client feature, not a part of the protocol.

But you are right, the protocol does seem to provide for time services already. I apologize for the superfluous suggestion.

@Diapolo
Diapolo commented Jan 26, 2013

@sipa Any comment for this one?

@laanwj laanwj closed this in #6489 Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment