Non booststrap node crash while attemping to perform table%cache operations. Warning: "BF applier failed to open_and_lock_tables"

Bug #1414635 reported by Daniel Guzmán Burgos
This bug report is a duplicate of:  Bug #1327763: Random crash on the same node. Edit Remove
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

On a PXC 3 node cluster, if all traffic is only hitting one node, all is fine, but when it hits all three, nodes start going down with the following error:

2015-01-26 16:38:05 18913 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 288690954)
2015-01-26 16:38:05 18913 [Warning] WSREP: RBR event 3 Delete_rows apply warning: 1615, 288690954
2015-01-26 16:38:05 18913 [Warning] WSREP: Failed to apply app buffer: seqno: 288690954, status: 1
         at galera/src/trx_handle.cpp:apply():340
Retrying 2th time
2015-01-26 16:38:05 18913 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 288690954)
2015-01-26 16:38:05 18913 [Warning] WSREP: RBR event 3 Delete_rows apply warning: 1615, 288690954
2015-01-26 16:38:05 18913 [Warning] WSREP: Failed to apply app buffer: seqno: 288690954, status: 1
         at galera/src/trx_handle.cpp:apply():340
Retrying 3th time
2015-01-26 16:38:05 18913 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 288690954)
2015-01-26 16:38:05 18913 [Warning] WSREP: RBR event 3 Delete_rows apply warning: 1615, 288690954
2015-01-26 16:38:05 18913 [Warning] WSREP: Failed to apply app buffer: seqno: 288690954, status: 1
         at galera/src/trx_handle.cpp:apply():340
Retrying 4th time
2015-01-26 16:38:05 18913 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 288690954)
2015-01-26 16:38:05 18913 [Warning] WSREP: RBR event 3 Delete_rows apply warning: 1615, 288690954
2015-01-26 16:38:05 18913 [Warning] WSREP: failed to replay trx: source: 541e9f59-a554-11e4-ad2e-4f122835fc6c version: 3 local: 1 state: REPLAYING flags: 1 conn_id: 20381 trx_id: 3524471810 seqnos (l: 34212, g: 288690954, s: 288690951, d: 288690937, ts: 195957797696133)
2015-01-26 16:38:05 18913 [Warning] WSREP: Failed to apply trx 288690954 4 times
2015-01-26 16:38:05 18913 [ERROR] WSREP: trx_replay failed for: 6, query: void
2015-01-26 16:38:05 18913 [ERROR] Aborting

And the following stack trace:

12:38:09 UTC - mysqld got signal 6 ;
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=33554432
read_buffer_size=131072
max_used_connections=108
max_threads=502
thread_count=39
connection_count=30
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 233164 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0xc3b2b70
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 = 7fbd01564d38 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x8f97d5]
/usr/sbin/mysqld(handle_fatal_signal+0x4b4)[0x6655c4]
/lib64/libpthread.so.0(+0xf710)[0x7fbf97b1e710]
/lib64/libc.so.6(gsignal+0x35)[0x7fbf95f64625]
/lib64/libc.so.6(abort+0x175)[0x7fbf95f65e05]
/lib64/libc.so.6(+0x70537)[0x7fbf95fa2537]
/lib64/libc.so.6(+0x75e66)[0x7fbf95fa7e66]
/lib64/libc.so.6(+0x789b3)[0x7fbf95faa9b3]
/usr/sbin/mysqld[0x9618db]
/usr/sbin/mysqld[0x9adb57]
/usr/sbin/mysqld[0x91554f]
/usr/sbin/mysqld(_Z8closefrmP5TABLEb+0xf9)[0x782c09]
/usr/sbin/mysqld(_Z18intern_close_tableP5TABLE+0x36)[0x696726]
/usr/sbin/mysqld(_ZN11Table_cache22free_all_unused_tablesEv+0x8a)[0x78ce4a]
/usr/sbin/mysqld(_ZN19Table_cache_manager22free_all_unused_tablesEv+0x43)[0x78cf63]
/usr/sbin/mysqld(_Z19close_cached_tablesP3THDP10TABLE_LISTbm+0x6f3)[0x6a3e43]
/usr/sbin/mysqld[0x584a6f]
/usr/sbin/mysqld(unireg_abort+0x12f)[0x584f9f]
/usr/sbin/mysqld(_Z24wsrep_replay_transactionP3THD+0x526)[0x59ed86]
/usr/sbin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0x838)[0x704c08]
/usr/sbin/mysqld(_Z19mysqld_stmt_executeP3THDPcj+0x30d)[0x70535d]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x13e2)[0x6f2082]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x22b)[0x6f3b5b]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x17f)[0x6bc30f]
/usr/sbin/mysqld(handle_one_connection+0x47)[0x6bc4f7]
/usr/sbin/mysqld(pfs_spawn_thread+0x12a)[0xaf38ba]
/lib64/libpthread.so.0(+0x79d1)[0x7fbf97b169d1]
/lib64/libc.so.6(clone+0x6d)[0x7fbf9601a8fd]

Increasing values for table_open_cache didn't make any changes.

