Reorder monitor shutdown to ensure all SyncProvider iterators are
destroyed before the underlying mon store is closed. This avoids
iterator cleanup paths entering RocksDB internals after the DB has
already been closed, which can result in mutex lock failures and process aborts.
Fixes: https://tracker.ceph.com/issues/75834
Signed-off-by: Prashant D <pdhange@redhat.com>
msgr->wait();
mgr_msgr->wait();
- store.close();
-
unregister_async_signal_handler(SIGHUP, handle_mon_signal);
unregister_async_signal_handler(SIGINT, handle_mon_signal);
unregister_async_signal_handler(SIGTERM, handle_mon_signal);
shutdown_async_signal_handler();
+ // Destroy the Monitor (and its iterators) before closing the store.
delete mon;
+ store.close();
+
delete msgr;
delete mgr_msgr;