regression test for lp:1019473 causes server abort
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
High
|
Seppo Jaakola | |||
5.6 |
Fix Released
|
High
|
Seppo Jaakola | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Regression test for lp:1019473 will cause abort due to BF-BF lock conflict in lock0lock.
if (wsrep_
(type_mode & LOCK_MODE_MASK) == LOCK_X &&
{
/* exclusive lock conflicts are not accepted */
fprintf(stderr, "BF-BF X lock conflict\n");
lock_
abort();
} else {
...
131226 3:27:03 [Note] WSREP: replay trx: DELETE FROM lp1019473 WHERE fid=4 AND
uid=4 86889
BF-BF lock conflict
RECORD LOCKS space id 0 page no 663 n bits 1056 index `uid` of table `test`.`lp1
019473` trx id 20C06 lock_mode X locks rec but not gap
Record lock, heap no 98 PHYSICAL RECORD: n_fields 2; compact format; info bits 3
2
0: len 4; hex 00000004; asc ;;
1: len 6; hex 0000000084ab; asc ;;
131226 3:27:03 [Note] WSREP: BF conflict, order: 86889 86892
BF-BF X lock conflict
RECORD LOCKS space id 0 page no 663 n bits 1056 index `uid` of table `test`.`lp1019473` trx id 20C06 lock_mode X locks rec but not gap
Record lock, heap no 98 PHYSICAL RECORD: n_fields 2; compact format; info bits 32
0: len 4; hex 00000004; asc ;;
1: len 6; hex 0000000084ab; asc ;;
03:27:03 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.
key_buffer_
read_buffer_
max_used_
max_threads=1024
thread_count=9
connection_count=9
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: 0x33acbb0
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 = 7fa96d316e48 thread_stack 0x40000
/tmp/galera/
/tmp/galera/
/lib/x86_
/lib/x86_
/lib/x86_
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/tmp/galera/
/lib/x86_
/lib/x86_
Related branches
Changed in codership-mysql: | |
status: | New → In Progress |
assignee: | nobody → Seppo Jaakola (seppo-jaakola) |
importance: | Undecided → High |
milestone: | none → 5.5.35-25.10 |
tags: | added: i40190 |
The problem may relate to fix in: lp:1100496
The anatomy of the issue is as follows:
If a table does not have a primary key, nor any other unique, but has some non-unique keys defined, then DML on the table will result in taking X locks on the non-unique key. Because, the key is non-unique, there will be excessive record X locks on the table, and during parallel replication, some of the excessive X locks, granted for separate transactions, may conflict.
Galera does parallel applying control based on MD5 hash sum on the whole tuple, and it can be that two slave appliers are updating separate rows, but still end up in lock conflict due to these non-unique keys. (if mysql would use full table scan, we would not hit this issue)