This is an automated email from the ASF dual-hosted git repository. Huixxi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brpc.git
commit da1324b23cb5016bd35aa27780e13cbdfa9963db Merge: 9291db9d 010a3e11 Author: HU <[email protected]> AuthorDate: Fri Sep 4 15:27:04 2026 +0800 Merge pull request #3412 from legionxiong/fix-rdma-stale-cq-callback Reject stale CQ callbacks after socket revival src/brpc/rdma/rdma_endpoint.cpp | 5 +++++ test/brpc_rdma_unittest.cpp | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --cc src/brpc/rdma/rdma_endpoint.cpp index 12145a31,d0fad753..a602122e --- a/src/brpc/rdma/rdma_endpoint.cpp +++ b/src/brpc/rdma/rdma_endpoint.cpp @@@ -1619,9 -1434,13 +1619,14 @@@ void RdmaEndpoint::PollCq(Socket* m) if (Socket::Address(ep->_socket->id(), &s) < 0) { return; } + // A queued callback may outlive Reset() and see the main Socket after + // it has been revived with another CQ. + if (m->id() != ep->_cq_sid) { + return; + } auto* rdma_transport = static_cast<RdmaTransport*>(s->_transport.get()); CHECK(ep == rdma_transport->_rdma_ep); + CHECK_GE(ep->_state.load(butil::memory_order_acquire), ESTABLISHED); bool send = false; ibv_cq* cq = ep->_resource->recv_cq; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
