percona 5.7.13-6-1 SLAVE SQL_THREAD memory leaks on the active server with Master-Master replication when relay_log_info_repository=TABLE
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Fix Released
|
High
|
Vlad Lesin |
Bug Description
We have two servers with Master-Master GTID replication, active-passive mode. After upgrading to 5.7.11/5.7.13,the active master started to run out of memory so often, even with performance schema turned off. By just stopping and starting SLAVE SQL_THREAD, memory usage goes back to normal (innodb buffer pool size + 8% of innodb buffer pool size)
i.e: STOP SLAVE SQL_THREAD;START SLAVE SQL_THREAD
The issue has been reproduced on a test env while active server was running in debug mode(Massif-
how to reproduce:
1- set up master master with GTID replication.
2- create one database; and one table
create table mytest ( id int not null auto_increment primary key, c1 varchar(128), c2 varchar(128) ) engine = innodb;
3- continuously run these queries on it and check RES memory usage,
SELECT count(DISTINCT id) from mytest;
INSERT into mytest (c1,c2) VALUES ('VAL1','VAL2')
UPDATE mytest.mytest set c1='newval1' where id =
attached complete massif.out and globalvariables
->09.32% (578,806,592B) 0x188E91C: my_raw_malloc (in /usr/sbin/
| ->09.32% (578,806,592B) 0x188E519: my_malloc (in /usr/sbin/
| ->09.03% (561,046,608B) 0x1887A44: alloc_root (in /usr/sbin/
| | ->08.75% (543,172,776B) 0xEFC948: Sql_alloc::operator new(unsigned long, st_mem_root*) (in /usr/sbin/
| | | ->06.25% (388,424,352B) 0x153B929: LEX::new_
| | | | ->06.25% (388,424,352B) 0x153BEEE: LEX::new_
| | | | ->06.25% (388,424,352B) 0x153B5E2: lex_start(THD*) (in /usr/sbin/
| | | | ->06.25% (388,424,352B) 0x1858CB9: Rpl_info_
| | | | | ->06.25% (388,424,352B) 0x181FA59: System_
| | | | | ->06.25% (388,424,352B) 0x186E3D3: Rpl_info_
| | | | | ->06.25% (388,424,352B) 0x184BED8: Rpl_info_
| | | | | ->06.25% (388,424,352B) 0x1852F79: Relay_log_
| | | | | ->06.25% (388,424,352B) 0x18502B1: Relay_log_
| | | | | ->06.25% (388,424,352B) 0x17D0034: Rotate_
| | | | | ->06.25% (388,424,352B) 0x184600E: Log_event:
| | | | | ->06.25% (388,424,352B) 0x18350C4: apply_event_
| | | | | ->06.25% (388,424,352B) 0x1835EC3: exec_relay_
| | | | | ->06.25% (388,424,352B) 0x183C23C: handle_slave_sql (in /usr/sbin/
| | | | | ->06.25% (388,424,352B) 0x18CBD18: pfs_spawn_thread (in /usr/sbin/
| | | | | ->06.25% (388,424,352B) 0x4E340A2: start_thread (pthread_
| | | | | ->06.25% (388,424,352B) 0x6E2687B: clone (clone.S:111)
Thanks,
Muayad Yousef
summary: |
- percona 5.7.11-4 SLAVE SQL_THREAD memory leaks on the active server + percona 5.7.13-6-1 SLAVE SQL_THREAD memory leaks on the active server with Master-Master replication when relay_log_info_repository=TABLE |
description: | updated |
tags: | added: upstream |
this happens when setting relay_log_ info_repository =TABLE, there is no memory leak when switched to relay_log_ info_repository =FILE