[MDEV-18213] Unexpected ER_LOCK_DEADLOCK upon BACKUP STAGE BLOCK_COMMIT Created: 2019-01-11  Updated: 2021-05-11

Status: Open
Project: MariaDB Server
Component/s: Backup, Locking
Affects Version/s: 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-18643 'BACKUP STAGE BLOCK_DDL ' failed: 121... Open
Problem/Incident
is caused by MDEV-5336 Implement BACKUP STAGE for safe exter... Closed

 Description   

Note: The test case currently fails for me every time, but it's still a race condition, so it can vary on different machines and builds. Run with --repeat=N if it doesn't fail right away. We can also convert it into a concurrent test if necessary.

CREATE TABLE t1 (a INT) ENGINE=MyISAM;
 
--connect (con1,localhost,root,,test)
BACKUP STAGE START;
--send
  BACKUP STAGE BLOCK_COMMIT;
 
--connection default
SET lock_wait_timeout= 1;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 ADD INDEX (a);
 
--connection con1
--reap
 
# Cleanup
--disconnect con1
--connection default
DROP TABLE t1;

10.4 301bd62b253

mysqltest: At line 14: query 'reap' failed: 1213: Deadlock found when trying to get lock; try restarting transaction

The most important effect is that MariaBackup backup might fail with the deadlock error.


Generated at Thu Feb 08 08:42:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.