Bug #68530 memory leak with innodb memcached plugin for stale connection

Submitted: 28 Feb 2013 21:32 Modified: 22 Aug 2013 15:44
Reporter: Jijo Varghese Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Memcached Severity:S1 (Critical)
Version:5.6.10 GA OS:Linux (Centos 5)
Assigned to: CPU Architecture:Any
Tags: memcached plugin, memory leak

[28 Feb 2013 21:32] Jijo Varghese
Description:
innodb memcached plugin leaks memory on every connection

How to repeat:
very easy to reproduce.  just use any app or script that uses new connection - memslap does NOT meet this so we'll use https://github.com/antirez/mc-benchmark

Install mysql and memcached plugin as documented  
rpm -Uvh MySQL-server-5.6.10-1.rhel5.x86_64.rpm
mysql> source /usr/share/mysql/innodb_memcached_config.sql;
mysql> install plugin daemon_memcached soname "libmemcached.so";

Compile and install https://github.com/antirez/mc-benchmark/archive/master.zip
In one window
# echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
# ./mc-benchmark  -k 0 -l -c 400 -q

In another
# top -b -d 5 | grep -w mysqld
22284 mysql     18   0 1204m 673m 7060 S  4.0  4.4   6:28.23 mysqld
22284 mysql     18   0 1204m 675m 7060 S 13.2  4.4   6:28.89 mysqld
22284 mysql     18   0 1205m 676m 7060 S 19.4  4.4   6:29.86 mysqld
22284 mysql     18   0 1205m 677m 7060 S  8.4  4.4   6:30.28 mysqld
22284 mysql     18   0 1206m 679m 7060 S 24.2  4.4   6:31.49 mysqld
22284 mysql     18   0 1206m 680m 7060 S  8.2  4.4   6:31.90 mysqld
22284 mysql     18   0 1207m 682m 7060 S 25.6  4.4   6:33.18 mysqld
22284 mysql     18   0 1207m 684m 7060 S  9.8  4.5   6:33.67 mysqld
[17 Apr 2013 10:19] yang ting
I also met! 
 6836 my4444    18   0 39.4g  22g 7040 S 300.2 23.8   4:50.36 mysqld                                                     
 6836 my4444    18   0 39.7g  22g 7040 S 294.9 23.9   4:53.33 mysqld                                                     
 6836 my4444    18   0 40.0g  22g 7040 S 299.9 24.0   4:56.35 mysqld                                                     
 6836 my4444    18   0 40.4g  22g 7040 S 306.6 24.1   4:59.44 mysqld                                                     
 6836 my4444    18   0 40.7g  22g 7040 S 296.9 24.2   5:02.43 mysqld                                                     
 6836 my4444    18   0 41.1g  22g 7040 S 289.6 24.3   5:05.34 mysqld                                                     
 6836 my4444    18   0 41.4g  22g 7040 S 293.7 24.4   5:08.30 mysqld                                                     
 6836 my4444    18   0 41.7g  23g 7040 S 306.5 24.5   5:11.38 mysqld                                                     
 6836 my4444    18   0 42.0g  23g 7040 S 294.6 24.6   5:14.35 mysqld                                                     
 6836 my4444    18   0 42.3g  23g 7040 S 297.5 24.7   5:17.34 mysqld                                                     
 6836 my4444    18   0 42.7g  23g 7040 S 292.1 24.7   5:20.29 mysqld                                                     
 6836 my4444    18   0 43.0g  23g 7040 S 281.3 24.8   5:23.12 mysqld
[22 Aug 2013 15:44] Bugs System
Noted in 5.6.13, 5.7.2 changelog.

"Stale InnoDB memcached connections would result in a memory leak."

Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.