Bug #26844 Memory allocation failures ignored by slave IO thread
Submitted: 5 Mar 2007 15:39 Modified: 10 Apr 2007 19:07
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:All OS:Any (All)
Assigned to: Alexey Kopytov CPU Architecture:Any

[5 Mar 2007 15:39] Mark Leith
Description:
Any problems with calling _mymalloc() via a slave IO thread operation are ignored, as _mymalloc() uses my_message() to report problems back to the client (which the slave IO thread "ignores"). 

This makes diagnosing problems such as binlog truncation errors more difficult, as no indication of a lack of memory is reported

How to repeat:
N/A

Suggested fix:
Pass ME_NOREFRESH to my_message() within _mymalloc(), so that it also gets printed to the error log, such as:

my_message(EE_OUTOFMEMORY,buff,MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH));
[7 Mar 2007 12:43] 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/21357

ChangeSet@1.2459, 2007-03-07 15:43:36+03:00, kaa@polly.local +1 -0
  Fix for bug #26844 "Memory allocation failures ignored by slave IO thread".
  
  Pass ME_NOREFRESH flag to my_message() in _mymalloc() in case of memory allocation failure, so that it gets logged to the error log.
[26 Mar 2007 9:31] 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/22925

ChangeSet@1.2459, 2007-03-26 13:31:23+04:00, kaa@polly.local +2 -0
  Fix for bug #26844 "Memory allocation failures ignored by slave IO thread".
  
  Pass ME_NOREFRESH flag to an error handler in my_malloc() and _mymalloc() in case of memory allocation failure, so that it gets logged to the error log.
[6 Apr 2007 17:22] Bugs System
Pushed into 5.0.40
[6 Apr 2007 17:24] Bugs System
Pushed into 5.1.18-beta
[9 Apr 2007 19:51] Paul DuBois
Noted in 5.0.40, 5.1.18 changelogs.

Out-of-memory errors for slave I/O threads were not reported. Now
they are written to the error log.
[10 Apr 2007 19:06] Paul DuBois
Corrected changelog entry:

Out-of-memory errors were not reported. Now they are written to the
error log.