chenBright commented on issue #2265: URL: https://github.com/apache/brpc/issues/2265#issuecomment-3540308699
这个问题的根因:没有更多事件后,会继续解析`_read_buf`的数据。在解析的过程中,有读时间到来,另一个bthread读数据保存到`_read_buf`。该场景存在数据竞争问题——多线程操作`_read_buf`。 https://github.com/apache/brpc/blob/a54b6071ba4336dc6a2cc9ad242836b35a26ce62/src/brpc/rdma/rdma_endpoint.cpp#L1420-L1422 在#3145 中将CQ拆成send_cq和recv_cq时,没注意这个细节,处理send CQE和recv CQE的两个bthread并发操作`_read_buf`,存在同样的数据竞争问题。因为send、recv事件并发概率高,所以能在rdma UT上能稳定复现这个问题。 cc @yanglimingcn @Yangfisher1 @FancyJan @live4thee @372046933 @Tuvie -- 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]
