[MDEV-22957] multi_source.multi_source_slave_alias_replica fails in buildbot with wrong result Created: 2020-06-19  Updated: 2020-11-12  Resolved: 2020-11-12

Status: Closed
Project: MariaDB Server
Component/s: Replication, Tests
Affects Version/s: 10.5
Fix Version/s: 10.5.9

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sujatha Sivakumar (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-4633 multi_source.simple test fails sporad... Closed

 Description   

http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest/builds/24098/steps/mtr_nm/logs/stdio

10.5 ad5edf3c1582223a17abdcb6534cd7345767f4c8

multi_source.multi_source_slave_alias_replica w4 [ fail ]
        Test ended at 2020-06-14 04:47:07
 
CURRENT_TEST: multi_source.multi_source_slave_alias_replica
--- /mnt/buildbot/build/mariadb-10.5.4/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result	2020-06-14 03:29:15.000000000 -0400
+++ /mnt/buildbot/build/mariadb-10.5.4/mysql-test/suite/multi_source/multi_source_slave_alias_replica.reject	2020-06-14 04:47:07.603552059 -0400
@@ -105,7 +105,7 @@
 Last_Error	
 Skip_Counter	0
 Exec_Master_Log_Pos	<read_master_log_pos>
-Relay_Log_Space	<relay_log_space1>
+Relay_Log_Space	917
 Until_Condition	None
 Until_Log_File	
 Until_Log_Pos	0
 
mysqltest: Result length mismatch



 Comments   
Comment by Sujatha Sivakumar (Inactive) [ 2020-08-27 ]

This issue is duplicate of MDEV-4633

Writes to 'rli->log_space_total' needs to be synchronized. All modifications to 'rli->log_space_total' should be performed by holding 'rli->log_space_lock'. But IO thread doesn't acquire this mutex while writing events to relay log.
Hence there is a race condition between SQL THREAD and IO THREAD, when both try to modify the same variable. SQL_THREAD is trying to decrement 'rli->log_space_total' in 'purge_first_log' and IO_THREAD is trying to increment the 'rli->log_space_total' in 'queue_event' simultaneously . Hence test occasionally fails with result mismatch.

Comment by Sujatha Sivakumar (Inactive) [ 2020-11-12 ]

Fix is implemented as part of MDEV-4633.

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