Bug #50473 rpl_sync fails on windows debug enabled binaries
Submitted: 20 Jan 2010 13:07 Modified: 4 Aug 2010 10:57
Reporter: Luis Soares Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:Betony (M2), Celosia (M3) OS:Windows
Assigned to: Luis Soares CPU Architecture:Any
Tags: experimental, pb2, test failure

[20 Jan 2010 13:07] Luis Soares
Description:
rpl_sync fails with the following symptom in windows debug enabled binaries:

rpl.rpl_sync [ fail ]
        Test ended at 2010-01-20 04:50:54

CURRENT_TEST: rpl.rpl_sync
The process cannot access the file because it is being used by another process.
mysqltest: At line 68: command "echo "failure" > $MYSQLD_SLAVE_DATADIR/$file" failed

Output from before failure:
exec of 'H:\pb2\test\sb_2-1197833-1263954695.27\mysql-5.5.99-m3-win-x86_64-test\client\debug\\echo.exe "failure" > H:/pb2/test/sb_2-1197833-1263954695.27/mysql-5.5.99-m3-win-x86_64-test/mysql-test/var-ps_row/mysqld.2/data//slave-relay-bin.000003' failed, error: 1, status: 1, errno: 0

The result from queries just before the failure was:
=====Configuring the enviroment=======;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
call mtr.add_suppression('Attempting backtrace');
call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001");
CREATE TABLE t1(a INT, PRIMARY KEY(a)) engine=innodb;
insert into t1(a) values(1);
insert into t1(a) values(2);
insert into t1(a) values(3);
=====Inserting data on the master but without the SQL Thread being running=======;
stop slave SQL_THREAD;
insert into t1(a) values(4);
insert into t1(a) values(5);
insert into t1(a) values(6);
=====Removing relay log files and crashing/recoverying the slave=======;
stop slave IO_THREAD;

Warnings from just before the error:
Note 1051 Unknown table 't1' 
Note 1051 Unknown table 't2' 
Note 1051 Unknown table 't3' 
Note 1051 Unknown table 't4' 
Note 1051 Unknown table 't5' 
Note 1051 Unknown table 't6' 
Note 1051 Unknown table 't7' 
Note 1051 Unknown table 't8'

 - saving 'H:/pb2/test/sb_2-1197833-1263954695.27/mysql-5.5.99-m3-win-x86_64-test/mysql-test/var-ps_row/log/rpl.rpl_sync/' to 'H:/pb2/test/sb_2-1197833-1263954695.27/mysql-5.5.99-m3-win-x86_64-test/mysql-test/var-ps_row/log/rpl.rpl_sync/'

Retrying test, attempt(2/3)...

How to repeat:
It happend (at least) on this push:
http://pb2.norway.sun.com/web.py?template=push_details&push=841103

and the output can be seen by inspecting the log:
http://pb2.norway.sun.com/web.py?action=archive_download&archive_id=1208690&pretty=please

Suggested fix:
n/a
[20 Jan 2010 15:17] Alexander Nozdrin
Making the test case experimental staring from Celosia (next-mr).
[20 Jan 2010 18:39] 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/97639

2961 Luis Soares	2010-01-20
      BUG#50473: rpl_sync fails on windows debug enabled binaries
      
      The test case was failing because it contained instructions
      to close/reopen files, when they were in use. This raises
      problems in windows. Example of such instruction:
      
      ---exec echo "failure" > $MYSQLD_SLAVE_DATADIR/$file
      
      The test also contains commands that are not platform 
      agnostic. Example:
      
      --exec cat $MYSQLD_SLAVE_DATADIR/master.backup > \
                 $MYSQLD_SLAVE_DATADIR/master.info
      
      We fix this by just truncating the necessary file and write
      "failure" into it (ie, without closing the file). The
      platform specific instruction is removed from the test
      case as it seems redundant.
[31 Jan 2010 11:34] Alexander Nozdrin
Marking the test case experimental in TRUNK (M2).
[13 Feb 2010 8:37] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100213083436-9pesg4h55w1mekxc) (version source revid:luis.soares@sun.com-20100126101928-0jbc7dhfaxjib0v5) (merge vers: 6.0.14-alpha) (pib:16)
[13 Feb 2010 8:38] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100213083327-cee4ao3jpg33eggv) (version source revid:luis.soares@sun.com-20100126100856-nrl0jmkc9s2cg8ck) (pib:16)
[13 Feb 2010 10:25] Jon Stephens
Changes in test code only.

Closed without further action.
[15 Feb 2010 12:09] 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/100362

3173 Luis Soares	2010-02-15
      Ported BUG#50473 and BUG#50474 to mysql-5.1-rep+2.
      
      revid:luis.soares@sun.com-20100126100856-nrl0jmkc9s2cg8ck
      
      Conflicts
      =========
        Text conflict in sql/log_event.cc
[6 Mar 2010 10:56] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100213160132-nx1vlocxuta76txh) (merge vers: 5.5.99-m3) (pib:16)
[8 Mar 2010 20:25] Jon Stephens
Changes in test code only.

Closed without further action.
[24 Mar 2010 8:14] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100324081249-yfwol7qtcek6dh7w) (version source revid:alik@sun.com-20100324081113-kc7x1iytnplww91u) (merge vers: 6.0.14-alpha) (pib:16)
[24 Mar 2010 8:17] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100324081159-5b8juv8ldiqwce8v) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (pib:16)
[24 Mar 2010 16:56] Paul DuBois
No changelog entry needed.
[4 Aug 2010 8:05] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (merge vers: 5.6.99-m4) (pib:18)
[4 Aug 2010 8:21] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:alik@sun.com-20100324081105-y72rautcea375zxm) (merge vers: 5.6.99-m4) (pib:18)
[4 Aug 2010 10:57] Jon Stephens
Set back to Closed status; see previous comments from Paul and me.