[MDEV-29869] mtr failure: innodb.deadlock_wait_thr_race Created: 2022-10-25  Updated: 2023-10-03  Resolved: 2022-10-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6
Fix Version/s: 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2, 10.11.1

Type: Bug Priority: Critical
Reporter: Daniel Black Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None
Environment:

amd64-windows


Issue Links:
Problem/Incident
causes MDEV-30531 Corrupt index(es) on busy table when ... Closed
is caused by MDEV-29622 Wrong assertions in lock_cancel_waiti... Closed

 Description   

mtr failure:

 
CURRENT_TEST: innodb.deadlock_wait_thr_race
mysqltest: At line 61: query 'reap' failed: ER_LOCK_WAIT_TIMEOUT (1205): Lock wait timeout exceeded; try restarting transaction
 
The result from queries just before the failure was:
< snip >
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET DEBUG_SYNC = 'lock_trx_handle_wait_enter SIGNAL upd_locked WAIT_FOR upd_cont';
SET DEBUG_SYNC = 'trx_t_release_locks_enter SIGNAL sel_cont WAIT_FOR upd_cont_2';
BEGIN;
UPDATE t SET b = 100;
connection default;
SET DEBUG_SYNC="now WAIT_FOR upd_locked";
SET DEBUG_SYNC="deadlock_report_before_lock_releasing SIGNAL upd_cont WAIT_FOR sel_cont";
SET DEBUG_SYNC="lock_wait_before_suspend SIGNAL sel_before_suspend";
SELECT * FROM t WHERE a = 10 FOR UPDATE;;
connect con_3,localhost,root,,;
SET DEBUG_SYNC="now WAIT_FOR sel_before_suspend";
Warnings:
Warning	1639	debug sync point wait timed out
SET DEBUG_SYNC="now SIGNAL upd_cont_2";
disconnect con_3;
connection con_2;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
disconnect con_2;
connection default;
 
More results from queries before failure can be found in D:\Buildbot\amd64-windows\build\mysql-test\var\12\log\deadlock_wait_thr_race.log



 Comments   
Comment by Marko Mäkelä [ 2022-10-25 ]

Also the test innodb.deadlock_wait_lock_race would easily hang on my Debian GNU/Linux system when I run ./mtr --parallel=60 --big-test --force. On this system, nproc reports 40 (hyper)threads.

The amd64-windows builder has very many CPU cores. There could be some race condition in the test. On a system with significantly fewer cores, perhaps running with innodb_purge_threads=1 would improve reproducibility?

Generated at Thu Feb 08 10:11:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.