On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Medium
|
Vladimir Kolesnikov | ||
PBXT |
Fix Released
|
Undecided
|
Vladimir Kolesnikov |
Bug Description
As reported by Kristian:
MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown
The bug has been repeated with MariaDB: lp:~maria-captains/maria/5.1-merge
Create a file "mysql-
-------
--skip "Test shutdown problem with skipped test"
-------
Then enter:
cd mysql-test
perl mysql-test-run.pl --suite=pbxt pbxt.kn
Kristian says:
I get this in the mysqld.1.err:
CURRENT_TEST: pbxt.kn
091124 15:11:00 [Note] Plugin 'InnoDB' is disabled.
091124 15:11:00 [Note] PrimeBase XT (PBXT) Engine 1.0.08d RC loaded...
091124 15:11:00 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://
091124 15:11:00 [Note] Event Scheduler: Loaded 0 events
091124 15:11:00 [Note] /home/knielsen/
Version: '5.1.41-
091124 15:11:00 [Note] Got signal 15 to shutdown mysqld
091124 15:11:00 [Note] /home/knielsen/
091124 15:11:00 [Note] Event Scheduler: Purging the queue. 0 events
091124 15:11:00 [Warning] Plugin 'MyISAM' will be forced to shutdown
091124 15:11:00 [Warning] Plugin 'PBXT' will be forced to shutdown
091124 15:11:00 [Note] PrimeBase XT Engine shutdown...
091124 15:11:00 [Note] Debug sync points hit: 50
091124 15:11:00 [Note] Debug sync points executed: 0
091124 15:11:00 [Note] Debug sync points max active per thread: 0
091124 15:11:00 [Note] /home/knielsen/
This is from this tree on Launchpad containing the merge with MySQL 5.1.41:
lp:~maria-captains/maria/5.1-merge
The problem is that the ref_count of PBXT is 2 at shutdown time.
Maybe this is another problem with the way that PBXT has to do init in a
separate thread, I see you already had to solve some other possibly related
problems. Any ideas? It may be that this is something introduced in the merge
with MySQL 5.1.41, not 100% sure though as this particular warning was not
detected before in our Buildbot tests...
Related branches
- PBXT Core: Pending requested
-
Diff: 61 lines (+27/-1)2 files modifiedChangeLog (+4/-0)
src/myxt_xt.cc (+23/-1)
Changed in pbxt: | |
assignee: | nobody → Vladimir Kolesnikov (vkolesnikov) |
status: | New → In Progress |
Changed in maria: | |
status: | New → In Progress |
assignee: | nobody → Vladimir Kolesnikov (vkolesnikov) |
Changed in maria: | |
status: | Fix Committed → Fix Released |
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) ; table_plugin= plugin_ lock(NULL, global_ system_ variables. table_plugin) ; plugin_ unlock( NULL, old_table_plugin);
2457 thd->variables.
2458 my_intern_
2459 intern_
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.