Bug #28772 rpl_row_until fails in pushbuild
Submitted: 30 May 2007 10:35 Modified: 28 Jul 2008 18:41
Reporter: Mads Martin Joergensen Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S7 (Test Cases)
Version:5.1, 6.04 OS:Any
Assigned to: Serge Kozlov CPU Architecture:Any
Tags: pbfail

[30 May 2007 10:35] Mads Martin Joergensen
Description:
rpl_row_until fails in pushbuild

How to repeat:
https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=mysql-5.1&entry=tulin@whalegate....
[30 May 2007 14:32] Lars Thalmann
This is a bug in the test framework: mysqltest.c tests if either 
slave thread is not running, but needs to wait until *both* 
threads have stopped.

-----

Background:

mysqld.cc:

static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
{
  var->type= SHOW_MY_BOOL;
  pthread_mutex_lock(&LOCK_active_mi);
  var->value= buff;
  *((my_bool *)buff)= (my_bool) (active_mi && active_mi->slave_running &&
                                 active_mi->rli.slave_running);
  pthread_mutex_unlock(&LOCK_active_mi);
  return 0;
}

So, slave is not running (SHOW STATUS LIKE 'slave_running')
if *either* thread is not running.
[19 Jun 2007 11:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/29095

ChangeSet@1.2521, 2007-06-19 16:06:11+05:00, ramil@mysql.com +6 -0
  Fix for bug #28772: rpl_row_until fails in pushbuild
  
  Problem: we use 'sleep 2; wait_for_slave_to_stop;' to reach some slave's states
  which is buggy, wasteful of time, platform dependant etc.
  Fix: use include/wait_for_slave_***.inc's where it's possible instead.
[22 Jun 2007 18:07] Bugs System
Pushed into 5.1.20-beta
[2 Jul 2007 5:12] MC Brown
Internal change only; no changelog entry required.
[15 Oct 2007 21:29] Timothy Smith
I'm opening this one back up, as it is still happening.  At least, I assume it's the same bug (the link in the original bug description no longer works, so I can't check the old symptoms).

For example:

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=mysql-5.1-new-maint&order=787

rpl.rpl_row_until              [ fail ]

--- C:/cygwin/home/pushbuild/pb1/pb/mysql-5.1-new-maint/787/mysql-5.1.23-beta-pb787/mysql-test/suite/rpl/r/rpl_row_until.result	2007-10-15 08:39:46.000000000 +0300
+++ C:\cygwin\home\pushbuild\pb1\pb\mysql-5.1-new-maint\787\mysql-5.1.23-beta-pb787\mysql-test\suite\rpl\r\rpl_row_until.reject	2007-10-15 10:05:38.203125000 +0300
@@ -162,7 +162,7 @@
 Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
+Slave_IO_Running	No
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	

mysqltest: Result content mismatch
[26 Oct 2007 14:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36435

ChangeSet@1.2580, 2007-10-26 16:11:20+02:00, msvensson@pilot.mysql.com +2 -0
  Bug#28772 rpl_row_until fails in pushbuild
[27 Nov 2007 10:49] Bugs System
Pushed into 5.1.23-rc
[27 Nov 2007 10:52] Bugs System
Pushed into 6.0.4-alpha
[28 Nov 2007 9:27] Ingo Strüwing
Sorry, need to re-open. After pulling the fix from main into 6.0-engines, it happened again, this time on 'pb-valgrind-*':

rpl.rpl_row_until              [ fail ]

==26825== Memcheck, a memory error detector.
==26825== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==26825== Using LibVEX rev 1732, a library for dynamic binary translation.
==26825== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==26825== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==26825== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==26825== For more details, rerun with: -v
==26825== 
--- /home/pushbuild/pb1/pb/mysql-6.0-engines/49/mysql-6.0.4-alpha-pb49/mysql-test/suite/rpl/r/rpl_row_until.result	2007-11-28 04:53:39.000000000 +0300
+++ /home/pushbuild/pb1/pb/mysql-6.0-engines/49/mysql-6.0.4-alpha-pb49/mysql-test/suite/rpl/r/rpl_row_until.reject	2007-11-28 09:34:53.000000000 +0300
@@ -162,7 +162,7 @@
 Relay_Log_File	#
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
-Slave_IO_Running	Yes
+Slave_IO_Running	No
 Slave_SQL_Running	No
 Replicate_Do_DB	
 Replicate_Ignore_DB	

mysqltest: Result content mismatch

Please see pushbuild https://intranet.mysql.com/secure/pushbuild/showdir.pl?dir=mysql-6.0-engines
log https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=mysql-6.0-engines&entry=istruewi...

Disabling the test case for now. Please re-enable after fix.
[28 Nov 2007 10:23] Bugs System
Pushed into 6.0.4-alpha
[1 Apr 2008 20:35] Serge Kozlov
The issue happens if io_thread isn't started by START SLAVE UNTIL statement (may be sql_thread stopped too quickly). So suggested solution is start sql_thread only for testing of positions because all necessary events already are in relay log on slave.
[1 Apr 2008 20:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/44759

ChangeSet@1.2552, 2008-04-02 00:52:44+04:00, skozlov@mysql.com +2 -0
  Bug#28772
[2 Apr 2008 18:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/44806

ChangeSet@1.2552, 2008-04-02 22:50:54+04:00, skozlov@mysql.com +2 -0
  Bug#28772, added waiting Until_Log_Pos when slave starting with UNTIL clause and then waiting stop of slave. 
  It helps to avoid issues when slave starts too slowly.
[28 Jul 2008 18:19] Patrick Crews
Pushed into 5.1.28
Pushed into 6.0.7
[28 Jul 2008 18:41] Paul Dubois
Test case change. No changelog entry needed.
[30 Jan 2009 13:31] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:10] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:sp1r-skozlov/ksm@virtop.(none)-20080405065009-56269) (merge vers: 5.1.25-rc) (pib:6)
[17 Feb 2009 14:57] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:44] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:21] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)