The test encryption.create_or_replace can crash because a non-existent page is being requested:
10.1 74abc32d308cd4f9a23c4f897a76ea75c85a18c9
|
2018-04-30 16:54:47 140562482276096 [ERROR] InnoDB: Unable to read tablespace 913 page no 4 into the buffer pool after 100 attempts. The most probable cause of this error may be that the table has been corrupted. You can try to fix this problem by using innodb_force_recovery. Please see http://dev.mysql.com/doc/refman/5.6/en/ for more details. Aborting...
|
The stack trace in the error log does not disclose the caller of buf_page_get_gen(), but jplindst suggested that it could be the function fil_crypt_get_page_throttle_func(). Indeed, there seems to be a race condition between DROP TABLE and that function:
buf_block_t* block = buf_page_try_get_func(space->id, offset, RW_X_LATCH,
|
true,
|
file, line, mtr);
|
if (block != NULL) {
|
/* page was in buffer pool */
|
state->crypt_stat.pages_read_from_cache++;
|
return block;
|
}
|
|
/* Before reading from tablespace we need to make sure that
|
tablespace exists and is not is just being dropped. */
|
if (space->is_stopping()) {
|
return NULL;
|
}
|
|
state->crypt_stat.pages_read_from_disk++;
|
|
ullint start = ut_time_us(NULL);
|
block = buf_page_get_gen(space->id, zip_size, offset,
|
RW_X_LATCH,
|
NULL, BUF_GET_POSSIBLY_FREED,
|
file, line, mtr);
|
If the tablespace is dropped or truncated after the space->is_stopping() check, we would still proceed to request the page, and hit the error.
It seems that the simplest action would be to skip the retry logic when the block cannot be found in this case. One other caller would have to be adjusted for NULL return values:
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
|
index e3c2337659e..cd9f08b96e8 100644
|
--- a/storage/innobase/buf/buf0buf.cc
|
+++ b/storage/innobase/buf/buf0buf.cc
|
@@ -3189,6 +3189,11 @@ buf_page_get_gen(
|
ibuf_inside(mtr));
|
|
retries = 0;
|
+ } else if (mode == BUF_GET_POSSIBLY_FREED) {
|
+ if (err) {
|
+ *err = local_err;
|
+ }
|
+ return NULL;
|
} else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
|
++retries;
|
|
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
|
index 12c0051d09f..441fcace7c3 100644
|
--- a/storage/innobase/lock/lock0lock.cc
|
+++ b/storage/innobase/lock/lock0lock.cc
|
@@ -6895,10 +6895,10 @@ lock_rec_block_validate(
|
page_no, RW_X_LATCH, NULL,
|
BUF_GET_POSSIBLY_FREED,
|
__FILE__, __LINE__, &mtr);
|
-
|
- buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
|
-
|
- ut_ad(lock_rec_validate_page(block));
|
+ if (block) {
|
+ buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
|
+ ut_ad(lock_rec_validate_page(block));
|
+ }
|
mtr_commit(&mtr);
|
|
fil_space_release(space);
|
{"report":{"fcp":919.5,"ttfb":134.29999995231628,"pageVisibility":"visible","entityId":67236,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7f0cad2f-4bb0-42b5-bfaf-4a4029f82cb7","navigationType":0,"readyForUser":981.7999999523163,"redirectCount":0,"resourceLoadedEnd":1159,"resourceLoadedStart":139.79999995231628,"resourceTiming":[{"duration":350.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":139.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":139.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":490.5,"responseStart":0,"secureConnectionStart":0},{"duration":350.5,"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":140.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":490.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":359.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":140.20000004768372,"connectEnd":140.20000004768372,"connectStart":140.20000004768372,"domainLookupEnd":140.20000004768372,"domainLookupStart":140.20000004768372,"fetchStart":140.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":140.20000004768372,"responseEnd":499.2999999523163,"responseStart":499.2999999523163,"secureConnectionStart":140.20000004768372},{"duration":383.7999999523163,"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":140.20000004768372,"connectEnd":140.20000004768372,"connectStart":140.20000004768372,"domainLookupEnd":140.20000004768372,"domainLookupStart":140.20000004768372,"fetchStart":140.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":140.20000004768372,"responseEnd":524,"responseStart":524,"secureConnectionStart":140.20000004768372},{"duration":387.5,"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":140.29999995231628,"connectEnd":140.29999995231628,"connectStart":140.29999995231628,"domainLookupEnd":140.29999995231628,"domainLookupStart":140.29999995231628,"fetchStart":140.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":140.29999995231628,"responseEnd":527.7999999523163,"responseStart":527.7999999523163,"secureConnectionStart":140.29999995231628},{"duration":388.7999999523163,"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":140.5,"connectEnd":140.5,"connectStart":140.5,"domainLookupEnd":140.5,"domainLookupStart":140.5,"fetchStart":140.5,"redirectEnd":0,"redirectStart":0,"requestStart":140.5,"responseEnd":529.2999999523163,"responseStart":529.2999999523163,"secureConnectionStart":140.5},{"duration":389.89999985694885,"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":140.5,"connectEnd":140.5,"connectStart":140.5,"domainLookupEnd":140.5,"domainLookupStart":140.5,"fetchStart":140.5,"redirectEnd":0,"redirectStart":0,"requestStart":140.5,"responseEnd":530.3999998569489,"responseStart":530.3999998569489,"secureConnectionStart":140.5},{"duration":390.7999999523163,"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":140.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":531.5,"responseStart":0,"secureConnectionStart":0},{"duration":390.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":140.70000004768372,"connectEnd":140.70000004768372,"connectStart":140.70000004768372,"domainLookupEnd":140.70000004768372,"domainLookupStart":140.70000004768372,"fetchStart":140.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":140.70000004768372,"responseEnd":531.5999999046326,"responseStart":531.5999999046326,"secureConnectionStart":140.70000004768372},{"duration":391.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":140.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":532.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":392,"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":140.89999985694885,"connectEnd":140.89999985694885,"connectStart":140.89999985694885,"domainLookupEnd":140.89999985694885,"domainLookupStart":140.89999985694885,"fetchStart":140.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":140.89999985694885,"responseEnd":532.8999998569489,"responseStart":532.8999998569489,"secureConnectionStart":140.89999985694885},{"duration":701,"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":146.29999995231628,"connectEnd":146.29999995231628,"connectStart":146.29999995231628,"domainLookupEnd":146.29999995231628,"domainLookupStart":146.29999995231628,"fetchStart":146.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":146.29999995231628,"responseEnd":847.2999999523163,"responseStart":847.2000000476837,"secureConnectionStart":146.29999995231628},{"duration":1012.6000001430511,"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":146.39999985694885,"connectEnd":146.39999985694885,"connectStart":146.39999985694885,"domainLookupEnd":146.39999985694885,"domainLookupStart":146.39999985694885,"fetchStart":146.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":146.39999985694885,"responseEnd":1159,"responseStart":1158.8999998569489,"secureConnectionStart":146.39999985694885},{"duration":428.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":726.3999998569489,"connectEnd":726.3999998569489,"connectStart":726.3999998569489,"domainLookupEnd":726.3999998569489,"domainLookupStart":726.3999998569489,"fetchStart":726.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":726.3999998569489,"responseEnd":1154.5999999046326,"responseStart":1154.5,"secureConnectionStart":726.3999998569489}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":135,"responseEnd":141,"domLoading":138,"domInteractive":1178,"domContentLoadedEventStart":1178,"domContentLoadedEventEnd":1212,"domComplete":2069,"loadEventStart":2069,"loadEventEnd":2070,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1163.8999998569489},{"name":"bigPipe.sidebar-id.end","time":1164.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1164.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1167},{"name":"activityTabFullyLoaded","time":1216.7999999523163}],"measures":[],"correlationId":"b81f4446790734","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":65,"dbReadsTimeInMs":8,"dbConnsTimeInMs":14,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}