PFZheng commented on issue #1085: PrometheusMetricsService造成死锁 URL: https://github.com/apache/incubator-brpc/issues/1085#issuecomment-613207192 如果是用了 bthread mutex,可能是内部版本fix过的一个问题。 struct VarMapWithLock : public VarMap { pthread_mutex_t mutex; VarMapWithLock() { CHECK_EQ(0, init(1024, 80)); pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); **pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);** pthread_mutex_init(&mutex, &attr); pthread_mutexattr_destroy(&attr); } }; 这里的pthread mutex可能重入,重入的pthread mutex在lock的时候会检查owner,即pthraed id。
---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
