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: [email protected] With regards, Apache Git Services
