chenBright opened a new issue, #1889:
URL: https://github.com/apache/incubator-brpc/issues/1889

   **Describe the bug (描述bug)**
   是否考虑在优雅退出时,stop and join 
一些框架的常驻线程(worker线程、timer线程、bvar相关线程)?因为在退出的时候,全局变量或者静态变量析构后,常驻线程有几率访问到这些变量,存在coredump风险。相关issue:https://github.com/apache/incubator-brpc/issues/1594https://github.com/apache/incubator-brpc/issues/1726https://github.com/apache/incubator-brpc/issues/1634
   
   **To Reproduce (复现方法)**
   1. 通过graceful_quit_on_sigterm开启优雅退出功能;
   2. 程序启动的时候,创建一个协程,协程的主要逻辑是`while(true) { /* 访问全局变量 */ }`;
   3. 发送SIGTERM或者SIGINT给进程,让其优雅退出。
   4. 这样,协程的循环里有几率访问到析构的全局变量,导致程序coredump。
   
   **Expected behavior (期望行为)**
   规避常驻线程在进程优雅退出时的coredump风险。
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


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