Deadlock with LOCK BINLOG FOR BACKUP + SHOW SLAVE STATUS with binary log enabled

Bug #1372806 reported by Alexey Kopytov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Alexey Kopytov
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
High
Alexey Kopytov

Bug Description

Reporting a problem described in bug #1358836 separately.

When the binary log is enabled on a replication slave, SHOW SLAVE STATUS
performed under an active BINLOG lock can lead to a deadlock.

The root cause is similar to http://bugs.mysql.com/bug.php?id=70307,
with the only difference being LOCK BINLOG FOR BACKUP instead of FTWRL:

- a slave SQL thread grabs Relay_log_info::data_lock before it commits;

- if the commit is blocked on a binlog protection lock, then SHOW SLAVE
STATUS executed in a connection holding the binlog lock will try lock
Relay_log_info::data_lock, which is causing the deadlock

The fix is to make sure that an SQL thread does not acquire binlog
protection locks while holding Relay_log_info::data_lock.

Related branches

summary: - Deadlock with LOCK BINLOG FOR BACKUP + SHOW SLAVE STATUS
+ Deadlock with LOCK BINLOG FOR BACKUP + SHOW SLAVE STATUS with binary log
+ enabled
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-821

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.