[
https://issues.apache.org/jira/browse/THRIFT-3233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15254456#comment-15254456
]
ASF GitHub Bot commented on THRIFT-3233:
----------------------------------------
GitHub user jeking3 opened a pull request:
https://github.com/apache/thrift/pull/992
THRIFT-3233: fix accounting of workers in thread manager
Per patch submitted by Paweł Janicki.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeking3/thrift defect/THIFT-3233
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/992.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #992
----
commit c2d179b6572ef2cf92301cf80e333688635f5c06
Author: Jim King <[email protected]>
Date: 2016-04-19T19:57:31Z
THRIFT-3233: fix accounting of workers in thread manager
----
> Fix C++ ThreadManager::Impl::removeWorker worker join
> -----------------------------------------------------
>
> Key: THRIFT-3233
> URL: https://issues.apache.org/jira/browse/THRIFT-3233
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.2
> Reporter: Paweł Janicki
> Assignee: James E. King, III
> Priority: Critical
> Attachments:
> 0001-THRIFT-3233.-cpp-Fix-ThreadManager-Impl-removeWorker.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)