Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.1(EOL) , 10.2(EOL) , 10.3(EOL) , 10.4(EOL) , 10.5
This issue was happened while testing bb-10.5-thiru for MDEV-8139 .
Back trace is
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x000055705e6778b1 in __GI_abort () at abort.c:79
#2 0x000055705e66742a in __assert_fail_base (fmt=0x55705e7eea38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55705cd0811a "id.page_no() < space.size",
file=file@entry=0x55705cd07918 "/home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc", line=line@entry=1254,
function=function@entry=0x55705cd099a0 <buf_flush_check_neighbors(fil_space_t const&, page_id_t&, IORequest::flush_t)::__PRETTY_FUNCTION__> "page_id_t buf_flush_check_neighbors(const fil_space_t&, page_id_t&, IORequest::flush_t)") at assert.c:92
#3 0x000055705e6674a2 in __GI___assert_fail (assertion=0x55705cd0811a "id.page_no() < space.size", file=0x55705cd07918 "/home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc", line=1254,
function=0x55705cd099a0 <buf_flush_check_neighbors(fil_space_t const&, page_id_t&, IORequest::flush_t)::__PRETTY_FUNCTION__> "page_id_t buf_flush_check_neighbors(const fil_space_t&, page_id_t&, IORequest::flush_t)") at assert.c:101
#4 0x000055705c56af9c in buf_flush_check_neighbors (space=..., id=..., flush=IORequest::FLUSH_LIST) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1254
#5 0x000055705c56b93b in buf_flush_try_neighbors (page_id=..., flush=IORequest::FLUSH_LIST, n_flushed=164, n_to_flush=200) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1392
#6 0x000055705c56c7dd in buf_do_flush_list_batch (min_n=200, lsn_limit=18446744073709551615) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1640
#7 0x000055705c56cd03 in buf_flush_batch (lru=false, min_n=200, lsn_limit=18446744073709551615, n=0x2fef7a41bc40) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1697
#8 0x000055705c56d0ec in buf_flush_do_batch (lru=false, min_n=200, lsn_limit=18446744073709551615, n=0x2fef7a41bc40) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1800
#9 0x000055705c56d322 in buf_flush_lists (min_n=200, lsn_limit=18446744073709551615, n_processed=0x2fef7a41bc98) at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:1858
#10 0x000055705c570640 in buf_flush_page_cleaner () at /home/mleich/bb-10.5-thiru/storage/innobase/buf/buf0flu.cc:2746
#11 0x000000006fde86db in start_thread (arg=0x2fef7a41c700) at pthread_create.c:463
#12 0x000055705e758a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Error log contains the following:
[rr 99536 5963]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_BEING_DELETED not found.
[rr 99536 5967]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_BEING_DELETED_CACHE not found.
[rr 99536 5971]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_CONFIG not found.
[rr 99536 5975]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_DELETED not found.
[rr 99536 5979]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_DELETED_CACHE not found.
[rr 99536 5983]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_00000000000001df_INDEX_1 not found.
[rr 99536 5987]2020-07-14 12:31:07 0 [Warning] InnoDB: Parent table of FTS auxiliary table test/FTS_0000000000000159_00000000000001df_INDEX_2 not found.
Problem:
=======
During recovery, InnoDB encounters INIT_PAGE for page 1. So it does buf_page_create() and add the page 1 to flush list. It never encounters INIT_PAGE for page0 and FSP_SIZE redo log also. So InnoDB never sets the size for the tablespace. While flushing, InnoDB fails in assert `id.page_no() < space.size'
Root cause is that InnoDB does mtr_commit separately for page 1 before doing commit for page 0 and FSP_SIZE
In the reported case, fsp_header_init() is being called from dict_build_table_def_step()
mtr.start();
mtr.set_named_space(table->space);
fsp_header_init(table->space, FIL_IBD_FILE_INITIAL_SIZE, &mtr);
mtr.commit();
Inside fsp_header_init() , InnoDB does fsp_fill_free_list() to add the new extent to free list.
In fsp_fill_free_list() , the following code does have seperate mtr to commit ibuf bitmap page.
/* Initialize the ibuf bitmap page in a separate
mini-transaction because it is low in the latching
order, and we must be able to release its latch.
Note: Insert-Buffering is disabled for tables that
reside in the temp-tablespace. */
if (space->purpose != FIL_TYPE_TEMPORARY) {
mtr_t ibuf_mtr;
mtr_start(&ibuf_mtr);
ibuf_mtr.set_named_space(space);
/* Avoid logging while truncate table
fix-up is active. */
if (srv_is_tablespace_truncated(space->id)) {
mtr_set_log_mode(
&ibuf_mtr, MTR_LOG_NO_REDO);
}
const page_id_t page_id(
space->id,
i + FSP_IBUF_BITMAP_OFFSET);
block = buf_page_create(
page_id, page_size, &ibuf_mtr);
buf_page_get(
page_id, page_size, RW_SX_LATCH,
&ibuf_mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
fsp_init_file_page(space, block, &ibuf_mtr);
ibuf_bitmap_page_init(block, &ibuf_mtr);
mtr_commit(&ibuf_mtr);
So InnoDB should commit everything within same mtr or handle the scenario during recovery.
{"report":{"fcp":879.5999999046326,"ttfb":381.39999985694885,"pageVisibility":"visible","entityId":89576,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"37e34fcb-2cb7-4681-8fd3-2a459c55492f","navigationType":0,"readyForUser":961.3999998569489,"redirectCount":0,"resourceLoadedEnd":1013.3999998569489,"resourceLoadedStart":388.2999999523163,"resourceTiming":[{"duration":23.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":388.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":388.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":412.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":24,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":388.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":388.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":412.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":78.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":388.59999990463257,"connectEnd":388.59999990463257,"connectStart":388.59999990463257,"domainLookupEnd":388.59999990463257,"domainLookupStart":388.59999990463257,"fetchStart":388.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":388.59999990463257,"responseEnd":467.39999985694885,"responseStart":467.39999985694885,"secureConnectionStart":388.59999990463257},{"duration":187,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":388.7999999523163,"connectEnd":388.7999999523163,"connectStart":388.7999999523163,"domainLookupEnd":388.7999999523163,"domainLookupStart":388.7999999523163,"fetchStart":388.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":388.7999999523163,"responseEnd":575.7999999523163,"responseStart":575.7999999523163,"secureConnectionStart":388.7999999523163},{"duration":191.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":388.89999985694885,"connectEnd":388.89999985694885,"connectStart":388.89999985694885,"domainLookupEnd":388.89999985694885,"domainLookupStart":388.89999985694885,"fetchStart":388.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":388.89999985694885,"responseEnd":580.2000000476837,"responseStart":580.2000000476837,"secureConnectionStart":388.89999985694885},{"duration":193.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":388.89999985694885,"connectEnd":388.89999985694885,"connectStart":388.89999985694885,"domainLookupEnd":388.89999985694885,"domainLookupStart":388.89999985694885,"fetchStart":388.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":388.89999985694885,"responseEnd":582,"responseStart":582,"secureConnectionStart":388.89999985694885},{"duration":194.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":389,"connectEnd":389,"connectStart":389,"domainLookupEnd":389,"domainLookupStart":389,"fetchStart":389,"redirectEnd":0,"redirectStart":0,"requestStart":389,"responseEnd":583.5,"responseStart":583.5,"secureConnectionStart":389},{"duration":195.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":389.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":389.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":584.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":195.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":389.2999999523163,"connectEnd":389.2999999523163,"connectStart":389.2999999523163,"domainLookupEnd":389.2999999523163,"domainLookupStart":389.2999999523163,"fetchStart":389.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":389.2999999523163,"responseEnd":584.8999998569489,"responseStart":584.8999998569489,"secureConnectionStart":389.2999999523163},{"duration":196.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":389.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":389.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":586.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":197,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":389.5,"connectEnd":389.5,"connectStart":389.5,"domainLookupEnd":389.5,"domainLookupStart":389.5,"fetchStart":389.5,"redirectEnd":0,"redirectStart":0,"requestStart":389.5,"responseEnd":586.5,"responseStart":586.5,"secureConnectionStart":389.5},{"duration":617.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":394.7000000476837,"connectEnd":394.7000000476837,"connectStart":394.7000000476837,"domainLookupEnd":394.7000000476837,"domainLookupStart":394.7000000476837,"fetchStart":394.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":394.7000000476837,"responseEnd":1012.3999998569489,"responseStart":1012.3999998569489,"secureConnectionStart":394.7000000476837},{"duration":618.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":394.7999999523163,"connectEnd":394.7999999523163,"connectStart":394.7999999523163,"domainLookupEnd":394.7999999523163,"domainLookupStart":394.7999999523163,"fetchStart":394.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":394.7999999523163,"responseEnd":1013.3999998569489,"responseStart":1013.3999998569489,"secureConnectionStart":394.7999999523163},{"duration":374.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":617.3999998569489,"connectEnd":617.3999998569489,"connectStart":617.3999998569489,"domainLookupEnd":617.3999998569489,"domainLookupStart":617.3999998569489,"fetchStart":617.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":617.3999998569489,"responseEnd":992,"responseStart":992,"secureConnectionStart":617.3999998569489},{"duration":145.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":870,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":870,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1015.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":249,"responseStart":382,"responseEnd":391,"domLoading":386,"domInteractive":1052,"domContentLoadedEventStart":1052,"domContentLoadedEventEnd":1116,"domComplete":1791,"loadEventStart":1791,"loadEventEnd":1792,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1033.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1034.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1034.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1036.7000000476837},{"name":"activityTabFullyLoaded","time":1123.2000000476837}],"measures":[],"correlationId":"39abd3f2369d74","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":74,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}