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

atexit and sys.excepthook get ignored when Qt crashes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.11.2, 5.12.0, 5.12.1
    • PySide
    • None

    Description

      When a Qt error crashes the program, such as this one: 

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

      Or when calling a Qt function from a python thread, or a myriad of other reasons, the program will improperly exit, often segfaulting. This leads to sys.excepthook and atexit from python not being called and preventing proper freeing of resoures.

      Such as, in my case, I have a concurrent.futures.ProcessPoolExecutor to offload CPU intensive tasks without incurring the GIL tax. However, the pool.join() methods do not get called in the event of a Qt related crash, as the responsible functions never get called orphaning the processes forever. This leads to resources being bound until a restart of the system. It also leads to a very common problem that keeps occuring in our Support:

      Software crashes on Customer end.

      Customer calls support

      support tells them to update

      Customer downloads and installs update

      update fails because software is still open (the zombie processes)

      support has to go onto customer computer and kill cpucount many processes, then proceed with installation

       

      The updater software has an option to attempt to close the processes, but they do not respond and the installer software has no option to tell it to just term the processes.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            berserker berserker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes