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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.9.2
    • 0.10.0
    • C++ - Library
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: