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

   **Describe the bug**
   服务开启enable_rpcz后,上线跑一段时间就会内存暴涨然后core掉,经排查定位发现在destroy()中存在内存重复释放问题。
   
   ```
   void Span::destroy() {
       EndAsParent();
       Span* p = _next_client;
       while (p) {
           if (p == this) {
               LOG(ERROR) << "Span next_client points to self, span_id=" << 
p->_span_id;
           }
           Span* p_next = p->_next_client;
           p->_info.clear();
           butil::return_object(p);
           p = p_next;
       }
       _info.clear();
       butil::return_object(this);
   }
   ```
   如上代码,ERROR日志是我debug时加的,经过验证在服务core掉时确实打印了该行日志。
   说明span链表中有span异常指向了自身。
   
   这个问题的根源是什么?新版本是否有解决该问题?
   
   
   **To Reproduce**
   
   
   **Expected behavior**
   
   
   **Versions**
   OS: centos7.6
   Compiler: gcc4.8.5
   brpc: 0.9.0
   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