Bug #31190 | Exec_Master_Log_Pos in SHOW SLAVE STATUS can be incorrect in some cases | ||
---|---|---|---|
Submitted: | 25 Sep 2007 18:31 | Modified: | 29 Feb 2008 15:51 |
Reporter: | Harrison Fisk | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.0.30sp1-5.0.46 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | bfsm_2007_10_18, Exec_master_log_pos, replication, stop slave |
[25 Sep 2007 18:31]
Harrison Fisk
[25 Sep 2007 18:31]
Harrison Fisk
Relay log which caused the problem
Attachment: ubuntu3-relay-bin.001329.gz (application/x-gzip, text), 122.83 KiB.
[23 Jan 2008 18:28]
Andrei Elkin
It might be this one is a duplicate for bug#12691. There is a note on bug#12691 page explaining a feature in behaviour of "Exec_master_log_pos is not getting corrupted although the couter indeed behaves sometimes non-monotonically ...". As the patch for the earlier bug " [27 Nov 2007 11:48] Bugs System Pushed into 5.0.54 " we indeed may not reproduce the current, in either version.
[27 Feb 2008 12:21]
Robert Krzykawski
I am experiencing the same problem.. It's not often, but it happens. We have noticed this on 4.1.22, 5.0.32 (enterprise), 5.0.50 (enterprise).. Today for example, it happened again. We stopped replication with "slave stop;", did a "show slave status\G" and issued a "change master..." And the position was wrong. Now, when checking the logs, relay logs and masters binlog, in fact the exec_master_log_pos reported on the slave does not exist on the master. If i would restart the slave before issuing a "change master" i guess there would be no problem, since the slave would continue reading it's relaylogs and so on, but since we wanted to switch from using a ssh tunnel between the master and the slave to our new wan connection, we needed to change host. <snip from mysqld.log> 080227 4:27:50 [Note] Slave I/O thread: connected to master 'rep@127.0.0.1:3351', replication started in log 'x-bin.001507' at position 237826070 080227 4:37:52 [Note] Slave I/O thread exiting, read up to log 'x-bin.001507', position 281271771 080227 4:37:52 [Note] Slave SQL thread exiting, replication stopped in log 'x-bin.001507' at position 1756 080227 4:41:57 [Note] Slave SQL thread initialized, starting replication in log 'x-bin.001507' at position 1756, relay log '/db/x/log/relaylog/x-relay.000001' position: 98 080227 4:41:58 [Note] Slave I/O thread: connected to master 'rep@192.168.30.5:3306', replication started in log 'x-bin.001507' at position 1756 080227 4:41:58 [ERROR] Error reading packet from server: error reading log entry ( server_errno=1236) 080227 4:41:58 [ERROR] Got fatal error 1236: 'error reading log entry' from master when reading data from binary log 080227 4:41:58 [Note] Slave I/O thread exiting, read up to log 'x-bin.001507', position 1756 080227 4:44:33 [Note] Error reading relay log event: slave SQL thread was killed </snip from mysqld.log> <snip from binlog> [root@host binlog]# mysqlbinlog --start-position=1756 x-bin.001507 /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; ERROR: Error in Log_event::read_log_event(): 'Event too big', data_len: 1751607660, event_type: 34 # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; </snip from binlog> This could be serious if you have a slave that you really depend upon.. In this case, we could just roll back to a snapshot of this backup database (we do binary snapshots in the SAN for this backup database every hour), but say that it was in production.. - it could cause a big mess.
[27 Feb 2008 15:33]
Harrison Fisk
I have not been able to repeat this under 5.0.54 or above. Previously, I was able to repeat it in under 5 minutes regularly, and I let a test run for 4 hours without repeating it. So it seems to me that it is indeed fixed, or at least the issue my test case was revealing was fixed.
[29 Feb 2008 15:51]
Ramil Kalimullin
See bug #12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER