Multi-threaded slave leaks worker threads in case of thread create failure
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 |
Fix Released
|
Low
|
Laurynas Biveinis | |||
5.7 |
Fix Released
|
Low
|
Laurynas Biveinis |
Bug Description
On PS 5.6 trunk, at the end of
rpl.rpl_mts_debug 'mix' w3 [ pass ] 4967
PROCESSLIST shows a stale SQL worker thread that is stopped by nobody. The testcase reduces to
--source include/
--source include/
--source include/
--source include/
#
# Bug#12964649 MTS memory not released
#
# Originally reported when opt_slave_
# than sizeof(BLOB) * 8 - 1 Workers initialization code fails.
# VALID_RANGE() for opt_slave_
#
# The current bug test simulates a failure to start by a Worker
# thread, checks the error, and verifies that all memory is released
# (valgrind proves, the user can watch top report).
#
connection slave;
call mtr.add_
call mtr.add_
call mtr.add_
source include/
set @save.slave_
set @save.slave_
# The following assignment can work only with debug builds.
# It sets opt_slave_
# set @@global.
set @save.debug= @@global.debug;
SET @@global.debug= "d,mts_
set @@global.
start slave sql_thread;
--let $slave_sql_errno= 1593
source include/
set @@global.
set @@global.
set @@global.debug= @save.debug;
source include/
--source include/rpl_end.inc
tags: | added: upstream |
https:/ /github. com/percona/ percona- server/ pull/1012 /github. com/percona/ percona- server/ pull/1013
https:/