MDEV-25019 memory allocation failures during startup because

	server failure in different, confusing ways

InnoDB fails to free the buffer pool instance mutex and zip mutex
If the allocation of buffer pool instance chunk fails. So it leads
to freeing of buffer pool before freeing the mutexes and
leads to double freeing of memory while freeing the mutex
during shutdown.
parent 82a2ea64
call mtr.add_suppression("InnoDB: Cannot allocate memory for the buffer pool");
call mtr.add_suppression("InnoDB: Plugin initialization aborted at srv0start.cc.*");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
#
# MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
#
--source include/have_innodb.inc
--source include/have_debug.inc
call mtr.add_suppression("InnoDB: Cannot allocate memory for the buffer pool");
call mtr.add_suppression("InnoDB: Plugin initialization aborted at srv0start.cc.*");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
--echo #
--echo # MDEV-25019 memory allocation failures during startup cause server failure in different, confusing ways
--echo #
let restart_parameters=--debug_dbug="+d,ib_buf_chunk_init_fails";
--source include/restart_mysqld.inc
......@@ -1864,6 +1864,10 @@ buf_pool_init_instance(
ut_free(buf_pool->chunks);
buf_pool_mutex_exit(buf_pool);
/* InnoDB should free the mutex which was
created so far before freeing the instance */
mutex_free(&buf_pool->mutex);
mutex_free(&buf_pool->zip_mutex);
return(DB_ERROR);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment