From: Sage Weil Date: Wed, 2 Jan 2019 19:04:14 +0000 (-0600) Subject: msg/async/Protocol*: unregister con from accept vs mark_down race X-Git-Tag: v14.1.0~434^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=16264a5171351bfa35696ba83a771f047d3ca04e;p=ceph.git msg/async/Protocol*: unregister con from accept vs mark_down race If we are accepting a connection and it gets marked down while we are working on it, unregister it. Otherwise, we leave teh connection CLOSED and registered and it interferes with the ability to open a new connection. Fixes: http://tracker.ceph.com/issues/37778 Signed-off-by: Sage Weil --- diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index ab4b526105f1..0c2627b33782 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -2387,6 +2387,7 @@ CtPtr ProtocolV1::open(ceph_msg_connect_reply &reply, << dendl; ceph_assert(state == CLOSED || state == NONE); ldout(cct, 10) << "accept fault after register" << dendl; + messenger->unregister_conn(connection); connection->inject_delay(); return _fault(); } diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 99b424e6dbc3..bfa08fc4038a 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -2426,6 +2426,7 @@ CtPtr ProtocolV2::open(ceph_msg_connect_reply &reply, << dendl; ceph_assert(state == CLOSED || state == NONE); ldout(cct, 10) << "accept fault after register" << dendl; + messenger->unregister_conn(connection); connection->inject_delay(); return _fault(); }