Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102474

Sometime SSL leads to hang application on exit

    XMLWordPrintable

Details

    • Windows
    • 61bfe87a6 (dev), c7375ed4c (6.5), 416565fd1 (tqtc/lts-6.2), 376b33add (6.4)

    Description

      When trying to exit the app, the destructor of QNetworkAccessManager hangs printing

       "No TLS backend is available"

       Application is using Qt6.3.0 build from source with linked openssl and plugins like qopensslbackend are manually imported.

      Following are the stack trace

      ntdll!NtWaitForSingleObject+0x14
      KERNELBASE!WaitForSingleObjectEx+0x8e
      myapp!QThread::wait+0xf0
      myapp!QThread::~QThread+0x9a
      myapp!QThread::`vector deleting destructor'+0x14
      myapp!QNetworkAccessManagerPrivate::destroyThread+0x82
      myapp!QNetworkAccessManagerPrivate::`vector deleting destructor'+0x24
      
      It gets stuck waiting for the network manager thread to exit. This is the call stack of the network manager thread:
      ntdll!NtWaitForAlertByThreadId+0x14
      ntdll!RtlpWaitOnAddressWithTimeout+0x81
      ntdll!RtlpWaitOnCriticalSection+0x1a1
      ntdll!RtlpEnterCriticalSectionContended+0x18c
      ntdll!RtlEnterCriticalSection+0x42
      myapp!__acrt_lock_and_call::__l2::<lambda_638799b9deba96c50f710eeac98168cd>::operator()+0x7 [minkernel\crts\ucrt\inc\corecrt_internal.h @ 977]
      myapp!__crt_seh_guarded_call<int>::operator()<<lambda_638799b9deba96c50f710eeac98168cd>,<lambda_22ebabd17bc4fa466a2aca6d8deb888d> &,<lambda_a6f7d7db0129f75315ebf26d50c089f1> >+0x1c [VCCRT\vcruntime\inc\internal_shared.h @ 201]
      myapp!__acrt_lock_and_call+0x28 [minkernel\crts\ucrt\inc\corecrt_internal.h @ 976]
      myapp!_register_onexit_function+0x42 [minkernel\crts\ucrt\src\appcrt\startup\onexit.cpp @ 149]
      myapp!_onexit+0x18 [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\utility\utility.cpp @ 261]
      myapp!atexit+0x9 [d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\utility\utility.cpp @ 275]
      myapp!lcSsl+0x70
      myapp!QSslCertificatePrivate::QSslCertificatePrivate+0x65
      myapp!QSslCertificate::QSslCertificate+0x2a
      myapp!QTlsPrivate::TlsCryptographOpenSSL::cancelCAFetch+0x34
      myapp!QSslSocket::close+0x2d
      myapp!QHttpNetworkConnectionPrivate::~QHttpNetworkConnectionPrivate+0x6e
      myapp!QHttpNetworkConnectionPrivate::`vector deleting destructor'+0x14
      myapp!QObject::~QObject+0x749
      myapp!QNetworkAccessCachedHttpConnection::`vector deleting destructor'+0x20
      myapp!QNetworkAccessCache::clear+0x13b
      myapp!QNetworkAccessCache::~QNetworkAccessCache+0x18
      myapp!QNetworkAccessCache::`vector deleting destructor'+0x14
      myapp!QThreadStorageData::finish+0x1e7
      myapp!QThreadPrivate::finish+0xaa
      myapp!QThreadPrivate::start+0x13d
       

       

      it seems that probably there is some problem with the way Qt's qopensslbackend is unloading when the application is exits.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            irfan.omair@digia.com Irfan Omair
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes