Hi, Sergey! On Oct 12, Sergey Vojtovich wrote:
revision-id: 06bb7eef9882536fc1d99b4462a65b53ec9f137e (mariadb-5.5.57-14-g06bb7ee) parent(s): 93aadda513d8b5c2b49001514e235c4fdd73e08a committer: Sergey Vojtovich timestamp: 2017-10-12 15:37:45 +0400 message:
MDEV-10892 - rpl.rpl_semi_sync_uninstall_plugin fails with Assertion `0' failure in buildbot
Removed plugin_array_version: it is being checked without mutex protection and thus is prone to data race and race conditions. In effect plugins are not protected from concurrent destruction.
Removed state_mask inversion: doesn't seem to make any sense.
When collecting local plugins list, only add plugins that match state_mask.
Use plugin ref counting to protect against concurrent plugin destruction.
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6e04564..512548b 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -262,7 +262,7 @@ int fill_plugins(THD *thd, TABLE_LIST *tables, COND *cond) TABLE *table= tables->table;
if (plugin_foreach_with_mask(thd, show_plugins, MYSQL_ANY_PLUGIN, - ~PLUGIN_IS_FREED, table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), table)) DBUG_RETURN(1);
DBUG_RETURN(0); @@ -5294,7 +5294,8 @@ int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_ENTER("fill_schema_engines"); if (plugin_foreach_with_mask(thd, iter_schema_engines, MYSQL_STORAGE_ENGINE_PLUGIN, - ~PLUGIN_IS_FREED, tables->table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), + tables->table)) DBUG_RETURN(1); DBUG_RETURN(0); }
agree, ok to push Regards, Sergei Chief Architect MariaDB and security@mariadb.org