Bug #93089 | parallel workers+slave_preserve_commit_order+flushtables with read lock deadlock | ||
---|---|---|---|
Submitted: | 6 Nov 2018 3:37 | Modified: | 7 Nov 2018 7:45 |
Reporter: | ashe sun (OCA) | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.7 | OS: | Any |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[6 Nov 2018 3:37]
ashe sun
[6 Nov 2018 3:39]
ashe sun
2.1 Generate 2 transaction that can be apply on slave in parallel. (do insert on master.)
[6 Nov 2018 10:27]
MySQL Verification Team
Hi, Thanks for submission. Can you reproduce this issue without using GDB ? thanks bogdan
[6 Nov 2018 13:01]
MySQL Verification Team
reminds me of https://bugs.mysql.com/bug.php?id=89247
[7 Nov 2018 1:52]
gang chen
Hi Bogdan This bug can not repeat by debug_sync inner mysqld ? I am not sure about that ,but I will try. maybe you can run sysbench oltp test on master ,and send "flush tables with read lock" to slave again and again,good lock to you.
[7 Nov 2018 7:45]
ashe sun
Hi Bogdan I have read all documents of Debug Sync Facility,and there is no way to control slave worker threads. But an easy way is here. (Tell me how to control internal threads using Debug Sync Facility if you got it) This is my way to repeat. Prepare your environment with master-slave replication and open parallel slave sql workers. step 0 on master create table ashe(id int not null auto_increment primary key,name varchar(10)); create table delay_table(id int); step1 1.1 Generate 2 transaction that can be apply on slave in parallel. session1 session2 set binlog_format=statement; set binlog_format=statement; begin; begin; insert into tt select sleep(10); insert into ashe values(40,'aaa'); insert into ashe values(41,'aaa'); commit; commit step 2 on slave flush tables with read lock . and then you will see that on slave instance. mysql> show processlist; +----+-------------+-----------+----------------+---------+------+--------------------------------------------------------+---------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-------------+-----------+----------------+---------+------+--------------------------------------------------------+---------------------------------------+ | 3 | root | localhost | NULL | Query | 13 | Waiting for commit lock | flush tables with read lock | | 22 | root | localhost | NULL | Query | 0 | starting | show processlist | | 41 | root | localhost | NULL | Sleep | 1493 | | NULL | | 48 | system user | | NULL | Connect | 688 | Waiting for master to send event | NULL | | 49 | system user | | NULL | Connect | 20 | Slave has read all relay log; waiting for more updates | NULL | | 50 | system user | | test_dead_lock | Connect | 25 | Waiting for global read lock | insert into ashe(name) values('aaaa') | | 51 | system user | | NULL | Connect | 33 | Waiting for preceding transaction to commit | NULL | | 52 | system user | | NULL | Connect | 657 | Waiting for an event from Coordinator | NULL |