From 093227c05e27083c32dbd51b7f146aabe6429291 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Mon, 26 Jul 2021 09:37:38 +0200 Subject: [PATCH] MDEV-25410 Assertion `state_ == s_exec' failed - mysqld got signal 6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Victim threads which are in currently in process of aborting or already aborted should be skipped for another kill process. Reviewed-by: Jan Lindström --- sql/wsrep_thd.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 023da27c3c1..d8f3d8959e0 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -349,6 +349,15 @@ bool wsrep_bf_abort(const THD* bf_thd, THD* victim_thd) if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active()) { WSREP_DEBUG("wsrep_bf_abort, BF abort for non active transaction"); + switch (victim_thd->wsrep_trx().state()) + { + case wsrep::transaction::s_aborting: /* fall through */ + case wsrep::transaction::s_aborted: + WSREP_DEBUG("victim thd is already aborted or in aborting state."); + return false; + default: + break; + } wsrep_start_transaction(victim_thd, victim_thd->wsrep_next_trx_id()); }