Bug #21437 server_errno=29 error message flood mysqld error log
Submitted: 3 Aug 2006 23:40 Modified: 24 Nov 11:13
Reporter: Jonathan Miller
Status: In progress
Category:Server: Replication Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Linux)
Assigned to: Libing Song Target Version:
Triage: Triaged: D3 (Medium)

[3 Aug 2006 23: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 10: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 15: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.