mariadb/mysql-test/suite/rpl
Andrei Elkin a1bc50e18a MDEV-37453 Parallel slave worker crashes during Backup at retrying
In the BASE of this patch when a slave parallel worker proceeds from
the wait-for-prior-commit stage into retrying it may have its
backup-lock related sub-state, specifically `THD::backup_commit_lock`,
not reset, that is the pointer dangling.

That caused segfault at the pointer's dereferencing in the worker retrying.

The reason THD::backup_commit_lock is left dangling was unexpected
state of THD having non-NULL of `THD::backup_commit_lock` and NULL of `mdl_backup.ticket`.
This combination turns out possible when the slave worker is killed
for retry *and* few instruction later it does not succeed
to (re-)acquire the Backup MDL at exiting from
   `MYSQL_BIN_LOG::queue_for_group_commit()`.
While it did not succeed it also did not expose that fact with
timing out from `MDL_context::acquire_lock` and it did not have to,
as it before to start waiting it found itself killed.

The bug is fixed with amendment of `backup_commit_lock` reset condition
at the end of `ha_commit_trans()`. The amended reset remains careful to
affect only the stack allocated lock.

A test is added to confirm the fixes with reproducing all stages
described above. In the patch BASE it causes the segfault.
2025-10-17 15:46:53 +03:00
..
extension mtr: use env for perl 2020-06-23 03:24:46 +02:00
include Merge 10.5 -> 10.6 2024-12-05 09:20:36 +01:00
r MDEV-37453 Parallel slave worker crashes during Backup at retrying 2025-10-17 15:46:53 +03:00
t MDEV-37453 Parallel slave worker crashes during Backup at retrying 2025-10-17 15:46:53 +03:00
disabled.def MDEV-17390: re-neable rpl_semi_sync_after_sync test 2022-06-17 19:38:43 +03:00
my.cnf Remove duplicated default client include from replication my.cnf 2023-09-14 12:56:41 +02:00
README
rpl_1slave_base.cnf

How to run.
===========

./mysql-test-run.pl --suite=rpl --mysqld=--binlog-format=mixed