[MDEV-15202] innodb.log_file_size failed in buildbot - Can't initiate database recovery, running in read-only-mode Created: 2018-02-04  Updated: 2018-02-05  Resolved: 2018-02-05

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB, Tests
Affects Version/s: 10.1
Fix Version/s: 10.0.35, 10.1.31

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-11814 Refuse innodb_read_only startup if cr... Closed
relates to MDEV-12700 Allow innodb_read_only startup withou... Closed

 Description   

http://buildbot.askmonty.org/buildbot/builders/winx64-debug/builds/7198/steps/test/logs/stdio

innodb.log_file_size '8k,xtradb'         w3 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2018-02-03 11:24:17
line
2018-02-03 11:23:26 6864 [ERROR] InnoDB: Can't initiate database recovery, running in read-only-mode.
 
2018-02-03 11:23:53 2052 [ERROR] InnoDB: Cannot resize log files in read-only mode.
 
^ Found warnings in D:/winx64-debug/build/mysql-test/var/3/log/mysqld.1.err
ok



 Comments   
Comment by Marko Mäkelä [ 2018-02-05 ]

By current design (with a bug fixed in MDEV-11814, and to be changed in MDEV-12700), innodb_read_only startup will be refused unless the redo log and the change buffer are empty.

As always with this message, the problem was caused by an earlier server startup. In this case, by the immediately preceding startup:

2018-02-03 11:23:15 1412 [Note] InnoDB: Highest supported file format is Barracuda.
2018-02-03 11:23:15 1412 [Note] InnoDB: The log sequence number 939315 in ibdata file do not match the log sequence number 939943 in the ib_logfiles!
2018-02-03 11:23:15 1412 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 2 row operations to undo
InnoDB: Trx id counter is 3840
2018-02-03 11:23:18 1412 [Warning] InnoDB: Resizing redo log from 3*640 to 2*640 pages, LSN=939943
2018-02-03 11:23:19 1412 [ERROR] Plugin 'InnoDB' init function returned error.
2018-02-03 11:23:19 1412 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

For the second warning, the cause is in the immediately preceding startup:

2018-02-03 11:23:50 6316 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 2 row operations to undo
InnoDB: Trx id counter is 3840
2018-02-03 11:23:50 6316 [Warning] InnoDB: Resizing redo log from 3*640 to 2*640 pages, LSN=939943
2018-02-03 11:23:50 6316 [ERROR] Plugin 'InnoDB' init function returned error.
2018-02-03 11:23:50 6316 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

This very test is injecting such faults, and it is passing for me locally:

innodb.log_file_size '8k,innodb_plugin'  [ pass ]  44599
innodb.log_file_size '8k,xtradb'         [ pass ]  46367

I do not see the message Can't initiate database in the server error log. It looks like it is only reported when the FIL_PAGE_FILE_FLUSH_LSN in the first page of the system tablespace file ibdata1 does not match the redo log checkpoint:

2018-02-03 11:23:26 6864 [Note] InnoDB: The log sequence number 939315 in ibdata file do not match the log sequence number 939943 in the ib_logfiles!
2018-02-03 11:23:26 6864 [ERROR] InnoDB: Can't initiate database recovery, running in read-only-mode.

So, this failure should be fixed by call mtr.add_suppression().

Generated at Thu Feb 08 08:19:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.