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

   **Describe the bug (描述bug)**
   使用DynamicPartitionChannel 
thrift协议访问下游时偶发coredump,下游分库数量>=1都会出现该问题,coredump位置在selective_channel.cpp:375,
   
![image](https://github.com/apache/brpc/assets/17562740/de866bd0-04f6-4b32-97ed-07ca0e6b10bc)
   定位发现thrift_message的包装未实现反射
   
![image](https://github.com/apache/brpc/assets/17562740/c14d64bc-a90f-4c7e-84be-56be88e65a52)
   GetReflection拿到空指针调用Swap产生了core。 
   main_cntl->_response->GetReflection()->Swap(main_cntl->_response, 
_cntl._response) 语义看起来是要Swap两个res,于是尝试强转手动调用了ThriftMessage的Swap方法:
   auto thrift_res = static_cast<ThriftFramedMessage*>(main_cntl->_response);
   thrift_res->Swap(static_cast<ThriftFramedMessage*>(_cntl._response));
   修改完毕之后压测会继续偶发core在 thrift_message.h:192行,似乎response有点问题。
   
![image](https://github.com/apache/brpc/assets/17562740/2309a889-146c-4306-9e01-9c0fec6e5dc2)
   尝试定位修改了一些代码,可能跟backup request cancel行为有关。
   
   **To Reproduce (复现方法)**
   DynamicPartitionChannel thrift协议访问下游开启backup 
request,max_retry=1,timeout=800ms,backup定时器可以调小来增加触发概率。
   
   **Expected behavior (期望行为)**
   1.期望解释一下main_cntl->_response->GetReflection()->Swap(main_cntl->_response, 
_cntl._response)场景含义,看了channel一些代码,感觉写的有点绕。
   2.修正DynamicPartitionChannel backup request行为。
   
   **Versions (各种版本)**
   OS: centos6
   Compiler: gcc492
   brpc: tag:1.2.0
   protobuf: 3.8
   
   **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