Skip to content

Commit

Permalink
[VL] Fix crash when there are unreleased memory pools during terminta…
Browse files Browse the repository at this point in the history
…ting 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
  • Loading branch information
zhztheplayer authored Dec 16, 2024
1 parent 08bdb42 commit 1b581c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/velox/memory/VeloxMemoryManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1b581c7

Please sign in to comment.