From: Samarah Date: Wed, 17 Jan 2024 16:05:02 +0000 (+0000) Subject: rgw/asio: Add asserts to ensure asio isn't running during `run` and X-Git-Tag: v19.3.0~171^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee50056b4421500d187e28edc49461ee9569002e;p=ceph.git rgw/asio: Add asserts to ensure asio isn't running during `run` and `stop` calls Signed-off-by: Samarah --- diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 1e443a84f90..cdc7f840da7 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -1069,6 +1069,8 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec) int AsioFrontend::run() { + ceph_assert(!is_asio_thread); + auto cct = ctx(); const int thread_count = cct->_conf->rgw_thread_pool_size; threads.reserve(thread_count); @@ -1093,6 +1095,8 @@ int AsioFrontend::run() void AsioFrontend::stop() { + ceph_assert(!is_asio_thread); + ldout(ctx(), 4) << "frontend initiating shutdown..." << dendl; going_down = true;