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 2022/08/12 11:34:32 UTC

[GitHub] [incubator-brpc] chenBright opened a new pull request, #1884: fix the first bthread keytable on worker pthread will be deleted twice

chenBright opened a new pull request, #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884

   fix #1714 
   优雅退出时能只清理pthread创建的keytable,bthread创建的keytable不需要在cleanup_pthread中清理,这些keytable会在return_keytable或者bthread_keytable_pool_destroy中清理。


-- 
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] chenBright commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
chenBright commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1213019385

   @zyearn 麻烦有空看一下。


-- 
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] jamesge merged pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
jamesge merged PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884


-- 
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] wwbmmm commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1214297422

   LGTM


-- 
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] chenBright commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
chenBright commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1214552962

   > 我发现在bthread_keytable_pool_destroy里删除kt之前用`atexit_cancel`取消kt的回调析构函数似乎也可以防止重复析构
   
   先thread_atexit再thread_atexit_cancel,似乎多做了一些无用功,而且直接在开始的时候就不将协程变量对应keytable加入到thread_atexit,应该会直观一点吧。


-- 
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] chenBright commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
chenBright commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1214551221

   > > 另一方面,是否考虑在退出时,stop and join 一些框架的常驻线程(worker线程、timer线程、bvar相关线程)?因为在退出的时候,全局变量或者静态变量析构后,常驻线程有几率访问到这些变量,存在coredump风险。相关issue:#1594 、#1726 、#1634
   > 
   > 这个问题能否新建一个issue单独讨论? @chenBright
   
   嗯,已新建issue。麻烦看看这个rp还有没有问题。 @zyearn 


-- 
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] chenBright commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
chenBright commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1213038759

   另一方面,是否考虑在退出时,stop and join 一些框架的常驻线程(worker线程、timer线程、bvar相关线程)?因为在退出的时候,全局变量或者静态变量析构后,常驻线程有几率访问到这些变量,存在coredump风险。相关issue:#1594 、#1726 、#1634


-- 
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 pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
zyearn commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1214438235

   > 另一方面,是否考虑在退出时,stop and join 一些框架的常驻线程(worker线程、timer线程、bvar相关线程)?因为在退出的时候,全局变量或者静态变量析构后,常驻线程有几率访问到这些变量,存在coredump风险。相关issue:#1594 、#1726 、#1634
   
   这个问题能否新建一个issue单独讨论?


-- 
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] tea321000 commented on pull request #1884: fix the first bthread keytable on worker pthread will be deleted twice

Posted by GitBox <gi...@apache.org>.
tea321000 commented on PR #1884:
URL: https://github.com/apache/incubator-brpc/pull/1884#issuecomment-1213239138

   我发现在bthread_keytable_pool_destroy里删除kt之前用`atexit_cancel`取消kt的回调析构函数似乎也可以防止重复析构


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