From: luo rixin Date: Mon, 11 Jul 2022 02:28:58 +0000 (+0800) Subject: tools/crimson/perf_crimson_msgr: init ConfigPorxy when pref_crimson_msgr start running X-Git-Tag: v18.0.0~514^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4cdcf7f1559e0e1453f85253fe5c4bc5ef64a93d;p=ceph.git tools/crimson/perf_crimson_msgr: init ConfigPorxy when pref_crimson_msgr start running 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 --- diff --git a/src/tools/crimson/perf_crimson_msgr.cc b/src/tools/crimson/perf_crimson_msgr.cc index 2455582e7af33..e2f1fd6b223c2 100644 --- a/src/tools/crimson/perf_crimson_msgr.cc +++ b/src/tools/crimson/perf_crimson_msgr.cc @@ -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(client_conf.jobs, client_conf.block_size, client_conf.depth) + create_sharded(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(); }); }