]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/test_msgr: add shutdown hang debug info
authorHaomai Wang <haomai@xsky.com>
Sun, 19 Jun 2016 15:04:46 +0000 (23:04 +0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 29 Jun 2016 08:19:15 +0000 (10:19 +0200)
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit 37b53d69d3d8c848d4627475fd63c80e15e118e7)

src/test/msgr/test_msgr.cc

index e1fa612d6e7f0646fe1bc118a8ef4ece21954213..b28c7580bc7e588dec892cacc69827331c7803de 100644 (file)
@@ -826,6 +826,14 @@ class SyntheticDispatcher : public Dispatcher {
       sent.erase(*it);
     conn_sent.erase(con);
   }
+
+  void print() {
+    for (auto && p : conn_sent) {
+      if (!p.second.empty()) {
+        cerr << __func__ << " " << p.first << " wait " << p.second.size() << std::endl;
+      }
+    }
+  }
 };
 
 
@@ -1003,8 +1011,9 @@ class SyntheticWorkload {
          << " inflight messages: " << dispatcher.get_pending() << std::endl;
     if (detail && !available_connections.empty()) {
       for (auto &&c : available_connections)
-        cerr << "available connection: " << c.first;
+        cerr << "available connection: " << c.first << " ";
       cerr << std::endl;
+      dispatcher.print();
     }
   }