Bug #40757 | server crash after failed plugin/engine initialization | ||
---|---|---|---|
Submitted: | 14 Nov 2008 23:36 | Modified: | 14 Mar 2009 1:34 |
Reporter: | Alexey Stroganov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.30-win64 | OS: | Any |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[14 Nov 2008 23:36]
Alexey Stroganov
[14 Nov 2008 23:55]
Alexey Stroganov
Actually it crashes with any value of this parameter except ones that are expected
[15 Nov 2008 0:03]
Alexey Stroganov
Just checked it works ok for 5.0.70 and crashes for 5.1.29
[15 Nov 2008 0:23]
Alexey Stroganov
Just checked - it works ok in 5.1.27 and 5.1.28. Also adding below snippet from documentation: ... On Windows, the flush method is always async_unbuffered and cannot be changed. ...
[17 Nov 2008 9:19]
Olav Sandstå
Note that there is a bug report for 6.0.8 with a very similar crash, see bug #40766 "mysqld crashes if Falcon is started with non-existing serial log directory". The crash looks very similar but happens with Falcon and without InnoDB being included in the binaries.
[18 Nov 2008 1:25]
Calvin Sun
The crash is caused by the fix of bug#37958, specifically the reuse of plugin slot.
[18 Nov 2008 7:55]
Calvin Sun
From the error log, the InnoDB clearly identifies the invalid option value, and returns error to the server: InnoDB: Unrecognized value O_DIRECT for innodb_flush_method 081117 18:38:28 [ERROR] Plugin 'InnoDB' init function returned error. 081117 18:38:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. It works fine after taking the following new code out: --- a/sql/handler.cc 2008-09-05 15:21:59 +0000 +++ b/sql/handler.cc 2008-09-29 10:34:07 +0000 @@ -373,6 +373,10 @@ int ha_finalize_handlerton(st_plugin_int handlerton *hton= (handlerton *)plugin->data; DBUG_ENTER("ha_finalize_handlerton"); + /* hton can be NULL here, if ha_initialize_handlerton() failed. */ + if (!hton) + goto end; + switch (hton->state) { case SHOW_OPTION_NO: @@ -401,8 +405,16 @@ int ha_finalize_handlerton(st_plugin_int } } + /* + In case a plugin is uninstalled and re-installed later, it should + reuse an array slot. Otherwise the number of uninstall/install + cycles would be limited. + */ + hton2plugin[hton->slot]= NULL; + my_free((uchar*)hton, MYF(0)); + end: DBUG_RETURN(0); }
[29 Jan 2009 17:04]
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/64543 2750 Ramil Kalimullin 2009-01-29 Fix for bug #40757: Starting server on Windows with innodb_flush_method=wrong_value causes crash Problem: failed plugin initialization (e.g. due to improper parameters) may result in server crash. Fix: clean-up plugin related data if initialization failed.
[29 Jan 2009 17:09]
Ramil Kalimullin
Bug#40768, bug#42345, bug#41892 marked as duplicates of this one.
[31 Jan 2009 16:24]
MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=42302 marked as duplicate of this one.
[10 Feb 2009 8:38]
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/65700 2796 Ramil Kalimullin 2009-02-10 Fix for bug #40757: Starting server on Windows with innodb_flush_method=wrong_value causes crash Problem: after a failed plugin initialization, incompletely initialized data remained in the plugin and handlerton data structures. These were used later and caused the crash. Fix: clean-up plugin related data if initialization failed. Note: no test case added, hand tested.
[10 Feb 2009 9:21]
Ingo Strüwing
Good patch. Approved.
[19 Feb 2009 13:04]
Bugs System
Pushed into 6.0.10-alpha (revid:sergey.glukhov@sun.com-20090218125737-5y5b2xo3duo1wlvo) (version source revid:ramil@mysql.com-20090214140225-jm5lf0aj24so3h8d) (merge vers: 6.0.10-alpha) (pib:6)
[27 Feb 2009 20:45]
Paul DuBois
Noted in 6.0.10 changelog. On Windows, starting the server with an invalid value for innodb_flush_method caused a crash. Setting report to NDI pending push into 5.1.x.
[13 Mar 2009 19:06]
Bugs System
Pushed into 5.1.33 (revid:joro@sun.com-20090313111355-7bsi1hgkvrg8pdds) (version source revid:vvaintroub@mysql.com-20090218093153-sjzxf01i4ezte0xp) (merge vers: 5.1.33) (pib:6)
[14 Mar 2009 1:34]
Paul DuBois
Noted in 5.1.33 changelog.
[25 Mar 2009 6:46]
Sveta Smirnova
Bug #43845 was marked as duplicate of this one.
[9 May 2009 16:45]
Bugs System
Pushed into 5.1.34-ndb-6.2.18 (revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (version source revid:jonas@mysql.com-20090508100057-30ote4xggi4nq14v) (merge vers: 5.1.33-ndb-6.2.18) (pib:6)
[9 May 2009 17:42]
Bugs System
Pushed into 5.1.34-ndb-6.3.25 (revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (version source revid:jonas@mysql.com-20090508175813-s6yele2z3oh6o99z) (merge vers: 5.1.33-ndb-6.3.25) (pib:6)
[9 May 2009 18:39]
Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (version source revid:jonas@mysql.com-20090509073226-09bljakh9eppogec) (merge vers: 5.1.33-ndb-7.0.6) (pib:6)