Bug #26634 Valgrind failure in tree: memory loss for memory allocated in rpl_utility.h
Submitted: 26 Feb 2007 13:02 Modified: 9 Mar 2007 15:47
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Mats Kindahl CPU Architecture:Any

[26 Feb 2007 13:02] Mats Kindahl
Description:
Memory loss for memory allocated in rpl_utility.h:59

How to repeat:
Look in valgrind run for the following::

  ==21830== 2,774 bytes in 1,387 blocks are definitely lost in loss record 7 of 7
  ==21830==    at 0x4A20859: malloc (vg_replace_malloc.c:149)
  ==21830==    by 0x6C11A7: Table_map_log_event::exec_event(st_relay_log_info*) (rpl_utility.h:59)
  ==21830==    by 0x792813: exec_relay_log_event(THD*, st_relay_log_info*) (slave.cc:1799)
  ==21830==    by 0x793092: handle_slave_sql (slave.cc:2361)
  ==21830==    by 0x4D44192: start_thread (in /lib64/libpthread-2.4.so)
  ==21830==    by 0x52B745C: clone (in /lib64/libc-2.4.so)

Suggested fix:
Ensure that memory for RPL_TABLE_LIST::m_tabledef is released in clear_tables_to_lock().
[26 Feb 2007 14:17] 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/20572

ChangeSet@1.2460, 2007-02-26 15:16:48+01:00, mats@romeo.(none) +4 -0
  BUG#26634 (Valgrind failure in tree: memory loss for memory allocated in rpl_utility.h):
  Adding code to release allocated memory when tables_to_lock list is
  cleared.
[26 Feb 2007 16:45] 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/20581

ChangeSet@1.2460, 2007-02-26 17:44:55+01:00, mats@romeo.(none) +4 -0
  BUG#26634 (Valgrind failure in tree: memory loss for memory allocated in rpl_utility.h):
  Adding code to release allocated memory when tables_to_lock list is
  cleared.
[9 Mar 2007 15:47] MC Brown
No changelog entry required.