Comment 1 for bug 489088

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

the problem happens when pbxt is the default storage engine. whenever a new thread starts (a thread that inits a THD instance) the following code is executed in function thd_init_vars or something like that (called from THD::THD):

2456 pthread_mutex_lock(&LOCK_plugin);
2457 thd->variables.table_plugin=
2458 my_intern_plugin_lock(NULL, global_system_variables.table_plugin);
2459 intern_plugin_unlock(NULL, old_table_plugin);

the problem is that pbxt starts its own worker threads that init corresponding THD instances. In some sense pbxt locks itself. to solve this problem we'd need to make another 'background' plugin that would shutdown all pbxt worker threads or have 2-phase shutdown on server side.