zhangyachen opened a new issue, #2665:
URL: https://github.com/apache/brpc/issues/2665

   **Describe the bug (描述bug)**
   在程序退出时,brpc卡在Join的函数不继续执行。
   
   **To Reproduce (复现方法)**
   程序退出时会调用该方法:
   ```
   TRITONSERVER_Error*
   BRPCServer::Stop()
   {
     if (!running_) {
       return TRITONSERVER_ErrorNew(
           TRITONSERVER_ERROR_UNAVAILABLE, "BRPC server is not running.");
     }
   
     // @TODO 检查brpc server如何shutdown
     std::cout << "ready to stop brpc server" << std::endl;
     brpc_server_->Stop(0);
     std::cout << "ready to join brpc server" << std::endl;
     brpc_server_->Join();
     std::cout << "stop brpc server" << std::endl;
   
     running_ = false;
   
     return nullptr;  // success
   }
   ```
   
   加了三个debug日志,发现卡死在Join上了。
   
   场景是上游有**多个client创建多个链接**到brpc server。**我发现当没有流量到brpc 
server时,就可以正常退出**,打印stop brpc server,但是当上游还有流量到brpc server,我kill brpc 
server进程时,就会出现卡死现象。
   
   
   **Expected behavior (期望行为)**
   正常退出。
   
   **Versions (各种版本)**
   OS: Ubuntu 20.04.5 LTS (Focal Fossa)
   Compiler:  
   brpc:   master代码
   protobuf:  3.16
   
   **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: dev-unsubscr...@brpc.apache.org.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