]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
tests: TestErasureCodePluginJerasure must stop the log thread 11721/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 1 Nov 2016 11:24:56 +0000 (12:24 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 1 Nov 2016 12:33:08 +0000 (13:33 +0100)
commit17fe16d46188c01fce4ca8f4581fab3807a9b0f1
treee965ac461aad65f56a0f76a3057ded4c7aa1e6fd
parent7b7d0984f020a2ab5c0107af22839847de032315
tests: TestErasureCodePluginJerasure must stop the log thread

When a log entry is created in dout.h, it holds a pointer to the

   static size_t _log_exp_length

variable. When OnExitManager::~OnExitManager from Log.cc is called
during global destruction, it may happen after the static variables
referenced by some entries have been deallocated. The flush() function
will try to access these deallocated variables via the hint_size()
method and core dump.

To prevent this race, the Log::stop() method must be called explicitly
to ensure no entries are left when the global destructors are called.

Fixes: http://tracker.ceph.com/issues/17561
Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/erasure-code/CMakeLists.txt
src/test/erasure-code/TestErasureCodePluginJerasure.cc