LP #1673049: Crash caused by a delete from a table without a primary key

Description

**Reported in Launchpad by Ceri WIlliams last update 15-03-2017 11:55:32

Percona Server 5.6.19-67.0-log

A delete from a table on the master appears to have triggered every slave to crash. The table that appears to be the cause should only have 1 or 2 rows and so does not have an explicit primary key defined. The table showed a difference as a result of a checksum and a delete was issued: delete from x limit 2

The stracktrace that appeared was:

08:27:24 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 Server better by reporting any
bugs at http://bugs.percona.com/

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

Thread pointer: 0x7ef64c000990
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 = 7efea076d890 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x8bb80c]
/usr/sbin/mysqld(handle_fatal_signal+0x479)[0x6504b9]
/lib64/libpthread.so.0[0x3e88e0f7e0]
/lib64/libc.so.6(gsignal+0x35)[0x3e88a325e5]
/lib64/libc.so.6(abort+0x175)[0x3e88a33dc5]
/usr/sbin/mysqld[0x9bc127]
/usr/sbin/mysqld[0x916f2f]
/usr/sbin/mysqld(_ZN7handler13ha_delete_rowEPKh+0x9d)[0x59d6cd]
/usr/sbin/mysqld(_ZN21Delete_rows_log_event11do_exec_rowEPK14Relay_log_info+0x2c)[0x8498fc]
/usr/sbin/mysqld(_ZN14Rows_log_event12do_apply_rowEPK14Relay_log_info+0x26)[0x848556]
/usr/sbin/mysqld(_ZN14Rows_log_event24do_table_scan_and_updateEPK14Relay_log_info+0x203)[0x858af3]
/usr/sbin/mysqld(_ZN14Rows_log_event14do_apply_eventEPK14Relay_log_info+0x45e)[0x85821e]
/usr/sbin/mysqld(_ZN9Log_event11apply_eventEP14Relay_log_info+0x5e)[0x85054e]
/usr/sbin/mysqld(_Z26apply_event_and_update_posPP9Log_eventP3THDP14Relay_log_info+0x23e)[0x88424e]
/usr/sbin/mysqld(handle_slave_sql+0x11f6)[0x887a96]
/usr/sbin/mysqld(pfs_spawn_thread+0x143)[0xb0dc13]
/lib64/libpthread.so.0[0x3e88e07aa1]
/lib64/libc.so.6(clone+0x6d)[0x3e88ae8aad]

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): 2
Status: NOT_KILLED

This appears to support the delete causing the issue, further supported by rebuilding a slave from a PXB backup and replicating until the point of the delete, changing replication postition to the next event and resuming replication (no issue seen)

Environment

None

Smart Checklist

Activity

Show:

Lalit Choudhary November 5, 2018 at 3:50 PM

Hi Ceri,

Thank you for the report.

Tested described behavior with  5.6.41-84.1-log Percona Server, I can not reproduce it.

  • Created 2 table without a primary key. 1 with InnoDB and 1 with MyISAM engine.

  • started delete transaction on the master using sysbeanch.

  • executed random deletes, do not see any crash on the slave.

binlog_format

STATEMENT

Is it possible to provide a repeatable test case or replication configuration and table definition?

 

 

Cannot Reproduce

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 11:07 AM
Updated December 28, 2018 at 1:56 PM
Resolved December 28, 2018 at 1:56 PM