Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1657

Possible deadlock on signal connect/emit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 5.14.2.2
    • 5.14.1
    • PySide
    • None
    • MacOs v11.1 (BigSur), PySide2 5.14.1, Python 2.7.
    • macOS

    Description

      Deadlocks in multi threaded applications can happen on signal emit/connect depending on the order of GIL and QObject lock acquisition.

      The problem looks very similar to this issue which was fixed for PySide, but possibly not for PySide2.

      https://bugreports.qt.io/browse/PYSIDE-164

      https://codereview.qt-project.org/c/pyside/pyside-setup/+/84454

       

      Unfortunately it is very hard to provide a script to reproduce the issue. But if you look at the attached process sample, you can see that:

      • The main thread is trying to connect a signal, and possibly acquired the GIL.
      • Thread Thread_356690 is trying to emit a signal and is waiting for the GIL to be released, but is possibly holding the lock the main thread is trying to acquire.

      This problem does not happen at all with PySide 1.2.4.

       

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              gplsteph Stéphane Deverly
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes