Bug #81654 Can not start MySQL with innodb_log_buffer_size if there is not enough memory
Submitted: 31 May 2016 7:55 Modified: 31 May 2016 14:07
Reporter: Shahriyar Rzayev (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.12 OS:Any
Assigned to: CPU Architecture:Any

[31 May 2016 7:55] Shahriyar Rzayev
Description:
Starting MySQL with: 
innodb_log_buffer_size=4294967295

From 5.7.6 max value is -> 4294967295
http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_log_buffer_siz...

Result:

2016-05-31T07:49:19.795299Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-05-31T07:49:19.800796Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-05-31T07:50:18.837004Z 0 [ERROR] InnoDB: Cannot allocate 4294951448 bytes of memory after 60 retries over 60 seconds. OS error: Cannot allocate memory (12). Check 
if you should increase the swap file or ulimits of your operating system. Note that on most 32-bit computers the process memory space is limited to 2 GB or 4 GB.
2016-05-31 11:50:18 0x7f7926ba1740  InnoDB: Assertion failure in thread 140158317500224 in file ut0ut.cc line 935
InnoDB: Failing assertion: !m_fatal
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xef0a4b]
/usr/sbin/mysqld(handle_fatal_signal+0x461)[0x7aef91]
/lib64/libpthread.so.0(+0xf100)[0x7f7926780100]
/lib64/libc.so.6(gsignal+0x37)[0x7f79251745f7]
/lib64/libc.so.6(abort+0x148)[0x7f7925175ce8]
/usr/sbin/mysqld[0x77f3ee]
/usr/sbin/mysqld(_ZN2ib14fatal_or_errorD2Ev+0x2f8)[0x10c5ba8]
/usr/sbin/mysqld[0xf8469e]
/usr/sbin/mysqld(_Z8log_initv+0xdd)[0xf8e8dd]
/usr/sbin/mysqld(_Z34innobase_start_or_create_for_mysqlv+0x1fd2)[0x106e942]
/usr/sbin/mysqld[0xf38c45]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x51)[0x7fa341]
/usr/sbin/mysqld[0xce3675]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x620)[0xcea5a0]
/usr/sbin/mysqld[0x7a7efd]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x842)[0x7a9422]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f7925160b15]
/usr/sbin/mysqld[0x79f255]

How to repeat:
See description

Suggested fix:
Same as resizing innodb_buffer_pool_size online:

http://bugs.mysql.com/bug.php?id=77564
[31 May 2016 14:07] Sinisa Milivojevic
Hi,

Thank you for your bug report. However, this is not a bug.

First of all, InnoDB has to round the number to the page boundaries.

Second, your system does not have virtual memory for that big a buffer.

Hence, not a bug.
[10 Jan 2017 11:37] Umesh Shastry
Bug #84455 marked as duplicate of this
[29 Oct 2018 5:19] Umesh Shastry
Bug #92963 marked as duplicate of this one