Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1, 10.2, 10.3, 10.4, 10.5
-
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.