Bug #25463 Memory allocation problems in replication slave thread (valgrind stack)
Submitted: 8 Jan 2007 10:19 Modified: 9 Mar 2007 14:24
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0.34 OS:
Assigned to: Rafal Somla CPU Architecture:Any
Tags: sr5_1

[8 Jan 2007 10:19] Rafal Somla
Description:
This bug is spawned from BUG#25306 as it seems to be a separate issue.

The issue is the following valgrind stack:

VALGRIND: '256 bytes in 1 blocks are still reachable in loss record 5 of 7'
    COUNT: 1
    FUNCTION: calloc    FILES:    slave.err
    TESTS:    rpl_rewrite_db
    STACK: at 0x4A1FB82: calloc (vg_replace_malloc.c:279)
             by 0x9BECF5: my_thread_init (my_thr_init.c:210)
             by 0x720C8F: handle_slave_io (slave.cc:3440)
             by 0x4E4D192: start_thread (in /lib64/libpthread-2.4.so)
             by 0x53C045C: clone (in /lib64/libc-2.4.so)

detected by pushbuild: <https://intranet.mysql.com/~knielsen/pb/getlog.pl?dir=mysql-5.0-engines&entry=istruewing@c...> 

How to repeat:
See pushbuild
[9 Feb 2007 9:21] Rafal Somla
The problem is related to general server shutdown problems which have been fixed in 5.1 tree. It was not decided to incorporate these changes into 5.0 tree.
[12 Feb 2007 15: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/19700

ChangeSet@1.2394, 2007-02-04 18:46:48+01:00, rafal@quant.(none) +1 -0
  BUG#25463 (Memory allocation problems in replication slave thread):
  The problem is (most probably) caused by whole server shutting down before a 
  slave thread terminates correctly. Fixing this requires fixing server shutdown
  code which has been done in 5.1 tree. Thus we ignore the issue in 5.0 assuming 
  that it is fixed in 5.1.
[28 Feb 2007 19:01] Chuck Bell
Patch approved.
[1 Mar 2007 9:51] Rafal Somla
Pushed into 5.0-rpl.

IMPORTANT! This patch should *not* be merged into 5.1 tree.
[8 Mar 2007 8:28] Andrei Elkin
pushed to 5.0.38
[9 Mar 2007 14:24] MC Brown
Internal change only, no entry recorded in the changelog.