From 362bcdc86ab7c4828e4bd39c1442c5a55ebb147c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20G=C3=B6dderz?= Date: Mon, 8 Sep 2025 16:10:40 +0200 Subject: [PATCH] [BTS-2219] Fix assertion: A freshly constructed Thread must be safe to destroy (#21939) * Fix assertion: A freshly constructed Thread must be safe to destroy * Added CHANGELOG entry --- CHANGELOG | 4 ++++ lib/Basics/Thread.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 88b66da1dc93..2fe53e7bb02b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ devel ----- +* Fix BTS-2219: Fix possible crashes with the log id [80e0e] and corresponding + message + "thread '' is not stopped but created. shutting down hard". + * Fix BTS-2217: If an error happens during startup, a disabled feature can lead to a crash. Additionally signal that the server is stopping during the unexpected shutdown so that in particular the RocksDBSyncThread does diff --git a/lib/Basics/Thread.cpp b/lib/Basics/Thread.cpp index a04e2e455dc5..16b33eedc4ae 100644 --- a/lib/Basics/Thread.cpp +++ b/lib/Basics/Thread.cpp @@ -220,7 +220,7 @@ Thread::~Thread() { LOG_TOPIC("944b1", TRACE, Logger::THREADS) << "delete(" << _name << "), state: " << stringify(state); - if (state != ThreadState::STOPPED) { + if (state != ThreadState::STOPPED && state != ThreadState::CREATED) { LOG_TOPIC("80e0e", FATAL, arangodb::Logger::FIXME) << "thread '" << _name << "' is not stopped but " << stringify(state) << ". shutting down hard";