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>
(cherry picked from commit
81bd13981a1e020578335ca61bba0db05848631b)
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;