Bug #109096 Server crashes at startup when innodb-log-file-size exceeds limit
Submitted: 15 Nov 2022 14:03 Modified: 15 Nov 2022 14:33
Reporter: Eleonora Zinchenko Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.30 OS:Any
Assigned to: CPU Architecture:Any

[15 Nov 2022 14:03] Eleonora Zinchenko
Description:

Hi,

In mysql 8.0.30 innodb_redo_log_capacity option was added instead of innodb_log_file_size and/or innodb_log_files_in_group. At server startup if the old options are used in conf (or passed via cmd) - the innodb_redo_log_capacity  is calculated. Details https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html . 
In 8.0.29 - if the passed value of innodb_log_file_size  exceeded the limit - the server did not start with error:
```2022-11-15T10:38:07.043825Z 0 [Note] [MY-012366] [InnoDB] Using Linux native AIO
2022-11-15T10:38:07.043926Z 0 [ERROR] [MY-012361] [InnoDB] Combined size of log files must be < 512 GB```

In 8.0.30 if the value of innodb_log_file_size  exceeds the limit the server crashes with assertion at startup:
```
2022-11-15T11:12:16.935750Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-11-15T11:12:16.935793Z 0 [Note] [MY-010120] [Server] Binlog end
2022-11-15T11:12:40.222854Z 0 [Note] [MY-010098] [Server] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2022-11-15T11:12:40.222909Z 0 [Note] [MY-010949] [Server] Basedir set to /mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/.
2022-11-15T11:12:40.222918Z 0 [System] [MY-010116] [Server] /mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld (mysqld 8.0.30) starting as process 19
937
2022-11-15T11:12:40.231491Z 0 [Note] [MY-012366] [InnoDB] Using Linux native AIO
2022-11-15T11:12:40.231527Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=2
251799813685248. Please use innodb_redo_log_capacity instead.
2022-11-15T11:12:40.231552Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: ha_innodb.cc:4720:srv_redo_log_capacity_used <= LOG_CAPACITY_MAX thread 139841601002752
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
11:12:40 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x1f68ece]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(print_fatal_signal(int)+0x2bf) [0xf021ff]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(my_server_abort()+0x6e) [0xf0233e]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(my_abort()+0xa) [0x1f636fa]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x312) [0x2208512]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld() [0x20419ae]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(ha_initialize_handlerton(st_plugin_int*)+0x5a) [0x10119ba]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld() [0xdbd787]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(plugin_register_builtin_and_init_core_se(int*, char**)+0x19a) [0xdc695a]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld() [0xca69fd]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld(mysqld_main(int, char**)+0x1d4d) [0xcae11d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f2f66f28c87]
/mysql_tar/mysql-8.0.30-linux-glibc2.17-x86_64-minimal/bin/mysqld() [0xc91c84]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file
```

How to repeat:
Initialize the datadir and start server with 'innodb-log-file-size' that exceeds max allowed value:
```./bin/mysqld --innodb-log-file-size=1125899906842624 --basedir=${PWD} --datadir=/mysql_tar/datadir --tmpdir=/tmp/075192 --core-file --port=59979 --pid_file=/mysql_tar/datadir/pid.pid --socket=/tmp/socket.sock --log-output=none --log-error-verbosity=3 --log-error=/mysql_tar/datadir/
master.err```
[15 Nov 2022 14:21] MySQL Verification Team
Hi Mrs. Zinchencko,

Thank you very much for your bug report.

However, this is not a bug.

The variables that you used are deprecated, which means that some of the InnoDB required parameters have been calculated wrongly.

You can read all about these options here:

https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_redo_log_capa...

Please, read carefully Release Notes for 8.0.30 and you shall know what to do ....

Not a bug.
[15 Nov 2022 14:33] Eleonora Zinchenko
Hi,

Sorry but why the server crashes instead of giving an error and stopping the server as it works in mysql8.0.29 with too big innodb-log-file-size value? The same behavior differs for too big ```innodb_redo_log_capacity``` value and ```innodb-log-file-size ``` which brings inconsistency. 
When ```innodb-log-file-size ``` exceeds - server crashes; when ```innodb_redo_log_capacity``` - server starts and decreases the value to allowed maximum. This should be improved.