From 1b581c7523261e54bea7e44ed8d0731aa91d1995 Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Mon, 16 Dec 2024 14:38:35 +0800 Subject: [PATCH] [VL] Fix crash when there are unreleased memory pools during termintating a Velox task (#8243) A quick fix for a crash issue introduced by #8223. Error: terminate called after throwing an instance of 'gluten::GlutenException' what(): Unreachable code --- cpp/velox/memory/VeloxMemoryManager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/velox/memory/VeloxMemoryManager.cc b/cpp/velox/memory/VeloxMemoryManager.cc index 101a9db4a889..597ce1c9da37 100644 --- a/cpp/velox/memory/VeloxMemoryManager.cc +++ b/cpp/velox/memory/VeloxMemoryManager.cc @@ -336,7 +336,8 @@ bool VeloxMemoryManager::tryDestructSafe() { // Velox memory manager considered safe to destruct when no alive pools. if (veloxMemoryManager_) { if (veloxMemoryManager_->numPools() > 3) { - GLUTEN_CHECK(false, "Unreachable code"); + VLOG(2) << "Attempt to destruct VeloxMemoryManager failed because there are " << veloxMemoryManager_->numPools() + << " outstanding memory pools."; return false; } if (veloxMemoryManager_->numPools() == 3) {