percona-server slave crashes when applying row-based binlog entries in cascading replication for Merge storage engine
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Invalid
|
Undecided
|
Unassigned | |||
5.5 |
Fix Released
|
Medium
|
Unassigned | |||
5.6 |
Fix Released
|
Medium
|
Unassigned | |||
5.7 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In cascading replication setup (master -> master/slave -> slave), a slave server crashes when applying row-based binlog entries that change data in Merge engine tables. Note that master/slave server (in the setup described) won't crash, only the slave (the last one in chain) crashes.
Steps to reproduce:
- establish cascading replication between three servers: "master" -> "master/slave" -> "slave" (here, "master/slave" has both binlogs/relaylogs enabled).
- create database 'mergetest' on "master" (it will propagate across all the slaves)
- create two myisam tables, t_1 and t_2, and table t, a merge table:
create table t_1 (id int primary key auto_increment, data varchar(200)) ENGINE=MyISAM;
create table t_2 (id int primary key auto_increment, data varchar(200)) ENGINE=MyISAM;
create table t (id int primary key auto_increment, data varchar(200)) ENGINE=MERGE UNION=(t_1,t_2) INSERT_
- fill the table with some data:
insert into t (data) values ('robor'), ('tobor'), ('dobor'), ('borbor');
- force the row-based binlog entry (or make sure binlog_format is set to 'row'):
update t set data = 'changed' limit 1;
This update is propagated to the "master/slave" server with no issues, however, the "slave" server crashes when trying to apply it. Here is the excerpt from the slave's error log file:
------------
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fe541da99d0 thread_stack 0x40000
/usr/sbin/
/usr/sbin/
/lib/x86_
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/x86_
/lib/x86_
-------------
This is verified and reproducible on:
Debian Squeeze with percona-
Debian Wheezy with percona-
Debian Wheezy with percona-
It is not reproducible with percona-server-5.1 (5.1.69-
This bug seems(!) like a duplicate of http://
Attached file are my.cnf from all three servers (server_id and report_host is the only difference between the three files, and slav-only server doesn't have binlogs enabled) as well as error.log file from the slave (the last in the chain).
Cascading setup is used quite often in master-master setup scenarios where each master have several read-only slaves attached to it.
tags: | added: upstream |
I was able to reproduce this as described with PS 5.6.11 on a sandbox circular replication setup created like this:
make_replicatio n_sandbox --circular=4 /home/openxs/ builds/ Percona- Server- 5.6.11- rc60.3- 387-valgrind. Linux.i686. tar.gz
This is what I see in the error log on node3:
... sandbox15103- relay-bin. 000002' position: 8443 bugs.percona. com/
2013-06-25 16:10:39 5836 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000001' at position 10825, relay log './mysql_
13:10:39 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Please help us make Percona Server better by reporting any
bugs at http://
key_buffer_ size=8388608 size=131072 connections= 1 size)*max_ threads = 68426 K bytes of memory
read_buffer_
max_used_
max_threads=153
thread_count=3
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0xab74cd0 builds/ 5.6.11/ bin/mysqld( my_print_ stacktrace+ 0x33)[0x855e3b3 ] builds/ 5.6.11/ bin/mysqld( handle_ fatal_signal+ 0x4aa)[ 0x830040a] builds/ 5.6.11/ bin/mysqld[ 0x851ef6d] builds/ 5.6.11/ bin/mysqld( _ZNK9table_ def15compatible _withEP3THDP14R elay_log_ infoP5TABLEPS5_ +0xc2)[ 0x8520432] builds/ 5.6.11/ bin/mysqld( _ZN14Rows_ log_event14do_ apply_eventEPK1 4Relay_ log_info+ 0x765)[ 0x8506de5] builds/ 5.6.11/ bin/mysqld( _ZN9Log_ event11apply_ eventEP14Relay_ log_info+ 0x57)[0x85018e7 ] builds/ 5.6.11/ bin/mysqld( _Z26apply_ event_and_ update_ posPP9Log_ eventP3THDP14Re lay_log_ info+0x1b7) [0x852b907] builds/ 5.6.11/ bin/mysqld[ 0x8531740] builds/ 5.6.11/ bin/mysqld( handle_ slave_sql+ 0x726)[ 0x8535346] builds/ 5.6.11/ bin/mysqld( pfs_spawn_ thread+ 0x209)[ 0x85ebb19] linux-gnu/ i686/cmov/ libpthread. so.0(+0x5c39) [0xb778dc39] linux-gnu/ i686/cmov/ libc.so. 6(clone+ 0x5e)[0xb737078 e]
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = ffffffffa5951ef4 thread_stack 0x30000
/home/openxs/
/home/openxs/
[0xb77ac400]
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/home/openxs/
/lib/i386-
/lib/i386-
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 4
Status: NOT_KILLED
...