From ee50056b4421500d187e28edc49461ee9569002e Mon Sep 17 00:00:00 2001 From: Samarah Date: Wed, 17 Jan 2024 16:05:02 +0000 Subject: [PATCH] rgw/asio: Add asserts to ensure asio isn't running during `run` and `stop` calls Signed-off-by: Samarah --- src/rgw/rgw_asio_frontend.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 1e443a84f90d..cdc7f840da7c 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; -- 2.47.3