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

QHostInfoLookupManager prevents app from quitting if name resolution hangs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Network
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            tpochep Timur Pocheptsov
            Reporter:
            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