[MDEV-29515] innodb.deadlock_victim_race is unstable Created: 2022-09-12  Updated: 2022-09-20  Resolved: 2022-09-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0
Fix Version/s: 10.6.10, 10.7.6, 10.8.5, 10.9.3, 10.10.2, 10.11.0

Type: Bug Priority: Major
Reporter: Vladislav Lesin Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-29081 trx_t::lock.was_chosen_as_deadlock_vi... Closed

 Description   

innodb.deadlock_victim_race 'innodb'     w3 [ fail ]
        Test ended at 2022-09-01 13:58:59
 
CURRENT_TEST: innodb.deadlock_victim_race
mysqltest: At line 79: query 'SELECT * FROM t WHERE a = 10 FOR UPDATE' succeeded - should have failed with error ER_LOCK_WAIT_TIMEOUT (1205)...



 Comments   
Comment by Vladislav Lesin [ 2022-09-16 ]

The instability can be repeated with the following script:

#!/bin/bash                                                                     
                                                                                
runOutputScript() {                                                             
  local num=$1                                                                  
  echo "Running output script: ${num}"                                          
    ./mtr --force --max-test-fail=1 --suite-timeout=999999999 --testcase-timeout=99999999 --parallel=1 --debug-sync-timeout=30 --repeat=1000 --vardir=$PWD/var-$num innodb.deadlock_victim_race > $PWD/out-$num 2>&1
}                                                                               
                                                                                
trap "exit" INT TERM ERR                                                        
trap "kill 0" EXIT                                                              
                                                                                
i=300                                                                           
while [ $i -ne 0 ];                                                             
do                                                                              
  runOutputScript $i &                                                          
  i=$[$i-1]                                                                     
done                                                                            
                                                                                
wait 

As we can't develop test for test, the above script can be used to check if the fix works.

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