You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by cs...@apache.org on 2026/10/07 12:30:37 UTC

(impala) branch master updated: IMPALA-15318: Stop impalads before clearing custom-cluster tmp dirs

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 60c28011e IMPALA-15318: Stop impalads before clearing custom-cluster tmp dirs
60c28011e is described below

commit 60c28011ec727ff17817546cbc267bb7834fe979
Author: Daniel Vanko <dv...@cloudera.com>
AuthorDate: Fri Aug 28 15:18:08 2026 +0200

    IMPALA-15318: Stop impalads before clearing custom-cluster tmp dirs
    
    _impala_cluster_teardown() cleared the tmp dirs (e.g. the
    --lineage_event_log_dir target) while impalads were still running, so
    the lineage flush thread aborted the daemon
    (abort_on_failed_lineage_event=true) -- an ASAN use-after-free in CI.
    Now stop the impalads first: a hard kill for tmp-dir tests, a graceful
    shutdown only for workload_mgmt (to flush query-log rows), and skip both
    when no cluster was expected to start (so no clients are closed).
    
    Change-Id: I88642ca68db3d3237f97cd1ef095e7c85081c965
    Assisted-by: Claude Opus 4.8 (Claude Code)
    Reviewed-on: http://gerrit.cloudera.org:8080/24764
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Xuebin Su <xs...@cloudera.com>
    Reviewed-by: Peter Rozsa <pr...@cloudera.com>
---
 tests/common/custom_cluster_test_suite.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/common/custom_cluster_test_suite.py b/tests/common/custom_cluster_test_suite.py
index 72a7f3108..bafa7a943 100644
--- a/tests/common/custom_cluster_test_suite.py
+++ b/tests/common/custom_cluster_test_suite.py
@@ -480,9 +480,21 @@ class CustomClusterTestSuite(ImpalaTestSuite):
 
   @classmethod
   def _impala_cluster_teardown(cls, name, args):
-    if args.get(WORKLOAD_MGMT, False):
+    # Stop impalads before clear_tmp_dirs() deletes dirs they write to, but only if the
+    # cluster was expected to start (else no clients exist). WORKLOAD_MGMT needs a
+    # graceful shutdown to flush query-log rows; other TMP_DIRS tests just hard-kill,
+    # avoiding the lineage flush thread aborting on a vanished dir (and the
+    # graceful-shutdown membership crash).
+    started = not args.get(EXPECT_CORES, False) \
+        and not args.get(EXPECT_STARTUP_FAIL, False)
+    if started and args.get(WORKLOAD_MGMT, False):
       cls.close_impala_clients()
       cls.cluster.graceful_shutdown_impalads()
+    elif started and cls.TMP_DIRS:
+      cls.close_impala_clients()
+      cls.cluster.refresh()
+      for impalad in cls.cluster.impalads:
+        impalad.kill_and_wait_for_exit()
 
     cls.clear_tmp_dirs()