You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/18 12:52:15 UTC
[GitHub] [incubator-mxnet] lilongyue opened a new issue #17374: potential
dead lock bug!
lilongyue opened a new issue #17374: potential dead lock bug!
URL: https://github.com/apache/incubator-mxnet/issues/17374
in the file 'dmlc-core/include/dmlc/thread_group.h'
in the file two functions below are used as initializer of engine threads:
there is a potential dead lock bug inside these functions:
(eg.
1. wait thread get the mutex_ lock and switch to engine thread
2. engine thread set signaled_ = true; and switch to wait thread
3.wait thread bypass if condition and continues to execute
4. the engine just stuck at the std::unique_lock and dead there
)
void wait() {
std::unique_lock<std::mutex> lock(mutex_);
if (!signaled_) {
condition_variable_.wait(lock);
}
}
/*!
* \brief Set this object's state to signaled (wait() will release or pass through)
*/
void signal() {
signaled_ = true;
std::unique_lock<std::mutex> lk(mutex_);
condition_variable_.notify_all();
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] lilongyue closed issue #17374: potential dead
lock bug! in 'dmlc-core'
Posted by GitBox <gi...@apache.org>.
lilongyue closed issue #17374: potential dead lock bug! in 'dmlc-core'
URL: https://github.com/apache/incubator-mxnet/issues/17374
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services