stdpain commented on issue #1741: URL: https://github.com/apache/incubator-brpc/issues/1741#issuecomment-1098850059
It looks like this, assuming there is only one worker. The worker schedules bthread1 to get the lock on the pthread and then performs a yield. The worker schedules bthread2 to try to get the pthread lock, and then blocks. Since worker is blocked, it cannot schedule bthread1, so bthread1 cannot release the lock, resulting in a deadlock. The main reason is not that the bthread_setconcurrency is too small. Because even if the worker is large, it will still get stuck, but the probability is very low. -- 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]
