Bug #72885 | MySQL 5.6 memory leak | ||
---|---|---|---|
Submitted: | 5 Jun 2014 7:50 | Modified: | 1 Apr 2015 10:29 |
Reporter: | Ivan Stoykov | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 5.6.17 | OS: | Linux (Red Hat Enterprise Linux Server release 6.3) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | repository=table |
[5 Jun 2014 7:50]
Ivan Stoykov
[8 Aug 2014 4:09]
Vladimir Rynkov
The original bug was reported for MySQL 5.6.17; I was able to reproduce it in MySQL 5.6.20.
[13 Aug 2014 13:20]
Joe Grasse
I got to a point where I had to try something on my production servers because of the memory usage, and I just did a stop and start of replication. Memory wasn't instantly released, but memory usage has been trickling down ever since.
[13 Dec 2014 7:20]
MySQL Verification Team
Hi, Please see if memory leaks after changing the slave parameter. In my case it stopped leaking. SET GLOBAL sync_master_info=0; Also, a simpler testcase, run this on master: drop table if exists t1; drop view if exists t1; create table t1(a int auto_increment primary key, b int, c int) engine=innodb; drop procedure if exists p1; delimiter $ create procedure p1() begin set @a:=1; repeat start transaction; insert into t1(b,c) values (@a:=@a+1,@a); delete from t1 where a=@a-4; commit; until 1=2 end repeat; end $ delimiter ; call p1();
[13 Dec 2014 8:31]
MySQL Verification Team
flush_master_info calls and leaks. heap profile.
Attachment: mybin.hprof.3277.heap.pdf (application/pdf, text), 8.51 KiB.
[22 Dec 2014 18:34]
Yang Liu
My version is 5.6.21, We are seeing the leak when relay-log-info-repository = TABLE master-info-repository = TABLE sync-master-info = 1 We changed to relay-log-info-repository = FILE master-info-repository = FILE The situation is improved. seems this is releated to relay-log-info-repository = TABLE master-info-repository = TABLE no matter RBR OR SBR
[1 Apr 2015 10:29]
Venkatesh Duggirala
This bug is marked as duplicate of bug#69848
[2 Jun 2015 3:51]
James Day
This is fixed in 5.6.25 where the release note at http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-25.html describes the fix as: "Replication: When master_info_repository=TABLE the receiver thread stores received event information in a table. The memory used in the process of updating the table was not being freed correctly and this could lead to an out of memory error. The fix ensures that after an event is flushed to the relay log file by a receiver thread, the memory used is freed. (Bug #72885, Bug #19390463, Bug #69848, Bug #20124342)" James Day, MySQL Senior Principal Support Engineer, Oracle