Bug #87489 | MTS ordered commit may cause deadlock with "FLUSH TABLES WITH READ LOCK"of slave | ||
---|---|---|---|
Submitted: | 21 Aug 2017 8:15 | Modified: | 14 Sep 2017 14:05 |
Reporter: | Eunbin Baek | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.7.16 | OS: | Any |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
Tags: | deadlock, MTS, slave_preserve_commit_order |
[21 Aug 2017 8:15]
Eunbin Baek
[23 Aug 2017 14:01]
MySQL Verification Team
Hi, While trying to reproduce (unsuccessful so far) I have to ask, why do you execute flush tables with read lock? Another question, the slave that fails, it is running on bare metal or vm ? all best Bogdan
[24 Aug 2017 2:50]
Eunbin Baek
Hi, The slave is running on physical machine. We are using Percona XtraBackup on slave server for data backup. so, flush tables with read lock was executed by XtraBackup while backup had been running on the slave.
[14 Sep 2017 14:05]
MySQL Verification Team
Hi, I tried this with multiple mysql binaries and I can't get this issue to happen again. Running a flush tables with read lock on master or on slave works as expected. Is this oracle binary you are using or percona's binary you are having issues with? Could you maybe share a complete config from master and slave to try with setup more similar to yours. all best Bogdan
[7 Feb 2019 5:30]
Prasad N
I am running into same issue with mysql 5.7.21 but when executing SET GLOBAL super_read_only=ON command on the slave instead of FTWRL. I have enabled multi threaded slaves 30 in number. My Show processlist shows the following : truncated to keep focus: | Id | User | Host | db | Command | Time | State | Info +-----+-------------+-----------------+--------+---------+-------+---------------------------------------------+---------------------------------------------- | 7 | system user | | NULL | Connect | 40907 | Waiting for dependent transaction to commit | NULL | 8 | system user | | NULL | Connect | 40993 | Waiting for an event from Coordinator | NULL | 9 | system user | | NULL | Connect | 40993 | Waiting for an event from Coordinator | NULL | 10 | system user | | LOADDB | Connect | 40993 | Waiting for global read lock | INSERT INTO LOAD_TABLE (UUID,COUNTER,STATUS) | | 11 | system user | | NULL | Connect | 40993 | Waiting for preceding transaction to commit | NULL | | 12 | system user | | NULL | Connect | 40993 | Waiting for preceding transaction to commit | NULL | 13 | system user | | NULL | Connect | 40993 | Waiting for preceding transaction to commit | NULL | | 14 | system user | | NULL | Connect | 40993 | Waiting for preceding transaction to commit | NULL | | 15 | system user | | NULL | Connect | 40994 | Waiting for an event from Coordinator | NULL | 31 | system user | | NULL | Connect | 44441 | Waiting for an event from Coordinator | NULL | | | 226 | system user | | NULL | Connect | 43075 | Waiting for master to send event | NULL | | 430 | sgroot | 127.0.0.1:45190 | NULL | Query | 40907 | Waiting for commit lock | SET GLOBAL super_read_only=ON | | 802 | sgroot | localhost | NULL | Query | 0 | starting | show full processlist | 1: Can you provide an explanation of why this is happening ? 2: Any workarounds to safely execute my SET GLOBAL super_read_only=ON 3: Fix the issue.
[15 Feb 2019 21:45]
MySQL Verification Team
@Prasad, are you using Oracle binaries or? Because I cannot reproduce this with Oracle binaries. all best Bogdan
[6 Sep 2021 11:56]
Przemyslaw Malkowski
I believe this is a duplicate of https://bugs.mysql.com/bug.php?id=95863 ?
[6 Sep 2021 12:47]
MySQL Verification Team
Hi, might be but I can't reproduce that one on the latest MySQL server using Oracle binaries neither. all best