zgaze commented on issue #2313:
URL: https://github.com/apache/brpc/issues/2313#issuecomment-1630642102

   > 可以参考这里的FAQ:https://github.com/apache/brpc/blob/master/docs/cn/bthread.md 
看起来是在锁内进行rpc导致worker被用光。
   
   是说 访问下游RPC导致占用了全部pthread,导致io没有worker来处理了吗? 感觉不太像:
   1、访问下游RPC是在tf的线程池里面做的,并且是异步rpc。
   2、并且没有发现有线程阻塞在read等api上
   
   所有的线程都很正常,除了io线程在等待tf返回或者超时。 个人感觉 最大的可能性就是bthread和github.com/google/nsync 
有概率冲突。导致wait不能返回。
   
1、32core机器,33个线程都阻塞在了nsync::nsync_mu_semaphore_p_with_deadline。这应该是32个bthread,按照我对bthread的了解,它应该在阻塞时候让出cpu给其他任务,不会完全阻塞该pthread。
 比较大的可能是nsync实现的同步原语,没有能将cpu让出来。 (对两个库都了解不多,算猜测)
   2、就算业务代码有问题等,那么io线程里tf等待超时也应该能正常返回,不会一直阻塞在wait超时。


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to