Bug #41892 incorrect innodb_log_file_size crashes server at startup
Submitted: 6 Jan 2009 5:29 Modified: 29 Jan 2009 17:08
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Storage Engine API Severity:S1 (Critical)
Version:6.0.8, 6.0.10 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Triage: Triaged: D1 (Critical)

[6 Jan 2009 5:29] Shane Bester
Description:
when specifying an incorrect setting for innodb_log_file_size, the engine fails to start with this expected message:

InnoDB: Error: log file .\ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 4194304 bytes!
090106  7:25:32 [ERROR] Plugin 'InnoDB' init function returned error.
090106  7:25:32 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

However, after that mysqld crashes:

mysqld.exe!plugin_lock()[sql_plugin.cc:659]
mysqld.exe!ha_resolve_by_legacy_type()[handler.cc:191]
mysqld.exe!ha_checktype()[handler.cc:206]
mysqld.exe!open_binary_frm()[table.cc:762]
mysqld.exe!open_table_def()[table.cc:669]
mysqld.exe!get_table_share()[sql_base.cc:472]
mysqld.exe!get_table_share_with_create()[sql_base.cc:539]
mysqld.exe!open_table()[sql_base.cc:2588]
mysqld.exe!open_tables()[sql_base.cc:3709]
mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:4158]
mysqld.exe!acl_reload()[sql_acl.cc:699]
mysqld.exe!acl_init()[sql_acl.cc:287]
mysqld.exe!win_main()[mysqld.cc:4610]
mysqld.exe!NTService::IsService()[nt_servc.cc:516]
mysqld.exe!main()[mysqld.cc:4922]
mysqld.exe!mainCRTStartup()[crt0.c:259]

From that stack trace it's unclear to me whether this is an innodb bug or mysql bug.

How to repeat:
./bin/mysql_install_db --no-defaults
./bin/mysqld_safe --innodb_log_file_size=5M
./bin/mysqladmin shutdown -uroot
./bin/mysqld_safe --innodb_log_file_size=4M
[6 Jan 2009 5:33] Shane Bester
Note for users:  The correct way to change the innodb_log_file_size is documented here: http://dev.mysql.com/doc/refman/6.0/en/adding-and-removing.html

Nonetheless, server crash should be fixed.
[6 Jan 2009 5:49] Shane Bester
Another testcase for innodb:

mysqld --console --innodb-mirrored-log-groups=2

According to the docs, innodb-mirrored-log-groups must be set to 1.  Setting to
anything else causes a crash!
[29 Jan 2009 17:08] Ramil Kalimullin
Duplicate, see bug#40757: "Starting server on Windows with innodb_flush_method=wrong_value causes crash"
[4 Oct 2012 7:26] Marko Mäkelä
The log file size problem is a duplicate of Bug#13494.