From 5c1e9ca0ece709f3463b42898e04f9de1c828224 Mon Sep 17 00:00:00 2001 From: Yury Luneff Date: Tue, 20 Oct 2026 10:40:47 +0300 Subject: [PATCH] Fix vitastor-cli osd-tree crash when the etcd request fails load_osd_tree() stored the etcd error, but loop() still called format_tree() which dereferenced the placement tree that was never built, so osd-tree and ls-osd died with SIGSEGV. Return the error instead. --- src/cmd/cli_osd_tree.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/cli_osd_tree.cpp b/src/cmd/cli_osd_tree.cpp index 211f7d9d..a2c8017e 100644 --- a/src/cmd/cli_osd_tree.cpp +++ b/src/cmd/cli_osd_tree.cpp @@ -412,6 +412,8 @@ resume_1: load_osd_tree(); if (parent->waiting > 0) return; + if (state == 100) + return; format_tree(); state = 100; } -- 2.47.3