v0.19.0rc1 GUI repeatedly not responding #17112

issue mmortal03 openend this issue on October 12, 2019
  1. mmortal03 commented at 8:25 am on October 12, 2019: none

    The v0.19.0rc1 Qt GUI repeatedly stops responding, i.e. getting “(not responding)” on the GUI title bar, and the GUI window whites out when clicking, then after a few seconds it will come back for a bit, then go back to not responding again. The blockchain synchronization still makes progress in spite of this happening. It seems to be happening during synchronizing, but I believe I also saw it happen at the initial loading window, and while “reading from disk”.

    I’m running Windows 10 64-bit, v1803, on an older, low-end, AMD E-350 netbook, 6 GB RAM. I’ve used this machine as a node for a long time. The blockchain data is stored externally on a USB 3.0 connected hard disk drive, using a soft link (symbolic link) to the “C:\Users\Username\AppData\Roaming\Bitcoin” directory. I doubt this particular part is the cause of the problem, as I’ve been running this configuration, unchanged, for many past versions.

    I made sure to go back to v0.18.1 to be sure it’s not caused by any sort of recent system malfunction, and it’s not, as v0.18.1 continues to run just fine.

    I downloaded from: https://bitcoin.org/bin/bitcoin-core-0.19.0/test.rc1/bitcoin-0.19.0rc1-win64-setup.exe

    Here is my bitcoin.conf: rpcport=set server=1 listen=1 daemon=1 txindex=1 rpcuser=set rpcpassword=set maxuploadtarget=36 disablewallet=1 listenonion=0

  2. mmortal03 added the label Bug on Oct 12, 2019
  3. promag commented at 8:50 am on October 12, 2019: member
    Have you tried disabling txindex?
  4. fanquake added the label Windows on Oct 12, 2019
  5. MarcoFalke commented at 12:51 pm on October 12, 2019: member

    USB 3.0 connected hard disk drive

    As a side note, this is a common cause of chainstate corruption.

    Could you check the debug.log when this happens? The cause might be slow disk access, but it might be good to confirm.

    You can find the debug.log in your data dir.

  6. mmortal03 commented at 9:44 pm on October 12, 2019: none

    Have you tried disabling txindex?

    Just tried it – didn’t help. I’ve also just tested with all configuration settings in bitcoin.conf commented out except for disablewallet=1, and it’s still doing repeated not responding when clicking through the GUI. It seems like it reproducibly starts to happen once it connects to peers. This should rule out any special settings other than disablewallet.

    As a side note, this is a common cause of chainstate corruption.

    Yeah, I know it’s not recommended. To keep it as safe as possible I make regular blockchain backups, never disconnect the drive or touch the USB cord while the machine is running, the external drive is a dual drive RAID1 enclosure, and everything is connected to a UPS. It sits in a closet on a shelf out of the way. I don’t have another machine that’s convenient to dedicate to it. I’ve been running it like this for almost three years, and haven’t run into any chainstate corruption that I’m aware of.

    The cause might be slow disk access, but it might be good to confirm.

    I just did a drive speed test, getting 72 MB/s average read, 66 MB/s average write. Keep in mind, the problem isn’t happening on 0.18.1, with the same hardware.

    Could you check the debug.log when this happens?

    I don’t see anything obvious. I’m getting warnings about ‘50 of last 100 blocks have unexpected version’, but that is happening in both 0.18.1 (where the not responding isn’t happening) and 0.19.0rc1. Take a look at it here: https://pastebin.com/4JAyBGaK

  7. MarcoFalke added this to the milestone 0.19.0 on Oct 13, 2019
  8. MarcoFalke commented at 2:27 pm on October 13, 2019: member
    Hmm, I don’t know any tools on Windows that could help debug this freeze.
  9. minblock commented at 7:48 pm on October 13, 2019: none
    Same problem with Windows prior to 18.99 I would get block index errors randomly after it is left running for a day or so. With version 18.99 that I compiled, errors in Windows went away. Here it is: https://github.com/stevacat/bitcoin/releases/tag/v0.18.99 Try this version and see if it fixes the errors. It might have been a compilation error. I have not tried v19 rc1.
  10. mmortal03 commented at 0:35 am on October 14, 2019: none

    Hmm, I don’t know any tools on Windows that could help debug this freeze.

    Yeah, I recall running into a past issue on Windows and also wasn’t able to debug it. I don’t recall how it was resolved. The following is something using wine, but I’ve never tried it: https://stackoverflow.com/questions/39938253/how-to-properly-debug-a-cross-compiled-windows-code-on-linux/39942833 @minblock might be on the right track, in terms of tracking down the last potential build that doesn’t freeze. I’m not set up to compile Bitcoin on this machine, but I can work toward that. I’ll also work toward testing it on a more powerful machine.

  11. mmortal03 commented at 10:40 am on October 14, 2019: none

    Alright, I did some testing of nightlies, working my way backwards.

    I think the last build before the bug is this: https://bitcoin.jonasschnelli.ch/build/1139

    So, the buggy behavior begins here: https://bitcoin.jonasschnelli.ch/build/1140

    That would mean that one of the following is the source of the bug? e06067387 Merge #16250: signrawtransactionwithkey: report error when missing redeemScript/witnessScript 4db2f8cf0 Merge #16153: Qt: Add antialiasing to traffic graph widget c84349a14 Merge #16314: scripts and tools: Update copyright_header.py script 2f717fb5c Merge #15427: Add support for descriptors to utxoupdatepsbt c6e42f1ca Merge #14193: validation: Add missing mempool locks 6c21a801f Merge #15538: wallet_bumpfee.py: Make sure coin selection produces change

  12. MarcoFalke commented at 12:53 pm on October 14, 2019: member
    Yeah, block activation in validation takes the mempool lock now. Is the gui polling something with that lock?
  13. promag commented at 1:17 pm on October 14, 2019: member
    Easy solution is to add an atomic int and keep it in sync with mapTx.size()?
  14. promag commented at 1:18 pm on October 14, 2019: member
    We should kill polling though.
  15. MarcoFalke commented at 1:19 pm on October 14, 2019: member
    Thanks, good find @promag
  16. MarcoFalke removed the label Windows on Oct 14, 2019
  17. promag commented at 1:24 pm on October 14, 2019: member
    On macos I also have the same “hanging”. I guess this is only noticeable on windows because it shows “not responding”.
  18. promag commented at 1:56 pm on October 14, 2019: member

    This snippet allows to identify moments where Qt event loop is busy with something else:

     0--- a/src/qt/bitcoin.cpp
     1+++ b/src/qt/bitcoin.cpp
     2@@ -40,6 +40,7 @@
     3
     4 #include <QApplication>
     5 #include <QDebug>
     6+#include <QElapsedTimer>
     7 #include <QLibraryInfo>
     8 #include <QLocale>
     9 #include <QMessageBox>
    10@@ -585,6 +586,14 @@ int GuiMain(int argc, char* argv[])
    11 #if defined(Q_OS_WIN)
    12             WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(PACKAGE_NAME), (HWND)app.getMainWinId());
    13 #endif
    14+            QTimer t;
    15+            QElapsedTimer et;
    16+            QObject::connect(&t, &QTimer::timeout, [&]{
    17+                if (et.elapsed() > 20) printf("ain't no time.. %lld ms\n", et.elapsed());
    18+                et.restart();
    19+            });
    20+            t.start(16);
    21+
    22             app.exec();
    23             app.requestShutdown();
    24             app.exec();
    
  19. promag commented at 8:51 pm on October 14, 2019: member
    Also, looks like there’s some huge hangs when switching tabs, especially “network traffic”.
  20. mmortal03 commented at 0:18 am on October 15, 2019: none

    Also, looks like there’s some huge hangs when switching tabs, especially “network traffic”.

    Yep, clicking through the menus or tabs is how I’ve reproduced it.

    I’d been wondering if there was an easy way to revert just that commit in git so I could compile it just for a quick test, but it looks like there isn’t, so I’ll wait. :)

  21. laanwj referenced this in commit e9f73b839a on Oct 26, 2019
  22. mmortal03 commented at 4:33 am on October 28, 2019: none
    Thanks, I can confirm that this fixes it in the latest nightly build. I’ll look to test it in the next RC once that’s released.
  23. mmortal03 commented at 1:24 pm on November 6, 2019: none
    I just tested RC3. Looks fixed to me.
  24. promag commented at 1:26 pm on November 6, 2019: member
    Thanks @mmortal03, the regression has been fixed, you can now close this.
  25. mmortal03 closed this on Nov 6, 2019

  26. merket commented at 12:28 pm on August 17, 2020: none

    Thanks, I can confirm that this fixes it in the latest nightly build. I’ll look to test it in the next RC once that’s released.

    Hello, I was having the same issue on 19.1 came across your post, learned about GUI causing the problem. I updated to 20.1 hoping that it was fixed but unfortunately still having the same problem which is seriously bothering me.

    Could you please share with me step by step, how were you able to fix it? Are you using an unreleased candidate version of Bitcoin perhaps?

  27. mmortal03 commented at 2:37 pm on August 17, 2020: none

    Thanks, I can confirm that this fixes it in the latest nightly build. I’ll look to test it in the next RC once that’s released.

    Hello, I was having the same issue on 19.1 came across your post, learned about GUI causing the problem. I updated to 20.1 hoping that it was fixed but unfortunately still having the same problem which is seriously bothering me.

    Could you please share with me step by step, how were you able to fix it? Are you using an unreleased candidate version of Bitcoin perhaps?

    This was fixed since 0.19.0rc3, and went into the final release of 0.19.0. If you’ve been seeing something similar since 0.19.1, then you’ve found a different issue. I’ve run all the official releases since, and haven’t seen the issue come back up, so there’s got to be something particular about your situation. I’d suggest creating a new bug report and provide details about your system and configuration.

  28. sabotagebeats commented at 6:38 am on December 19, 2020: none
    @mmortal03 having this issue on 20.1
  29. mmortal03 commented at 7:10 am on December 19, 2020: none

    @mmortal03 having this issue on 20.1

    It’s probably a new bug. I’ve run practically every release since this was fixed, and haven’t experienced the bug since then. I’m currently testing v0.21.0rc3 and don’t see it. I wish I could help you, but I’m not a dev. You might try the RC for the upcoming release to see if you can still reproduce it: https://bitcoin.org/bin/bitcoin-core-0.21.0/test.rc3/

  30. DrahtBot locked this on Feb 15, 2022

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: 2024-07-05 22:12 UTC

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