summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-02-02 19:04:37 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-02-02 19:08:05 +0000
commit9c0582d1afbe4d7d28c2e2e2224a2d96889671d7 (patch)
tree900f0304a189bcea198a2487b975682af3a9ba77 /storage
parenta392c1c33a5e0983e62610cf04ff99414d6b0ffc (diff)
The StateManager is destructed before the FileStorManager leading to possibly accesing invalid memory. Disconnecting upcalls must happen during close.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp6
1 files changed, 5 insertions, 1 deletions
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 <vespa/storage/bucketdb/minimumusedbitstracker.h>
#include <vespa/storage/common/bucketmessages.h>
#include <vespa/storage/common/content_bucket_space_repo.h>
@@ -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<FileStorMetrics>()),
+ _filestorHandler(),
+ _sequencedExecutor(),
_closed(false),
_lock(),
_host_info_reporter(_component.getStateUpdater()),
@@ -810,6 +812,8 @@ FileStorManager::sendUp(const std::shared_ptr<api::StorageMessage>& 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.");