MySQL Version:
mysqld Ver 5.6.21-70.1-56 for Linux on x86_64 (Percona XtraDB Cluster (GPL), Release rel70.1, Revision 938, WSREP version 25.8, wsrep_25.8.r4150)

My.cnf contents:
[mysql]

# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]

# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /home/mysql/data/mysql.pid
core-file

# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
event_scheduler = ON

# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve

# DATA STORAGE #
datadir = /home/mysql/data/

# BINARY LOGGING #
log-bin = /home/mysql/data/mysql-bin
expire-logs-days = 14
sync-binlog = 1

# CACHES AND LIMITS #
tmp-table-size = 1024M
max-heap-table-size = 512M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 94392

# INNODB #
innodb-log-files-in-group = 2
innodb-log-file-size = 256M
innodb-flush-log-at-trx-commit = 2
innodb-file-per-table = 1
innodb-buffer-pool-size = 6G

# LOGGING #
log-error = /home/mysql/logs/mysqld.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /home/mysql/logs/mysql-slow.log

symbolic-links=0
wsrep_provider=/usr/lib64/libgalera_smm.so
wsrep_provider_options="gcache.size=1G"
wsrep_cluster_address=gcomm://192.168.123.202,192.168.123.203,192.168.123.204
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_node_address=192.168.123.202
wsrep_slave_threads=8
wsrep_sst_method=xtrabackup-v2
wsrep_cluster_name=my_centos_cluster

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

A potential fix for this has been merged for inclusion in 5.6.22-25.8.

Revision history for this message
Miguel Lopes (miguel-2) wrote :

We have tried the new version and the same error occurred when dealing with prepared statements. We are preparing a detailed log to send.

Revision history for this message
Adrien Fleury (fleu42) wrote :
Download full text (6.2 KiB)

In a 5 (4 servers + 1 witness) node cluster across WAN, we are facing the same bug using percona cluster (percona-xtradb-cluster-5.6 (5.6.22-25.8-978.wheezy)) with mysql Ver 14.14 Distrib 5.6.22-72.0 installed from the percona repository on debian 7.8.

The witness is using garbd 3.8.rf6147dd.

When the load balancing is enabled for writes on all nodes we are hitting that bug too.

Error Logs:

2015-04-22 09:16:04 11522 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 1057001)
2015-04-22 09:16:04 11522 [Warning] WSREP: RBR event 3 Update_rows apply warning: 1615, 1057001
2015-04-22 09:16:04 11522 [Warning] WSREP: Failed to apply app buffer: seqno: 1057001, status: 1
         at galera/src/trx_handle.cpp:apply():351
Retrying 2th time
2015-04-22 09:16:04 11522 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 1057001)
2015-04-22 09:16:04 11522 [Warning] WSREP: RBR event 3 Update_rows apply warning: 1615, 1057001
2015-04-22 09:16:04 11522 [Warning] WSREP: Failed to apply app buffer: seqno: 1057001, status: 1
         at galera/src/trx_handle.cpp:apply():351
Retrying 3th time
2015-04-22 09:16:04 11522 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 1057001)
2015-04-22 09:16:04 11522 [Warning] WSREP: RBR event 3 Update_rows apply warning: 1615, 1057001
2015-04-22 09:16:04 11522 [Warning] WSREP: Failed to apply app buffer: seqno: 1057001, status: 1
         at galera/src/trx_handle.cpp:apply():351
Retrying 4th time
2015-04-22 09:16:04 11522 [Warning] WSREP: BF applier failed to open_and_lock_tables: 1615, fatal: 0 wsrep = (exec_mode: 1 conflict_state: 5 seqno: 1057001)
2015-04-22 09:16:04 11522 [Warning] WSREP: RBR event 3 Update_rows apply warning: 1615, 1057001
2015-04-22 09:16:04 11522 [Warning] WSREP: failed to replay trx: source: 46176511-e8ae-11e4-8f62-8a8a219c1de4 version: 3 local: 1 state: REPLAYING flags: 1 conn_id: 5899 trx_id: 51194495 seq
nos (l: 8584, g: 1057001, s: 1056993, d: 1057000, ts: 2324575036984990)
2015-04-22 09:16:04 11522 [Warning] WSREP: Failed to apply trx 1057001 4 times
2015-04-22 09:16:04 11522 [ERROR] WSREP: trx_replay failed for: 6, query: void
2015-04-22 09:16:04 11522 [ERROR] Aborting

2015-04-22 09:16:06 11522 [Note] WSREP: Closing send monitor...
2015-04-22 09:16:06 11522 [Note] WSREP: Closed send monitor.
2015-04-22 09:16:06 11522 [Note] WSREP: gcomm: terminating thread
2015-04-22 09:16:06 11522 [Note] WSREP: gcomm: joining thread
2015-04-22 09:16:06 11522 [Note] WSREP: gcomm: closing backend
... skipping notes ...
2015-04-22 09:16:09 11522 [Note] InnoDB: FTS optimize thread exiting.
2015-04-22 09:16:09 11522 [Note] InnoDB: Starting shutdown...
09:16:09 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...

Read more...

Revision history for this message
Krunal Bauskar (krunal-bauskar) wrote :

Check a base bug that reported the same scenario.
https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1327763

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.