]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/crimson/perf_crimson_msgr: init ConfigPorxy when pref_crimson_msgr start running
authorluo rixin <luorixin@huawei.com>
Mon, 11 Jul 2022 02:28:58 +0000 (10:28 +0800)
committerluo rixin <luorixin@huawei.com>
Mon, 11 Jul 2022 07:58:13 +0000 (15:58 +0800)
While constructing socket connections, there are some config items needed(
`ceph::msgr::v2::FrameAssembler` need the value of `common::local_conf()->ms_crc_data`,
Access `common::local_conf()->ms_crc_data` will cause SIGSEGV without the ConfigProxy init).
So adding ConfigPorxy init before pref_crimson_msgr start running.

Fixes: https://tracker.ceph.com/issues/56520
Signed-off-by: luo rixin <luorixin@huawei.com>
src/tools/crimson/perf_crimson_msgr.cc

index 2455582e7af334ee443c5dc8fbd559e27cdf8916..e2f1fd6b223c2af4065b603a9b7432765221fcbf 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "crimson/auth/DummyAuth.h"
 #include "crimson/common/log.h"
+#include "crimson/common/config_proxy.h"
 #include "crimson/net/Connection.h"
 #include "crimson/net/Dispatcher.h"
 #include "crimson/net/Messenger.h"
@@ -653,7 +654,10 @@ static seastar::future<> run(
 
   return seastar::when_all(
       test_state::Server::create(server_conf.core, server_conf.block_size),
-      create_sharded<test_state::Client>(client_conf.jobs, client_conf.block_size, client_conf.depth)
+      create_sharded<test_state::Client>(client_conf.jobs, client_conf.block_size, client_conf.depth),
+      crimson::common::sharded_conf().start(EntityName{}, std::string_view{"ceph"}).then([] {
+        return crimson::common::local_conf().start();
+      })
   ).then([=](auto&& ret) {
     auto fp_server = std::move(std::get<0>(ret).get0());
     auto client = std::move(std::get<1>(ret).get0());
@@ -703,6 +707,8 @@ static seastar::future<> run(
         return server->shutdown().then([cleanup = std::move(fp_server)] {});
       });
     }
+  }).finally([] {
+    return crimson::common::sharded_conf().stop();
   });
 }