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

QThread::terminate() ABA problem

    XMLWordPrintable

Details

    • Linux/X11
    • 1
    • d8bd4c230 (dev), 4e26c3617 (6.8), f8e3576af (6.7), 6342a87e7 (tqtc/lts-6.5), 2da456826 (tqtc/lts-6.2), fbf048917 (tqtc/lts-5.15)
    • Foundation Sprint 111, Foundation Sprint 112

    Description

      QThread::terminate() may kill the wrong thread:

        T1                     T2
      
        t0->terminate();
          lock();
          read ID;
          pthread_cancel(ID);
          unlock()
                               t0->terminate();
                                 lock();
                                 read ID;
          (OS thread finishes)
        t3->start();
          (creates a new OS
           thread with same ID)
                                 pthread_cancel(ID); // cancels new t3!
                                 unlock();
      

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: