[MDEV-23389] mtr: bootstrap doesn't check for correct plugin initialization Created: 2020-08-03  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Vicențiu Ciorbaru Assignee: Vicențiu Ciorbaru
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The problem was first discovered in buildbot.mariadb.org
https://buildbot.mariadb.org/#/builders/38/builds/2300/steps/8/logs/stdio

The failure is:

innodb.check_ibd_filesize '64k,innodb'   w20 [ fail ]
        Test ended at 2020-08-01 05:13:56
CURRENT_TEST: innodb.check_ibd_filesize
mysqltest: At line 12: query 'CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB' failed: 1286: Unknown storage engine 'InnoDB'
The result from queries just before the failure was:
#
# Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
 - skipping '/buildbot/pc9-clang6-ubuntu-1804/build/mysql-test/var/20/log/innodb.check_ibd_filesize-64k,innodb/'
Retrying test innodb.check_ibd_filesize, attempt(2/3)...
worker[20] > Restart  - not started
***Warnings generated in error logs during shutdown after running tests: innodb.check_ibd_filesize
2020-08-01  5:13:54 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2020-08-01  5:13:54 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2020-08-01  5:13:56 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-08-01  5:13:56 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

To reproduce the problem, one must run with a sufficiently small shared mem (/dev/shm) space (120 MB) and a sufficiently large parallel number. If the server fails to allocate ibdata1 during bootstrap, the following errors will appear in the bootstrap.log file:

2020-08-03 14:12:07 0 [ERROR] InnoDB: preallocating 79691776 bytes for file ./ibdata1 failed with error 28
2020-08-03 14:12:07 0 [ERROR] InnoDB: preallocating 79691776 bytes for file ./ibdata1 failed with error 28
2020-08-03 14:12:07 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.

To reproduce the problem, without all this space race condition madness, simply edit:

SysTablespace::set_size() in storage/innobase/fsp/fsp0sysspace.cc

to return DB_ERROR before the file is allocated.

A fix for this problem involves making sure the bootstrap stage of mtr correctly checks for plugin initialization. Any error messages during bootstrap should automatically cause the test to fail.


Generated at Thu Feb 08 09:22:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.