Comment 0 for bug 1421282

Revision history for this message
Thomas Roog (thomas.roog) wrote :

When there is a long reporting query running (old query which takes 15 minutes) causes system lock on the replication SQL thread. Later when it tries to resume it fails with error Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY;

# VERSION installed on the reporting slave
ii libperconaserverclient18.1 5.6.22-71.0-726.precise Percona Server database client library
ii percona-server-client-5.6 5.6.22-71.0-726.precise Percona Server database client binaries
ii percona-server-common-5.6 5.6.22-71.0-726.precise Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.6 5.6.22-71.0-726.precise Percona Server database server binaries
ii percona-toolkit 2.2.12 Advanced MySQL and system command-line tools
ii percona-xtrabackup 2.2.8-5059-1.precise Open source backup tool for InnoDB and XtraDB

# VERSION installed on the galera cluster node acting as a master
ii percona-nagios-plugins 1.1.4-1 all Percona Monitoring Plugins for Nagios
ii percona-toolkit 2.2.12 all Advanced MySQL and system command-line tools
ii percona-xtrabackup 2.2.8-5059-1.trusty amd64 Open source backup tool for InnoDB and XtraDB
ii percona-xtradb-cluster-client-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database client binaries
ii percona-xtradb-cluster-common-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)
ii percona-xtradb-cluster-galera-3.x 3.8.3390.trusty amd64 Galera components of Percona XtraDB Cluster
ii percona-xtradb-cluster-server-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database server binaries

# ERRORS found in the error log - this is repeatable situation
2015-02-12 04:15:09 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 127371591, Error_code: 1213
2015-02-12 04:20:06 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 128267271, Error_code: 1213
2015-02-12 04:50:09 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 129888400, Error_code: 1213
2015-02-12 05:00:10 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 130810429, Error_code: 1213
2015-02-12 05:26:33 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 133112638, Error_code: 1213
2015-02-12 08:20:13 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 146892566, Error_code: 1213
2015-02-12 08:31:38 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 146892566, Error_code: 1213
2015-02-12 10:17:29 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 154447973, Error_code: 1213
2015-02-12 10:28:24 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 154706056, Error_code: 1213
2015-02-12 10:33:53 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 155019619, Error_code: 1213
2015-02-12 10:34:02 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 155019619, Error_code: 1213
2015-02-12 10:39:20 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 155349705, Error_code: 1213
2015-02-12 11:22:33 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 158088534, Error_code: 1213
2015-02-12 11:26:52 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 158536669, Error_code: 1213
2015-02-12 11:26:54 31165 [Warning] Slave SQL: Could not execute Update_rows event on table mygame.playeraccount; Deadlock found when trying to get lock; try restarting transaction, Error_code: 1213; handler error HA_ERR_LOCK_DEADLOCK; the event's master log binlog.000012, end_log_pos 158536669, Error_code: 1213
2015-02-12 12:28:38 31165 [Warning] Aborted connection 490826 to db: 'mygame_report' user: 'root' host: '127.0.0.1' (Got an error reading communication packets)
2015-02-12 13:27:32 31165 [Warning] Slave SQL: Could not execute Write_rows event on table mygame.accountactivity; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log binlog.000012, end_log_pos 166133301, Error_code: 1205
2015-02-12 13:27:32 31165 [ERROR] Slave SQL: Could not execute Write_rows event on table mygame.state; Duplicate entry '8570235' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log binlog.000012, end_log_pos 166132885, Error_code: 1062
2015-02-12 13:27:32 31165 [Warning] Slave: Duplicate entry '8570235' for key 'PRIMARY' Error_code: 1062
2015-02-12 13:27:32 31165 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'binlog.000012' position 166132545