mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#14363985: MYSQLD CRASHED WHEN DISABL AND
ENABLE AUDI PLUGIN WHEN DDL
OPERATION HAPPENING
PROBLEM: While unloading the plugin, state is
not checked before it is to be reaped.
This can lead to simultaneous free of
plugin memory by more than one thread.
Multiple deallocation leads to server
crash. In the present bug two threads
deallocate the alog_log plugin.
SOLUTION: A check is added to ensure that only
one thread is unloading the plugin.
NOTE: No mtr test is added as it requires
multiple threads to access critical
section. debug_sync cannot be used in
the current senario because we dont
have access to thread pointer in
some of the plugin functions. IMHO no
test case in the current time frame.
This commit is contained in:
@@ -1900,7 +1900,8 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
|
||||
mysql_audit_acquire_plugins(thd, MYSQL_AUDIT_GENERAL_CLASS);
|
||||
|
||||
mysql_mutex_lock(&LOCK_plugin);
|
||||
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
|
||||
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)) ||
|
||||
plugin->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DYING))
|
||||
{
|
||||
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str);
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user