Not the answer you need?
Register and ask your own question!

Percona XtraDB and crash-safe replication

HTF1HTF1 ContributorInactive User Role Advisor
Hi,

Is it possible to enable crash-safe replication on Percona XtraDB cluster?

When I tried to add the following variables the MySQL server refuses to start and it constantly print the same message in the error log:

/etc/my.cnf
...
relay_log_info_repository = TABLE
relay_log_recovery = 1
...

Error log:
09:15:57 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 XtraDB Cluster better by reporting any
bugs at https://bugs.launchpad.net/percona-xtradb-cluster

key_buffer_size=268435456
read_buffer_size=131072
max_used_connections=0
max_threads=502
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1362007 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x423ecc0
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 = 7fff207f09a8 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x902645]
/usr/sbin/mysqld(handle_fatal_signal+0x4c4)[0x6801e4]
/lib64/libpthread.so.0(+0xf710)[0x7ff1bd202710]
/usr/sbin/mysqld[0x95cd5f]
/usr/sbin/mysqld(_ZN11ha_innobase17wsrep_append_keysEP3THDbPKhS3_+0x4c3)[0x960f23]
/usr/sbin/mysqld[0x96be09]
/usr/sbin/mysqld(_ZN7handler12ha_write_rowEPh+0xff)[0x5c959f]
/usr/sbin/mysqld(_ZN14Rpl_info_table13do_flush_infoEb+0x26d)[0x8e8dfd]
/usr/sbin/mysqld(_ZN16Rpl_info_factory17decide_repositoryEP8Rpl_infojPP16Rpl_info_handlerS4_PPKc+0x194)[0x8e1f54]
/usr/sbin/mysqld(_ZN16Rpl_info_factory10create_rliEjb+0x23d)[0x8e26ed]
/usr/sbin/mysqld(_ZN16Rpl_info_factory19create_coordinatorsEjPP11Master_infojPP14Relay_log_info+0x56)[0x8e2ae6]
/usr/sbin/mysqld(_Z10init_slavev+0xd7)[0x8d6a07]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x1195)[0x5ac065]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7ff1bb637d1d]
/usr/sbin/mysqld[0x59c381]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 0
Status: NOT_KILLED

It works when i tested this with standard Percona server
OS: CentOS 6.5
MySQL : Percona-XtraDB-Cluster-server-56-5.6.15-25.5.759

Comments

  • przemekprzemek Percona Support Engineer Percona Staff Role
    What is the purpose you are trying to enable it? Is any of the cluster members also an asyc slave of another mysql instance?
  • HTF1HTF1 Contributor Inactive User Role Advisor
    przemek wrote: »
    What is the purpose you are trying to enable it? Is any of the cluster members also an asyc slave of another mysql instance?

    I'm not using Galera feature for now, just standard MySQL replication hence I would like to enable this option.
  • przemekprzemek Percona Support Engineer Percona Staff Role
    I cannot reproduce this kind of crash, can you post your full my.cnf? Does it crash right after mysqld start or only once some some trx is applied via replication?
  • HTF1HTF1 Contributor Inactive User Role Advisor
    It crashes, right after mysqld start.
    [mysqld_safe]
    log-error = /var/log/mysql/mysql-error.log
    
    [mysqld]
    user = mysql
    port = 3306
    bind_address = 0.0.0.0
    socket = /var/lib/mysql/mysql.sock
    
    datadir = /var/lib/mysql
    tmpdir = /tmp
    pid-file = /var/lib/mysql/mysql.pid
    
    character-set-server = utf8
    explicit_defaults_for_timestamp = 1
    
    slow-query-log = 1
    slow_query_log_file = /var/log/mysql/mysql-slow.log
    long_query_time = 5
    
    log-bin = /var/lib/mysql/log/mysql-bin
    binlog-format = MIXED
    expire_logs_days = 14
    relay-log = /var/lib/mysql/log/mysql-relay
    relay_log_info_file = /var/lib/mysql/log/relay-log.info
    slave_load_tmpdir = /var/lib/mysql/log/tmp
    server-id = 737731821
    
    # Crash-safe replication
    master_info_repository = TABLE
    relay_log_info_repository = TABLE
    relay_log_recovery = 1
    
    #skip-slave-start
    
    read_only
    
    back_log = 50
    max_connections = 500
    max_connect_errors = 100
    skip-name-resolve
    
    key_buffer_size = 256M
    sort_buffer_size = 2M
    read_rnd_buffer_size = 4M
    bulk_insert_buffer_size = 128M
    max_allowed_packet = 32M
    max_heap_table_size = 64M
    tmp_table_size = 64M
    
    table_open_cache = 2048
    thread_cache_size = 16
    
    query_cache_type = 0
    query_cache_size = 0
    
    # InnoDB
    innodb_data_home_dir = /var/lib/mysql
    innodb_log_group_home_dir = /var/lib/mysql
    innodb_data_file_path = ibdata1:2000M:autoextend
    innodb_flush_log_at_trx_commit = 2
    innodb_flush_method = O_DIRECT
    innodb_log_buffer_size = 16M
    innodb_buffer_pool_size = 512M
    innodb_log_file_size = 512M
    innodb_log_files_in_group = 2
    innodb_read_io_threads = 8
    innodb_write_io_threads = 8
    innodb_io_capacity = 400
    innodb_max_dirty_pages_pct = 90
    innodb_lock_wait_timeout = 120
    
    [mysql]
    no-auto-rehash
    socket=/var/lib/mysql/mysql.sock
    
    [client]
    socket=/var/lib/mysql/mysql.sock
    
  • przemekprzemek Percona Support Engineer Percona Staff Role
    OK, binlog-format = MIXED was the key here. Please change it to ROW (as MIXED is not supported by Galera anyway), and try enabling crash safe again.

    Bug reported here: https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1313756
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.