Bug #21437 server_errno=29 error message flood mysqld error log
Submitted: 3 Aug 2006 21:40 Modified: 18 May 2011 8:50
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Linux)
Assigned to: Libing Song CPU Architecture:Any

[3 Aug 2006 21:40] Jonathan Miller
Description:
I had reset the master and forgot to reset the slave before I started the slave. With in less then 2 minutes I had an error log with 23733 lines of these error messages.

060803 20:41:37 [Note] Slave: connected to master 'rep@n08:3306',replication resumed in log 'n08.000002' at position 102
060803 20:41:37 [ERROR] Error reading packet from server: File '/space/var/n08.000003' not found (Errcode: 2) ( server_errno=29)
060803 20:41:37 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'n08.000002' position 102
060803 20:41:37 [Note] Slave: connected to master 'rep@n08:3306',replication resumed in log 'n08.000002' at position 102
060803 20:41:37 [ERROR] Error reading packet from server: File '/space/var/n08.000003' not found (Errcode: 2) ( server_errno=29)
060803 20:41:37 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'n08.000002' position 102

How to repeat:
start replicating. stop the slave, reset the master, start the slave again. 

Suggested fix:
produce one error message, I think 23000 + is a little over kill :-)
[19 Oct 2009 8:24] 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/87255

3162 Li-Bing.Song@sun.com	2009-10-19
      Bug#21437 server_errno=29 error message flood mysqld error log
      
      Sometimes, Slaves requests a binlog file which does not exists on master.
      On this occasion, master will send an error to slave. The error number is 29
      Which means file does not find. This error message will lead a flood.
      
      Instead of error 29, error 
      COM_BINLOG_DUMP has a group of its own errors, The errors which have happend will be
      sent to slave immediately.
      Before the COM_BINLOG_DUMP error is reported by this function, an error
      sometimes has been set into thd->main_da by a low level function such as
      my_register_filename, which is called during COM_BINLOG_DUMP is
      executing. Thus, instead of the COM_BINLOG_DUMP error, the low level
      error is sent to slave.
      The low level error should never be sent to slave, it only be reported
      to master.
[10 Nov 2009 14:07] 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/89963

3191 Li-Bing.Song@sun.com	2009-11-10
      Bug#21437 server_errno=29 error message flood mysqld error log
      
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
      
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
      
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we reset the disagnostic area before setting the 
      ER_MASTER_FATAL_ERROR_READING_BINLOG in order to notify and stop the slave
      I/O thread immediately.
[14 Dec 2009 5:37] 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/93836

3236 Li-Bing.Song@sun.com	2009-12-14
      Bug#21437 server_errno=29 error message flood mysqld error log
      
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
      
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
      
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we reset the disagnostic area before setting the 
      ER_MASTER_FATAL_ERROR_READING_BINLOG in order to notify and stop the slave
      I/O thread immediately.
[8 Jan 2010 3:37] Libing Song
We has prepared a patch for the bug.
Please evaluate the target version.
[17 Nov 2010 9: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/124119

3384 Li-Bing.Song@sun.com	2010-11-17
      Bug#21437 server_errno=29 error message flood mysqld error log
            
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
            
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
            
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we reset the disagnostic area before setting the 
      ER_MASTER_FATAL_ERROR_READING_BINLOG in order to notify and stop the slave
      I/O thread immediately.
[16 Dec 2010 11:01] 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/127053

3404 Li-Bing.Song@sun.com	2010-12-16
      Bug#21437 server_errno=29 error message flood mysqld error log
                  
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
                  
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
                
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we use a temporary diagnostic area to store the low level errors.
      MASTER_FATAL_ERROR_READING_BINLOG is always set into dump thread's real
      diagnostic area and sent to slave I/O thread.
[17 Dec 2010 10:06] 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/127154

3444 Li-Bing.Song@sun.com	2010-12-17
      Bug#21437 server_errno=29 error message flood mysqld error log
                  
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
                  
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
                
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we use a temporary diagnostic area to store the low level errors.
      MASTER_FATAL_ERROR_READING_BINLOG is always set into dump thread's real
      diagnostic area and sent to slave I/O thread.
[17 Dec 2010 10:14] 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/127160

3446 Li-Bing.Song@sun.com	2010-12-17
      Bug#21437 server_errno=29 error message flood mysqld error log
                  
      If an error happens while dumping a binary log from the master,
      the master sends one of the specific set of error messages and
      the slave I/O thread stops immediately.
                  
      However, when a slave requests a binlog file which does not exist
      on master, the master sends 'EE_FILENOTFOUND' error (i.e. error code 29)
      to the slave. the 'EE_FILENOTFOUND' is a low level error and slave
      I/O thread will still retry to request the binlog file, thus is flooding
      the mysqld error log.
                
      This happens because the master just sends the first error message set in 
      the diagnostic area and as such the I/O thread does not stop. To fix the
      the problem, we use a temporary diagnostic area to store the low level errors.
      MASTER_FATAL_ERROR_READING_BINLOG is always set into dump thread's real
      diagnostic area and sent to slave I/O thread.
[17 Dec 2010 12:57] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:georgi.kodinov@oracle.com-20101217125013-y8pb3az32rtbplc9) (version source revid:georgi.kodinov@oracle.com-20101217112525-t71wcarh16fii9bz) (merge vers: 5.6.1) (pib:24)
[20 Dec 2010 5:07] Libing Song
Pushed into mysql-trunk-bugfixing
[18 May 2011 8:50] Jon Stephens
Documented bugfix in the 5.6.1 changelog as follows:

        When a slave requested a binary log file which did not exist on
        master, the slave continued to request the file regardless. This
        caused the slave's error log to be flooded with low-level
        EE_FILENOTFOUND errors (error code 29) from the master.

Closed.