You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/11/25 04:03:08 UTC

[GitHub] [incubator-brpc] nwuking opened a new issue #1614: 使用bthread_mutex_t,unique_lock,出现死锁

nwuking opened a new issue #1614:
URL: https://github.com/apache/incubator-brpc/issues/1614


   **Describe the bug (描述bug)**
   两个线程通信,unique_lock lock后,bthread::ConditionVariable _cond wait()的时候,就锁住了,另一个线程也获取不到lock。
   
   有时候出现 ,deadlock 那个提示出现了
   
   我的逻辑是没问题的,自己封装了一个,没出现问题
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   注释掉的是brpc的代码
   
   ![a](https://user-images.githubusercontent.com/44638140/143377412-25eac77d-7dce-48d2-b3f0-d848163b3869.png)
   
   ![b](https://user-images.githubusercontent.com/44638140/143377427-4df7f0f5-b4a6-4b32-bf3f-c7944b581422.png)
   
   


-- 
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-unsubscribe@brpc.apache.org

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



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


[GitHub] [incubator-brpc] zyearn commented on issue #1614: 使用bthread_mutex_t,unique_lock,出现死锁

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1614:
URL: https://github.com/apache/incubator-brpc/issues/1614#issuecomment-979460797


   cond var就是这么用的,可以描述更多一些问题吗


-- 
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-unsubscribe@brpc.apache.org

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



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


[GitHub] [incubator-brpc] zyearn edited a comment on issue #1614: 使用bthread_mutex_t,unique_lock,出现死锁

Posted by GitBox <gi...@apache.org>.
zyearn edited a comment on issue #1614:
URL: https://github.com/apache/incubator-brpc/issues/1614#issuecomment-979460797


   cond var就是这么用的,可以描述更清楚一些问题吗


-- 
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-unsubscribe@brpc.apache.org

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



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


[GitHub] [incubator-brpc] nwuking commented on issue #1614: 使用bthread_mutex_t,unique_lock,出现死锁

Posted by GitBox <gi...@apache.org>.
nwuking commented on issue #1614:
URL: https://github.com/apache/incubator-brpc/issues/1614#issuecomment-981580533


   如图那里,有时候就会提示那,出现死锁
   
   
   
   ***@***.***
    
   发件人: Jiashun Zhu
   发送时间: 2021-11-26 04:41
   收件人: apache/incubator-brpc
   抄送: Yongjun; Author
   主题: Re: [apache/incubator-brpc] 使用bthread_mutex_t,unique_lock<bthread_mutex_t>,出现死锁 (Issue #1614)
   cond var就是这么用的,可以描述更多一些问题吗
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   Triage notifications on the go with GitHub Mobile for iOS or Android. 
   


-- 
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-unsubscribe@brpc.apache.org

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



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