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

QHostInfoLookupManager prevents app from quitting if name resolution hangs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.0
    • Network
    • None
    • Linux/Yocto

    Description

      QHostInfoLookupManager connects a signal handler to `QCoreApplication::destroyed`  that waits until all threads from`QHostInfoLookupManager::threadPool` are done (see QHostInfoLookupManager::QHostInfoLookupManager()).

      However, depending on the system integration, those threads may hang for up to 10 - 15sec. Thus, quitting an app would be delayed by the same amount of time.

       For example, quitting the sample app provided in attachments always hang with the following setup:

      • Linux 5.4.
      • Qt v5.15.0.
      • Connman v1.37.
      • Connman runs without --nodnsproxy, so it proxies dns resolution.
      • System has no network access (system cannot reach external dns server).

       

      Qt shouldn't rely on system level timeouts to quit an app. I would have expected Qt to force quit the threads if they are not done after a small timeout window defined by Qt.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            gchamp Guillaume Champagne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes