Bug #55185 | STOP SLAVE io_thread spins sql_thread indefinitely | ||
---|---|---|---|
Submitted: | 12 Jul 2010 18:32 | Modified: | 13 Jul 2010 23:42 |
Reporter: | Kavita T | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.1.41 | OS: | Linux (RHEL4U7 - 2.6.9-78.ELsmp) |
Assigned to: | CPU Architecture: | Any | |
Tags: | STOP SLAVE SQL_THREAD |
[12 Jul 2010 18:32]
Kavita T
[12 Jul 2010 19:57]
Sveta Smirnova
Thank you for the report. What do you mean by "Sql_thread stops in the middle of the transaction"? I see in your application no check if transaction in progress. Maybe do you mean by this SQL thread can not reach IO thread forever?
[12 Jul 2010 20:16]
Kavita T
Correct. sql_thread waits to catch-up with io_thread with the following messages in system log. May 25 01:07:43 db1 mysql_backup: Slave IO thread stopped. May 25 01:07:43 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 01:14:33 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 01:35:03 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 01:41:53 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 01:55:34 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 02:16:04 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 02:43:20 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread. May 25 02:50:10 db1 mysql_backup: Waiting for SQL thread to catch up to I/O thread.
[12 Jul 2010 20:24]
Sveta Smirnova
Thank you for the feedback. This is not a bug in this case. SQL thread never catches IO thread up if IO thread stopped in the middle of SQL transaction.
[12 Jul 2010 20:30]
Kavita T
Thanks Sveta, this seems to occur sporadically and while I understand sql_thread will never catch-up with io_thread if stopped in the middle of a transaction, I'm unsure how to avoid this error or prevent io_thread from stopping in the middle of a transaction. Any pointers appreciated.
[12 Jul 2010 20:43]
Rick James
The times I have dug into it, I see a single command waiting: BEGIN. Meanwhile other slaves are happily chugging along. (I mention this to imply that there is nothing wrong with replication in general, nor is there a dangling BEGIN.)
[13 Jul 2010 23:42]
Kavita T
Could this be related to bug 53985 (http://bugs.mysql.com/bug.php?id=53985) ?