From 9c0582d1afbe4d7d28c2e2e2224a2d96889671d7 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 2 Feb 2021 19:04:37 +0000 Subject: The StateManager is destructed before the FileStorManager leading to possibly accesing invalid memory. Disconnecting upcalls must happen during close. --- .../src/vespa/storage/persistence/filestorage/filestormanager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'storage/src') diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp index a46b4205570..e108f89b193 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include "filestorhandlerimpl.h" #include "filestormanager.h" +#include "filestorhandlerimpl.h" #include #include #include @@ -76,6 +76,8 @@ FileStorManager(const config::ConfigUri & configUri, spi::PersistenceProvider& p _configFetcher(configUri.getContext()), _use_async_message_handling_on_schedule(false), _metrics(std::make_unique()), + _filestorHandler(), + _sequencedExecutor(), _closed(false), _lock(), _host_info_reporter(_component.getStateUpdater()), @@ -810,6 +812,8 @@ FileStorManager::sendUp(const std::shared_ptr& msg) void FileStorManager::onClose() { LOG(debug, "Start closing"); + _bucketExecutorRegistration.reset(); + _resource_usage_listener_registration.reset(); // Avoid getting config during shutdown _configFetcher.close(); LOG(debug, "Closed _configFetcher."); -- cgit v1.2.3