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

CLONE -Qt applications using webkit deadlock on exit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • 4.6.3, 4.7.0
    • 4.6.2
    • ActiveX Support
    • None
    • Windox XP, ActiveX
    • 135710b1fa38f72a934c542d196af9eff066d908

    Description

      This issue has the same symptoms as QT-5612 but when using webkit in an ActiveX control via ActiveQT.

      Here is the stack traces of the deadlocked threads from a simple MFC dialog based application hosting the ActiveX control which contains the Qt wrapped WebKiit

       	QtCored4.dll!QThread::wait(unsigned long time=0xffffffff)  Line 504 + 0x11 bytes	C++
       	QtCored4.dll!QThreadPoolPrivate::reset()  Line 278	C++
       	QtCored4.dll!QThreadPool::~QThreadPool()  Line 430	C++
      >	QtNetworkd4.dll!QHostInfoLookupManager::~QHostInfoLookupManager()  Line 454 + 0x1c bytes	C++
       	QtNetworkd4.dll!QHostInfoLookupManager::`scalar deleting destructor'()  + 0xf bytes	C++
       	QtNetworkd4.dll!QGlobalStaticDeleter<QHostInfoLookupManager>::~QGlobalStaticDeleter<QHostInfoLookupManager>()  Line 1799 + 0x28 bytes	C++
       	QtNetworkd4.dll!`theHostInfoLookupManager'::`8'::`dynamic atexit destructor for 'cleanup''()  + 0xd bytes	C++
       	QtNetworkd4.dll!_CRT_INIT(void * hDllHandle=0x64000000, unsigned long dwReason=0x00000000, void * lpreserved=0x00000000)  Line 449	C
       	QtNetworkd4.dll!__DllMainCRTStartup(void * hDllHandle=0x64000000, unsigned long dwReason=0x00000000, void * lpreserved=0x00000000)  Line 560 + 0x11 bytes	C
       	QtNetworkd4.dll!_DllMainCRTStartup(void * hDllHandle=0x64000000, unsigned long dwReason=0x00000000, void * lpreserved=0x00000000)  Line 510 + 0x11 bytes	C
      
      
       	msvcr90d.dll!_endthreadex(unsigned int retcode=0x00000000)  Line 414	C
       	msvcr90d.dll!_callthreadstartex()  Line 348 + 0x15 bytes	C
      >	msvcr90d.dll!_threadstartex(void * ptd=0x00dff6e8)  Line 331	C
      
      • Start a Qt application using webkit, like assistant or, even more reproducible, demos/browser/browser.
      • Wait a bit and then exit the application.
      • The application will now hang with at least two threads still being open.
      • Example backtrace: The browser application leaves three threads open.
      => Thread 1: 
      #0  0xb7fe1424 in __kernel_vsyscall ()
      #1  0xb57c8f65 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
      #2  0xb58703bc in QWaitConditionPrivate::wait (this=0x825c080, time=4294967295)
          at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qwaitcondition_unix.cpp:87
      #3  0xb586febb in QWaitCondition::wait (this=0x825c00c, mutex=0x825bff8, time=4294967295)
          at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qwaitcondition_unix.cpp:159
      #4  0xb586ec24 in QThread::wait (this=0x825bf88, time=4294967295)
          at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qthread_unix.cpp:615
      #5  0xb68b15d2 in QHostInfoAgent::cleanup (this=0x825bf88) at /home/christian/dev/qt-4.6-tools-team/src/network/kernel/qhostinfo_p.h:166
      #6  0xb68affb1 in QHostInfoAgent::staticCleanup () at /home/christian/dev/qt-4.6-tools-team/src/network/kernel/qhostinfo.cpp:66
      #7  0xb599b9ba in qt_call_post_routines () at /home/christian/dev/qt-4.6-tools-team/src/corelib/kernel/qcoreapplication.cpp:201
      #8  0xb5c915de in ~QApplication (this=0xbfffeca4, __in_chrg=<value optimized out>)
          at /home/christian/dev/qt-4.6-tools-team/src/gui/kernel/qapplication.cpp:1011
      #9  0x0807c3ac in ~BrowserApplication (this=0xbfffeca4, __in_chrg=<value optimized out>)
          at /home/christian/dev/qt-4.6-tools-team/demos/browser/browserapplication.cpp:158
      #10 0x080d19d6 in main (argc=1, argv=0xbfffed64) at /home/christian/dev/qt-4.6-tools-team/demos/browser/main.cpp:51
      
      => Thread 2:
      #0  0xb7fe1424 in __kernel_vsyscall ()
      #1  0xb57c8f65 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
      #2  0xb70b2bc1 in WTF::TCMalloc_PageHeap::scavengerThread() () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #3  0xb70b2c4d in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #4  0xb57c54b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
      #5  0xb55fda5e in clone () from /lib/i686/cmov/libc.so.6
      
      => Thread 3:
      #0  0xb7fe1424 in __kernel_vsyscall ()
      #1  0xb57c8f65 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
      #2  0xb58703bc in QWaitConditionPrivate::wait (this=0x835f430, time=4294967295)
          at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qwaitcondition_unix.cpp:87
      #3  0xb586febb in QWaitCondition::wait (this=0x835ede0, mutex=0x835b5d0, time=4294967295)
          at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qwaitcondition_unix.cpp:159
      #4  0xb70b7210 in WTF::ThreadCondition::wait(WTF::Mutex&) () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #5  0xb7765698 in WebCore::IconDatabase::syncThreadMainLoop() () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #6  0xb7766f8f in WebCore::IconDatabase::iconDatabaseSyncThread() () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #7  0xb7766fe9 in WebCore::IconDatabase::iconDatabaseSyncThreadStart(void*) ()
         from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #8  0xb70b5d74 in WTF::threadEntryPoint(void*) () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #9  0xb70b65b7 in WTF::ThreadPrivate::run() () from /home/christian/builds/qt-4.6-tools-team/lib/libQtWebKit.so.4
      #10 0xb586f91c in QThreadPrivate::start (arg=0x8364318) at /home/christian/dev/qt-4.6-tools-team/src/corelib/thread/qthread_unix.cpp:244
      #11 0xb57c54b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
      #12 0xb55fda5e in clone () from /lib/i686/cmov/libc.so.6
      
      • In assistant, only threads 1 and 2 are there, with the exact same backtrace.

      Attachments

        Issue Links

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

          Activity

            People

              mgoetz Markus Goetz (Inactive)
              jaynewt Jamie Newton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes