Skip to content

Commit 093227c

Browse files
mkaruzaJan Lindström
authored andcommitted
MDEV-25410 Assertion `state_ == s_exec' failed - mysqld got signal 6
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 <jan.lindstrom@mariadb.com>
1 parent 386ac12 commit 093227c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sql/wsrep_thd.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ bool wsrep_bf_abort(const THD* bf_thd, THD* victim_thd)
349349
if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
350350
{
351351
WSREP_DEBUG("wsrep_bf_abort, BF abort for non active transaction");
352+
switch (victim_thd->wsrep_trx().state())
353+
{
354+
case wsrep::transaction::s_aborting: /* fall through */
355+
case wsrep::transaction::s_aborted:
356+
WSREP_DEBUG("victim thd is already aborted or in aborting state.");
357+
return false;
358+
default:
359+
break;
360+
}
352361
wsrep_start_transaction(victim_thd, victim_thd->wsrep_next_trx_id());
353362
}
354363

0 commit comments

Comments
 (0)