Date and time warning causes UI deadlock when reindexing unless wallet is disabled #7928

issue GreenReaper opened this issue on April 23, 2016
  1. GreenReaper commented at 8:05 AM on April 23, 2016: none

    I'm using win32 x86 0.12.1 on Vista 32-bit. Over the last few days I've been experiencing several crashes reported as being due to not being able to read from the disk, so I decided to try reindexing.

    I tried to run the following command several times:

    C:\Program Files\Microsoft SDKs\Windows\v7.0>C:\Windows\System32\cmd.exe /c start "Bitcoin Core" /LOW /MIN "C:\Program Files\Utilities\Bitcoin\bitcoin-qt.exe" -reindex

    I repeatedly encountered the following error message in a message box: "Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly." I tried to click OK but the box wouldn't go away, and the window greyed out. There appeared to be no CPU or disk usage. I terminated the program.

    The following command did produce the same messagebox, but proceeded slightly further before popping it up - and more importantly, it actually went away when I clicked OK.

    C:\Windows\System32\cmd.exe /c start "Bitcoin Core" /LOW /MIN "C:\Program Files\Utilities\Bitcoin\bitcoin-qt.exe" -alert -reindex -disablewallet

  2. MarcoFalke added the label GUI on Apr 23, 2016
  3. jonasschnelli commented at 5:09 PM on April 23, 2016: contributor
    1. Getting the maxtimeadjustment "exceeded" warning "Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly." means you probably run with a incorrect system clock. You should fix that.

    2. You can change the maximum allowed time adjustment by setting maxtimeadjustment=<value>.

    bitcoin-qt.exe" -alert -reindex -disablewallet

    What is the -alert arg for? IIRC that is not supported by Bitcoin-Core. I don't think -disablewallet will have a significant impact on the maxtimeadjustment behavior.

    The AddTimeData() is related to version messages. Maybe in your seconds -disablewallet tests you did connect to more nodes and got more samples?

    Is this always reproducible?

  4. GreenReaper commented at 5:43 PM on April 23, 2016: none
    1. The first thing I did was synchronize my clock while attempting to diagnose the issue, but it did not appear to stopping the messages appearing - nor was the time noticeably "off" to start with. I had also never seen this prior to attempting to reindex. Unfortunately I did not think to keep the debug log from those runs, as I was more keen in figuring out if I could get it to start reindexing at all.

    2. I'll see whether that changes anything if there is a recurrence.

    3. You're right, it should be -alerts, thanks! I added it on seeing they had been disabled by default in the release notes, because I am keen to hear whatever the Japanese government has to say to users.

    4. The issue was 100% reproducible the four or five times I did it, until I added the -disablewallet parameter. Upon doing so, the time warning still popped up - the difference was that now when I clicked OK to dismiss it, the UI did not lock up and CPU and disk activity proceeded.

    The popup always occurred within a few seconds, though the "time behind" at the point of the popup varied slightly - possibly related to how many initial blocks were already in disk cache as it processed them, or how long it took to establish connections.

    Perhaps one way to reproduce the UI freeze would be to force that dialog to always pop up, although it might not be that simple if it had to process some transactions first. I'm nine hours into reindexing my node and it's only 1/3 through, so I must admit I'm not super-keen to try it again unless it falls over. :-)

    In case it matters, I do have some bitcoin in my wallet; the transactions for it would not be visible since I had dumped the index.

  5. MarcoFalke added the label Windows on Aug 21, 2016
  6. MarcoFalke commented at 8:40 PM on August 21, 2016: member

    I was unable to reproduce on linux, tagging with "Windows"

  7. MarcoFalke closed this on Jul 16, 2018

  8. cryptozeny referenced this in commit e45c00c86b on Feb 18, 2019
  9. cryptozeny referenced this in commit 1cf733c706 on Feb 18, 2019
  10. cryptozeny referenced this in commit a86b911aa1 on Feb 18, 2019
  11. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me