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

Deadlock condition in network config manager

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.0.0 Beta 1
    • None
    • Ubuntu 10.04 LTS 32 bit

    Description

      In void QNetworkConfigurationManagerPrivate::updateConfigurations(), there is a call near the end of the function:

      QMetaObject::invokeMethod(engine, "initialize", Qt::BlockingQueuedConnection);

      This (sometimes) causes deadlock in one of the declarative auto tests (tst_qquickpixmapcache). In the case where it deadlocks, this call is made from a thread (via the HttpNetworkReply et al classes) and it blocks waiting for the other thread to enter an event loop.

      I assume this is a bug, or must the client code be running an event loop to use this functionality?

      Note that the original bug report only occurs on 10.04, not on 11.10 or 12.04.

      I have worked around this issue by creating a QNetworkConfigurationManager on the main thread and calling updateConfigurations() at the start of the test on the main thread, so this code isn't hit by the HTTP server thread, but that doesn't seem ideal. To reproduce the bug, you'll need to remove these two lines from initTestCase().

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              glwatson Glenn Watson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes