Bug #41502 | MTR v2 should not load plugins during server bootstrap | ||
---|---|---|---|
Submitted: | 16 Dec 2008 13:06 | Modified: | 30 Jan 2009 18:04 |
Reporter: | John Embretsen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Tests | Severity: | S7 (Test Cases) |
Version: | MTR_v2, 6.0-rpl, 5.1-rpl | OS: | Any |
Assigned to: | John Embretsen | CPU Architecture: | Any |
Tags: | 51rpl, 6.0-rpl-green, falcon_bug_39708, pushbuild |
[16 Dec 2008 13:06]
John Embretsen
[16 Dec 2008 13:29]
Magnus Blåudd
Please fix by suggested solution 2
[16 Dec 2008 14:03]
John Embretsen
I tried using suggested Option 2: --skip-plugin-load However this does not seem to resolve the issue (tested by running falcon_bug_39708 test). mysql-test/var/log/bootstrap.log shows an error message (replaced full paths with "$srcdir" for readability): $srcdir/sql/mysqld --no-defaults --bootstrap --basedir=$srcdir --datadir=$srcdir/mysql-test/var/install.db --skip-plugin-load --tmpdir=$srcdir/mysql-test/var/tmp/ --core-file --language=$srcdir/sql/share/english --character-sets-dir=$srcdir/sql/share/charsets 081216 14:51:06 [ERROR] Can't open shared library '$srcdir/lib/mysql/plugin/0' (errno: 2 cannot open shared object file: No such file or directory) 081216 14:51:06 [Note] Falcon: unable to open system data files. 081216 14:51:06 [Note] Falcon: creating new system data files. InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! (...) The lines mentioning Falcon indicate that the Falcon plugin is indeed being initialized. Advice would be appreciated (I know nothing about this option; it does not seem to be documented). The binaries were configured with the following options: CFLAGS="-g" CXXFLAGS="-g" --with-debug=full --with-ssl --with-plugins=max --with-extra-charsets=complex --with-embedded-server Note that adding --loose-skip-falcon instead (fix Option 1) seems to work, though. Patch against mysql-6.0-rpl implementing Suggested Fix Option 1: === modified file 'mysql-test/mysql-test-run.pl' --- mysql-test/mysql-test-run.pl 2008-12-15 12:41:31 +0000 +++ mysql-test/mysql-test-run.pl 2008-12-16 12:49:04 +0000 @@ -2589,6 +2589,8 @@ mtr_add_arg($args, "--basedir=%s", $install_basedir); mtr_add_arg($args, "--datadir=%s", $install_datadir); mtr_add_arg($args, "--loose-skip-innodb"); + mtr_add_arg($args, "--loose-skip-falcon"); mtr_add_arg($args, "--loose-skip-ndbcluster"); mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/"); mtr_add_arg($args, "--core-file"); Assigning myself since I am already working on this. Setting Magnus as reviewer since he is the MTR expert at the moment. Setting Sven as second reviewer since a fix for this issue needs to be pushed to rpl branches (where MTR v2 is) and he is the one who reported the original Bug#41014.
[16 Dec 2008 16:26]
Magnus Blåudd
Please commit a patch with this solution. I checked the code in mysqld.cc where we call 'plugin_init' and there are no trace of a possibility to disable the loading pf plugins(except by using --help). In my opinion there should be such a flag or --bootstrap should also pass the flag PLUGIN_INIT_SKIP_INITIALIZATION to 'plugin_init' like --help does. But that is another bug.
[17 Dec 2008 8:39]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/61841 2708 John H. Embretsen 2008-12-17 Fix (preliminary?) for Bug#41502 - MTR v2 should not load plugins during server bootstrap. Adding --loose-skip-falcon option to the mysqld options provided by MTR (v2) during mysqld bootstrap in order to avoid plugin (in this case Falcon) initialization of static variables etc. Options --loose-skip-innodb and --loose-skip-ndbcluster were already included. This will fix Bug#41014 (falcon_bug_39708 fails in pushbuild in 6.0-rpl: "succeeded - should have failed") in the case of MTR v2 (which currently is available in -rpl branches only). MTR v1 (e.g. in main 6.0 branch) does not have this problem. It would be more ideal to remove the --loose-skip-* options and provide a single option disabling all plugin initialization instead, or have bootstrap do this by default. Server modifications are (most likely) needed to be able to do that.
[18 Dec 2008 12:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/61963 2755 John H. Embretsen 2008-12-18 [merge] Fix (preliminary?) for Bug#41502 - MTR v2 should not load plugins during server bootstrap. Adding --loose-skip-falcon option to the mysqld options provided by MTR (v2) during mysqld bootstrap in order to avoid plugin (in this case Falcon) initialization of static variables etc. Options --loose-skip-innodb and --loose-skip-ndbcluster were already included. This will fix Bug#41014 (falcon_bug_39708 fails in pushbuild in 6.0-rpl: "succeeded - should have failed") in the case of MTR v2 (which currently is available in -rpl branches only). MTR v1 (e.g. in main 6.0 branch) does not have this problem. It would be more ideal to remove the --loose-skip-* options and provide a single option disabling all plugin initialization instead, or have bootstrap do this by default. Server modifications are (most likely) needed to be able to do that.
[18 Dec 2008 15:15]
John Embretsen
Fix ("Option 1", --loose-skip-falcon) pushed to: mysql-6.0-rpl (revision-id: john.embretsen@sun.com-20081218142940-v0w20qc3a6pxqey6) mysql-5.1-rpl (revision-id: john.embretsen@sun.com-20081218145516-sosg2436ne36yflq)
[19 Dec 2008 13:34]
John Embretsen
Magnus, I'll leave it up to you to file a new bug for adding a flag for skipping plugin initialization and/or change --bootstrap as you mention in your comment on Dec 16 if you want to, because you obviously know more about this than I do :)
[7 Jan 2009 14:26]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/62605 2709 He Zhenxing 2009-01-07 [merge] Auto merge
[30 Jan 2009 13:29]
Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:10]
Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:zhenxing.he@sun.com-20090107142538-aeoxq3lddk0g4uff) (merge vers: 5.1.31) (pib:6)
[30 Jan 2009 18:04]
Paul DuBois
Test suite changes. No changelog entry needed.
[17 Feb 2009 14:58]
Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:45]
Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:21]
Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)