| Bug #31024 | STOP SLAVE does not stop attempted connect()s | ||
|---|---|---|---|
| Submitted: | 14 Sep 2007 10:30 | Modified: | 26 Mar 2008 9:31 |
| Reporter: | Domas Mituzas | ||
| Status: | Closed | ||
| Category: | Server: Replication | Severity: | S2 (Serious) |
| Version: | 5.0-bk, 5.1-bk | OS: | Any |
| Assigned to: | Sven Sandberg | Target Version: | 5.0+ |
| Tags: | Delay, timeout, stop slave, start slave | ||
| Triage: | D2 (Serious) | ||
[14 Sep 2007 10:30]
Domas Mituzas
[27 Feb 2008 13:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43044 ChangeSet@1.2576, 2008-02-27 16:40:28+04:00, ramil@mysql.com +1 -0 Fix for bug #31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It might take too long. Fix: don't wait, stop the slave immediately.
[11 Mar 2008 9:59]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43743 ChangeSet@1.2589, 2008-03-11 10:03:23+01:00, sven@riska.(none) +2 -0 BUG#31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It may take a long time. Fix: don't wait, stop the slave immediately.
[11 Mar 2008 13:57]
Sven Sandberg
Committed a patch at https://intranet.mysql.com/secure/paste/displaypaste.php?codeid=3573 I have no idea why it doesn't show up automatically.
[12 Mar 2008 0:51]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43751 ChangeSet@1.2589, 2008-03-11 12:38:52+01:00, sven@riska.(none) +2 -0 BUG#31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It may take a long time. Fix: don't wait, stop the slave immediately.
[12 Mar 2008 0:51]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43753 ChangeSet@1.2589, 2008-03-11 13:01:37+01:00, sven@riska.(none) +2 -0 BUG#31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It may take a long time. Fix: don't wait, stop the slave immediately.
[12 Mar 2008 0:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43757 ChangeSet@1.2589, 2008-03-11 13:01:37+01:00, sven@riska.(none) +2 -0 BUG#31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It may take a long time. Fix: don't wait, stop the slave immediately.
[12 Mar 2008 0:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/43763 ChangeSet@1.2597, 2008-03-11 14:42:54+01:00, sven@riska.(none) +2 -0 BUG#31024: STOP SLAVE does not stop attempted connect()s Problem: if the IO slave thread is attempting to connect, STOP SLAVE waits for the attempt to finish. It may take a long time. Fix: don't wait, stop the slave immediately.
[17 Mar 2008 4:53]
Sven Sandberg
patch pushed to 5.0-rpl
[25 Mar 2008 12:22]
Bugs System
Pushed into 5.0.60
[25 Mar 2008 12:23]
Bugs System
Pushed into 5.1.24-rc
[26 Mar 2008 9:31]
Jon Stephens
Documented bugfix in the 5.0.60 and 5.1.24 changelogs as follows:
STOP SLAVE did not stop connection attempts properly.
If the IO slave thread was attempting to connect, STOP
SLAVE waited for the attempt to finish, sometimes for a long
period of time, rather than stopping
the slave immediately.
[26 Mar 2008 20:01]
Bugs System
Pushed into 6.0.5-alpha
[30 Mar 2008 21:49]
Jon Stephens
Also documented for 5.1.23-ndb-6.3.11 and 6.0.5.
[2 Mar 23:40]
Jasmin Letendre
It seems this bug is still there in 5.1.30 (mysqld Ver 5.1.30-community-log for Win32 on
ia32 (MySQL Community Server (GPL)).
I have a basic replication setup with one master and one slave, both running on the same
windows host, with different port. Every time I try to stop the slave while the master is
down, it takes a 1 minute timeout before STOP SLAVE returns.
I confirmed using show processlist that one thread is stuck in state 'Killing slave'
while the slave thread is in state 'Reconnecting after a failed master event read'. Here
is the complete output.
mysql> show processlist;
+----+-------------+----------------+-------+---------+------+-----------------------------------------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State
| Info |
+----+-------------+----------------+-------+---------+------+-----------------------------------------------------------------------+------------------+
| 3 | root | localhost:4337 | mysql | Query | 16 | Killing slave
| stop slave |
| 4 | root | localhost:4338 | mysql | Sleep | 2 |
| NULL |
| 7 | root | localhost:4345 | NULL | Sleep | 1188 |
| NULL |
| 17 | system user | | NULL | Connect | 110 | Reconnecting after a
failed master event read | NULL |
| 18 | system user | | NULL | Connect | 109 | Has read all relay log;
waiting for the slave I/O thread to update it | NULL |
| 19 | root | localhost:4598 | NULL | Query | 0 | NULL
| show processlist |
+----+-------------+----------------+-------+---------+------+-----------------------------------------------------------------------+------------------+
Step to reproduce:
-make sure the master is down
-(on the slave)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
mysql> stop slave;
Query OK, 0 rows affected (57.78 sec)
