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

QMutex can deadlock when calling tryLock repeatedly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 4.7.2
    • 4.6.3, 4.7.1
    • Core: Threads
    • None
    • Linux
    • 7987d4cfd3ce86c20a55b5661a5221f12246b27e

      QMutex::tryLock can lead to deadlocks when being called repeatedly. Attached is a file that will reproducible hang up sooner or later (or trigger "QMutex: mutex destroy failure: Device or resource busy" on exit). To reproduce compile and run it repeatedly:

      g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4/ /usr/lib64/libQtCore.so qmutex-trylock.cpp -o qmutex-trylock
      while true; do ./qmutex-trylock; done

      This was confirmed on multiple machines by multiple people, Thiago being one of them.

      KDE Bug report: https://bugs.kde.org/show_bug.cgi?id=252659 (affects KDevelop 4.2)

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

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            milianw Milian Wolff
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes