Bug #51194 relay_log_space being reported as gigantic
Submitted: 15 Feb 2010 16:55 Modified: 29 Mar 2010 12:34
Reporter: Tim Soderstrom Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.42-percona OS:Linux (RHEL 5.4)
Assigned to: CPU Architecture:Any
Tags: Relay_Log_Space, replication, sbr

[15 Feb 2010 16:55] Tim Soderstrom
Description:
While troubleshooting replication, I noticed that SHOW SLAVE STATUS was reporting the Relay_log_space being abnormally huge:

mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.100.232
Master_User: replicant
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: db2new-bin-log.000084
Read_Master_Log_Pos: 145505231
Relay_Log_File: db1new-relay-log.000760
Relay_Log_Pos: 256
Relay_Master_Log_File: db2new-bin-log.000084
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 145505231
Relay_Log_Space: 18446744073709550270
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
1 row in set (0.00 sec)

While replication seems to be running without issue, previous to this was a slew of replication problems with duplicate key errors for what appeared to be data already inserted into the database. I suspected that replication was looping on the same set of binary logs over and over (which I have seen before in 5.0 but have not been able to reproduce).

Running a CHANGE MASTER fixes the issue.

How to repeat:
I have not been able to repeat the problem :(

Suggested fix:
18446744073709550270 bytes is *gigantic* so something has to be awry. Perhaps an overflow though I am not sure as to the cause.
[16 Feb 2010 6:49] MySQL Verification Team
see also bug #38008
[19 Feb 2010 14:53] Susanne Ebrecht
This is a duplicate of bug #38008
[29 Mar 2010 4:54] Sveta Smirnova
Thank you for the report.

Please provide output of `ls -lh path/to/dir/where/relay/logs/locate` and relay.index file.
[29 Mar 2010 12:34] Tim Soderstrom
Unfortunately, I no longer have this output. This big was filed a month and a half ago - we resolved replication much before this (by taking another full dump of the master and reimporting). Sorry :/