]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: by default, do not assert on leaks in the shared_cache code 18749/head
authorGreg Farnum <gfarnum@redhat.com>
Mon, 9 Oct 2017 21:16:05 +0000 (14:16 -0700)
committerShinobu Kinjo <shinobu@redhat.com>
Sun, 5 Nov 2017 06:24:53 +0000 (15:24 +0900)
Update the standard qa suite cluster configs so that we continue
asserting in our nightlies, but users don't hit this.

Fixes: http://tracker.ceph.com/issues/21737
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 165b61a7df2731602e9e28c5107a873444bf0507)

src/common/options.cc
src/common/shared_cache.hpp

index 71f58a35f1b7d4d606e381bf619139a627ef9081..91ee0446218fce6e0a544c01729aa2ed871b3677 100644 (file)
@@ -4212,6 +4212,10 @@ std::vector<Option> get_global_options() {
     Option("debug_deliberately_leak_memory", Option::TYPE_BOOL, Option::LEVEL_DEV)
     .set_default(false)
     .set_description(""),
+      
+    Option("debug_asserts_on_shutdown", Option::TYPE_BOOL,Option::LEVEL_DEV)
+    .set_default(false)
+    .set_description("Enable certain asserts to check for refcounting bugs on shutdown; see http://tracker.ceph.com/issues/21738"),
   });
 }
 
index 3332bd4f00ac0d171ddf7f15780727a78375edcd..8d923eefc4de72ed2f677141c86ac922c494a286 100644 (file)
@@ -105,7 +105,9 @@ public:
       lderr(cct) << "leaked refs:\n";
       dump_weak_refs(*_dout);
       *_dout << dendl;
-      assert(weak_refs.empty());
+      if (cct->_conf->get_val<bool>("debug_asserts_on_shutdown")) {
+       assert(weak_refs.empty());
+      }
     }
   }