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

Livelock with QTimer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.14.0 RC2
    • Core: Threads
    • None
    • Windows

    Description

      There is a Livelock situation with QTimer that I can't prevent without modifying Qt.

      The problem occurs when there is a qt_fast_timer_proc call (which is typically called from a TimeCritical thread) and there are already a lot of items in the event queue. In my (full Debug) situation I had 100k events in the event queue.

      QCoreApplication::compressEvent in this case took longer than the event timeout, which immediately triggers another timer event, etc etc etc. Freezing the timer thread from the debugger allowed the main thread to clean up the event queue and operation to continue normally.

      It would be nice if something was added that will allow these fast timers to bypass compression or even that qt_fast_timer_proc itself guards against this situation somehow.

      For me the situation occurs when using QNetworkAccessManager to download a (big) file which I then immediately open in my application.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            wathiant Job Mulder
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes