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

Opening QSqlDatabase in parallel causes endless loop at shutdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.3, 6.6.0
    • 5.15, 6.5.0
    • SQL Support
    • None
    • All
    • 048a68c1e (dev), 8d2bdc9cd (6.5)

    Description

      How to reproduce:

      • Open two QSqlDatabase in separate threads in parallel.

      What happens:

      • On shutdown when QApplication is freed, there is an endless loop.

      I found following cause:

      • When two SQL connections are created in parallel, QSqlDatabasePrivate::driverDict() is called twice in parallel. This will call qAddPostRoutine(cleanDriverDict); twice and cleanDriverDict will appear twice in the PostRoutines.
      • During shutdown, the second cleanDriverDict calls driverDict() again, which reinitializes qDriverDictInit and adds another qAddPostRoutine. So the cleanDriverDict will be called and added again and again.

      Attachments

        For Gerrit Dashboard: QTBUG-112961
        # Subject Branch Project Status CR V

        Activity

          People

            chehrlic Christian Ehrlicher
            frichter Florian Richter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are 2 open Gerrit changes