Bug #87501 MySQL5.7.16 memory leak
Submitted: 22 Aug 2017 8:54 Modified: 12 Sep 2017 21:22
Reporter: dehua yang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.7.16 OS:CentOS (6.6)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: OOM

[22 Aug 2017 8:54] dehua yang
Description:
hello , i meet the MySQL use RES memory more than I give it.

innodb_buffer_pool_size = 160G , but mysqld actually use 286G RES , and the RES
 will increase .

here is the ps aux | grep mysqld

mysql    30307  290 56.8 315492464 300936760 ? Sl   Aug01 88022:53 /usr/local/mysql-5.7.16-linux-glibc2.5-x86_64/bin/mysqld --basedir=/usr/local/mysql --datadir=/opt/mysql3306/data --plugin-dir=/usr/local/mysql/lib/plugin --tmpdir=/opt/mysql3306/tmp --log-bin=/opt/mysql3306/log/bin.log --log-bin-index=/opt/mysql3306/log/bin.index --server-id=10206 --log-error=/opt/mysql3306/data/error.log --pid-file=/opt/mysql3306/data/mysql3306.pid --socket=/opt/mysql3306/data/mysql3306.sock --port=3306

here is the memory alloaction list

select event_name,current_alloc from memory_global_by_current_bytes limit 30;

event_name	current_alloc
memory/innodb/buf_buf_pool	163.83 GiB
memory/innodb/hash0hash	4.67 GiB
memory/innodb/os0event	4.07 GiB
memory/sql/QUICK_RANGE_SELECT::alloc	736.03 MiB
memory/innodb/row0sel	208.37 MiB
memory/sql/NET::buff	108.85 MiB
memory/performance_schema/table_handles	99.69 MiB
memory/performance_schema/rwlock_instances	91.62 MiB
memory/performance_schema/file_instances	82.50 MiB
memory/sql/TABLE_SHARE::mem_root	77.50 MiB
memory/innodb/fil0fil	64.21 MiB
memory/innodb/buf0buf	55.44 MiB
memory/innodb/partitioning	45.64 MiB
memory/innodb/log0log	32.01 MiB
memory/performance_schema/events_statements_summary_by_thread_by_event_name	26.01 MiB

How to repeat:
i can't find the way to repeat it
[22 Aug 2017 8:56] dehua yang
here is the cat /proc/meminfo

Attachment: meminfo.txt (text/plain), 1.26 KiB.

[22 Aug 2017 8:57] dehua yang
here is the configuration file

Attachment: my.cnf (application/octet-stream, text), 5.10 KiB.

[22 Aug 2017 8:57] dehua yang
here is the show global  variables

Attachment: show_global.txt (text/plain), 15.00 KiB.

[12 Sep 2017 21:22] MySQL Verification Team
I do not see a bug here, you config allows MySQL to allocate more then 850GB

Please contact MySQL Support team if you need help optimizing your setup

all best
Bogdan