Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3233

Fix C++ ThreadManager::Impl::removeWorker worker join

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.10.0
    • Component/s: C++ - Library
    • Labels:
      None
    • Flags:
      Important

      Description

      ThreadManager::Impl::removeWorker is not joining worker properly.
      It possible that the not joined worker will continue to reference destructed ThreadManager's non-static members causing crash.

      It is caused by removeWorker() implementation which waits for workers to decrement the ThreadManager's workerCount_. Once value is decremented removeWorker() assumes the worker thread joined, while in fact the worker thread continues to execute some more code which adds the worker thread to destruction list which list may be just freed due to ThreadManager object destruction.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                pjanicki Paweł Janicki
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: