]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: by default, do not assert on leaks in the shared_cache code 18201/head
authorGreg Farnum <gfarnum@redhat.com>
Mon, 9 Oct 2017 21:16:05 +0000 (14:16 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Mon, 9 Oct 2017 21:16:05 +0000 (14:16 -0700)
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>
src/common/options.cc
src/common/shared_cache.hpp

index 5b8a4da681725adf4d85f72113921e2a5b80ff84..8d975c5d7914d446f76a09ca82de5e83f90672dd 100644 (file)
@@ -4222,6 +4222,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());
+      }
     }
   }