Slave disconnect cause the growth of the number of threads on master

Bug #1239696 reported by Sergei Glushchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Expired
Undecided
Unassigned
5.1
Won't Fix
Undecided
Unassigned
5.5
Expired
Undecided
Unassigned
5.6
Expired
Undecided
Unassigned

Bug Description

Run following test case with --repeat=10, you will see that after number of repeats the number of threads increased.

test:
--source include/master-slave.inc
create table t (a int);
insert into t values (1);
drop table t;
--source include/rpl_end.inc
SHOW PROCESSLIST;

nclude/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
create table t (a int);
insert into t values (1);
drop table t;
include/rpl_end.inc
SHOW PROCESSLIST;
Id User Host db Command Time State Info Rows_sent Rows_examined
5 root localhost:56390 NULL Binlog Dump 38 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
14 root localhost:56400 NULL Binlog Dump 34 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
23 root localhost:56410 NULL Binlog Dump 29 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
32 root localhost:56420 NULL Binlog Dump 25 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
41 root localhost:56430 NULL Binlog Dump 21 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
50 root localhost:56440 NULL Binlog Dump 16 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
59 root localhost:56450 NULL Binlog Dump 12 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
68 root localhost:56462 NULL Binlog Dump 8 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
77 root localhost:56473 NULL Binlog Dump 4 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
83 root localhost test Query 0 init SHOW PROCESSLIST 0 0
86 root localhost:56483 NULL Binlog Dump 0 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
87 root localhost:56484 test Sleep 0 NULL 0 0
88 root localhost:56485 test Sleep 0 NULL 1 0
rpl.aaa 'stmt' [ pass ] 822
--------------------------------------------------------------------------

In particular this cause test suite to fail with thread pool and low maximum number of threads.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

This appears to be by design, see kill_zombie_dump_threads().

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :
Download full text (3.3 KiB)

So, do we consider this a bug or not?

If we do, can somebody send exact steps to repeat? I see this a result of:

./mtr --repeat=10 --force 1239696

...

+++ /home/openxs/dbs/p5.6/mysql-test/var/log/1239696.reject 2013-12-05 14:43:37.136505748 +0300
@@ -9,7 +9,7 @@
 include/rpl_end.inc
 SHOW PROCESSLIST;
 Id User Host db Command Time State Info Rows_sent Rows_examined
-83 root localhost test Query 0 init SHOW PROCESSLIST0 0
-86 root localhost:41599 NULL Binlog Dump 1 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
-87 root localhost:41600 test Sleep 0 NULL 0 0
-88 root localhost:41601 test Sleep 0 NULL 1 0
+2 root localhost test Query 0 init SHOW PROCESSLIST0 0
+5 root localhost:41814 NULL Binlog Dump 1 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
+6 root localhost:41815 test Sleep 1 NULL 0 0
+7 root localhost:41816 test Sleep 1 NULL 1 0

mysqltest: Result length mismatch

 - saving '/home/openxs/dbs/p5.6/mysql-test/var/log/main.1239696/' to '/home/openxs/dbs/p5.6/mysql-test/var/log/main.1239696/'

Test main.1239696 has failed 2 times, no more retries!

main.1239696 [ fail ]
        Test ended at 2013-12-05 13:43:41

CURRENT_TEST: main.1239696
--- /home/openxs/dbs/p5.6/mysql-test/r/1239696.result 2013-12-05 14:35:42.572526906 +0300
+++ /home/openxs/dbs/p5.6/mysql-test/var/log/1239696.reject 2013-12-05 14:43:41.296505563 +0300
@@ -9,7 +9,7 @@
 include/rpl_end.inc
 SHOW PROCESSLIST;
 Id User Host db Command Time State Info Rows_sent Rows_examined
-83 root localhost test Query 0 init SHOW PROCESSLIST0 0
-86 root localhost:41599 NULL Binlog Dump 1 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
-87 root localhost:41600 test Sleep 0 NULL 0 0
-88 root localhost:41601 test Sleep 0 NULL 1 0
+2 root localhost test Query 0 init SHOW PROCESSLIST0 0
+5 root localhost:41823 NULL Binlog Dump 1 Master has sent all binlog to slave; waiting for binlog to be updated NULL 0 0
+6 root localhost:41824 test Sleep 1 NULL 0 0
+7 root localhost:41825 test Sleep 1 NULL 1 0

mysqltest: Result length mismatch

 - saving '/home/openxs/dbs/p5.6/mysql-test/var/log/main.1239696/' to '/home/openxs/dbs/p5.6/mysql-test/var/log/main.1239696/'
The servers were restarted 1 times
Spent 0.000 of 93 seconds executing testcases

Too many failed: Failed 10/10 tests, 0.00% were successful.

Failing test(s): main.1239696

The log files in var/log may give you some hint of what went wrong.

If you want to report this error, please read first the documentation
at http://dev....

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.5 because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.6 because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server because there has been no activity for 60 days.]

Changed in percona-server:
status: Incomplete → Expired
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-3046

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.