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

GIL deadlock in qInstallMessageHandler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.14.2, 5.15.2, 6.2.0
    • PySide
    • None
    • All
    • b8dadf54c3736b52a770d7715c8320a4dd016427 (pyside/pyside-setup/dev) b2b0206844779702320c499f46277c56765a0a9e (pyside/pyside-setup/6.2) 0a2cac41f776e225d617598fd55a942bef913573 (pyside/tqtc-pyside-setup/5.15)

    Description

      The combination of qInstallMessageHandler, QQmlApplicationEngine loading an 
      ApplicationWindow and Qt Logging enabled (e.g. with QT_LOGGING_RULES=*=true) results in a GIL deadlock in qt_message_output.
       
      When starting the attached application with Qt Logging enabled, the process hangs and the window is not shown. In the thread stack list, you can see that the Qt Thread hangs at PyGILState_Ensure. 
       
      This is very likely a regression from https://bugreports.qt.io/browse/PYSIDE-803, as the issue can't be reproduced with 5.13.2 (5.14.0 and 5.14.1 crashes).

      Attachments

        1. pyside1681_stack.txt
          42 kB
        2. pyside1681.zip
          1 kB
        3. test.py
          0.4 kB
        4. test6.py
          0.4 kB
        5. view.qml
          0.3 kB

        Issue Links

          For Gerrit Dashboard: PYSIDE-1681
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              schlamar schlamar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes