bitcoin: bitcoin-qt hangs in futex() / __cxa_guard_acquire()

When I run bitcoin-qt it does not properly start up and hangs in futex():

The last calls shown in strace are:

futex(0x7f3f7bfd77e4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f3f7d812c60, FUTEX_WAIT, 65792, NULL

gdb shows:

(gdb) bt
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff5e26d2f in __cxa_guard_acquire () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ffff7e06dcc in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#3  0x00007ffff7e0b706 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#4  0x00007ffff7e2af21 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#5  0x00007ffff7e32080 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#6  0x00007ffff7df1c67 in QSslCertificate::QSslCertificate(QByteArray const&, QSsl::EncodingFormat) ()                                                                                        
   from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#7  0x00007ffff7e07fe6 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#8  0x00007ffff7dfb09d in QSslConfiguration::defaultConfiguration() () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5                                                                      
#9  0x000055555564841f in main () at qt/bitcoin.cpp:579
#10 0x00007ffff5a49b17 in __libc_start_main (main=0x555555648380 <main>, argc=1, argv=0x7fffffffdcc8, init=<optimized out>, fini=<optimized out>,                                             
    rtld_fini=<optimized out>, stack_end=0x7fffffffdcb8) at ../csu/libc-start.c:310
#11 0x0000555555657dca in _start () at /usr/include/c++/8/ext/new_allocator.h:116

I understand that this might also be a problem in Qt rather than bitcoin-qt. But other Qt applications do not show this problem. So I’d be happy to get any hint to debug this further.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Yes, this is indeed a duplicate of #14273. I am running Debian Sid with libqt5network5:amd64 5.11.1+dfsg-9

I can also confirm that the sslLibraryVersionString() call from #14273 fixes the problem. Can we have that change to bitcoin-core? I understand that this is not a bitcoin-core bug, but rather a Qt bug. But the workaround seems simple enough. It might not be an option for people to update Qt easily.

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 1e950e268..38e412fcd 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -576,6 +576,7 @@ int main(int argc, char *argv[])
 #if QT_VERSION >= 0x050500
     // Because of the POODLE attack it is recommended to disable SSLv3 (https://disablessl3.com/),
     // so set SSL protocols to TLS1.0+.
+    QSslSocket::sslLibraryVersionString(); // Call to sslLibraryVersionString is a workaround for a Qt bug. See bitcoin issue #14273 / #14359
     QSslConfiguration sslconf = QSslConfiguration::defaultConfiguration();
     sslconf.setProtocol(QSsl::TlsV1_0OrLater);
     QSslConfiguration::setDefaultConfiguration(sslconf);

If that change is acceptable, I’ll send a pull request.

Thanks for your comments.

Upstream has responded and essentially postponed the issue. They note that this happens only with OpenSSL 1.1.1, not with 1.1.0.