FancyJan commented on issue #2453:
URL: https://github.com/apache/brpc/issues/2453#issuecomment-1825333381

   > @sinomiko @FancyJan 这两个场景都不是。后来调查了一下,现场是一个8核的vm,就开了9个pthread 
worker。我们的程序后台有一些bthread task,有的地方还混用了pthread 
lock的逻辑,猜测应该是哪里的代码有点问题,没有worker来干活了。通过调大pthread数,或者关闭那些后台的task,都不会再次出现。准备详细调查一下相关的代码实现,看看是不是写挫了。
   
   
我好像也碰到过这种,在bthread上使用pthread锁可能会有问题:例如一个读写锁的场景,写线程持有锁被切换到后台,此时所有的worker如果刚好都在读同一把锁被阻塞,就没有worker去释放写锁了。
   可以试一下换成bthread::Mutex,或者开启--usercode_in_pthread=true看看还会不会卡住。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to