From: Yingxin Cheng Date: Tue, 17 Mar 2020 07:14:06 +0000 (+0800) Subject: crimson/net: add critical info logs to track and debug racing X-Git-Tag: v16.0.0~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d78cbb3ebda0c00e3ebd47aa1b3b45c16753ba80;p=ceph.git crimson/net: add critical info logs to track and debug racing Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/net/Protocol.cc b/src/crimson/net/Protocol.cc index 7eb952609ed0..3d01f26e50d4 100644 --- a/src/crimson/net/Protocol.cc +++ b/src/crimson/net/Protocol.cc @@ -48,6 +48,10 @@ void Protocol::close(bool dispatch_reset, return; } + logger().info("{} closing: reset {}, replace {}", conn, + dispatch_reset ? "yes" : "no", + f_accept_new ? "yes" : "no"); + // unregister_conn() drops a reference, so hold another until completion auto cleanup = [conn_ref = conn.shared_from_this(), this] { logger().debug("{} closed!", conn); diff --git a/src/crimson/net/SocketMessenger.cc b/src/crimson/net/SocketMessenger.cc index 2817602cac7d..c11e2b32753e 100644 --- a/src/crimson/net/SocketMessenger.cc +++ b/src/crimson/net/SocketMessenger.cc @@ -141,6 +141,7 @@ SocketMessenger::connect(const entity_addr_t& peer_addr, const entity_type_t& pe ceph_assert(peer_addr.get_port() > 0); if (auto found = lookup_conn(peer_addr); found) { + logger().info("{} connect to existing", *found); return found->shared_from_this(); } SocketConnectionRef conn = seastar::make_shared(