Skip to content
Permalink
Browse files
MDEV-15796 MariaDB crashes on startup with semisync master enabled
Recent changes in semisync initialization via MDEV-13073 introduced
instantiation of THD too early from the server components
pov which led to segfault.

Fixed with relocating the semisync component initialization
to later time when thread specific memory can be used.
  • Loading branch information
andrelkin committed Apr 13, 2018
1 parent 93b3a48 commit 95811f0
Showing 1 changed file with 13 additions and 7 deletions.
@@ -5203,13 +5203,6 @@ static int init_server_components()
"this server. However this will be ignored as the "
"--log-bin option is not defined.");
}

if (repl_semisync_master.init_object() ||
repl_semisync_slave.init_object())
{
sql_print_error("Could not initialize semisync.");
unireg_abort(1);
}
#endif

if (opt_bin_log)
@@ -5385,6 +5378,19 @@ static int init_server_components()
}
plugins_are_initialized= TRUE; /* Don't separate from init function */

#ifdef HAVE_REPLICATION
/*
Semisync is not required by other components, which justifies its
initialization at this point when thread specific memory is also available.
*/
if (repl_semisync_master.init_object() ||
repl_semisync_slave.init_object())
{
sql_print_error("Could not initialize semisync.");
unireg_abort(1);
}
#endif

#ifndef EMBEDDED_LIBRARY
{
if (Session_tracker::server_boot_verify(system_charset_info))

0 comments on commit 95811f0

Please sign in to comment.