Today, I got a local test failure that looks much like this old failure:
10.6 cce994057bf7e2bdb62686075de03aeb
|
CURRENT_TEST: innodb.import_corrupted
|
mysqltest: At line 63: query 'ALTER TABLE t2 IMPORT TABLESPACE' failed with wrong errno <Unknown> (2013): 'Lost connection to server during query', instead of ER_NOT_KEYFILE (1034)...
|
...
|
2022-02-09 21:18:29 79 [ERROR] InnoDB: Trying to read 16384 bytes at 376832 outside the bounds of the file: ./test/t2.ibd
|
mariadbd: /home/buildbot/buildbot/build/mariadb-10.6.7/storage/innobase/buf/buf0flu.cc:2507: void buf_flush_validate_low(): Assertion `om == 1 || !bpage || __builtin_expect(recv_sys.recovery_on, (0)) || om >= bpage->oldest_modification()' failed.
|
In the core dump of my local failure, the IMPORT thread was waiting in mtr_t::commit():
if (UNIV_UNLIKELY(m_made_dirty)) /* This should be IMPORT TABLESPACE */
|
mysql_mutex_lock(&log_sys.flush_order_mutex);
|
The flush list validation was executing as part of a mtr_t::commit() in trx_purge_truncate_rseg_history(). That mini-transaction was only holding page latches on tablespace 0x44 (the tablespace that is being imported).
The bpage in the assertion expression was page 344 in the system tablespace. The bpage->list.prev was page 13 in the tablespace that is being imported. Neither page was buffer-fixed or latched, and apparently no asynchronous page reads or writes were in progress:
(gdb) p write_slots.m_cache.m_pos
|
$4 = 0
|
(gdb) p read_slots.m_cache.m_pos
|
$5 = 0
|
Notably, the status of the previous page (13 in tablespace 0x44 in my case) is buf_page_t::FREED. While searching for failures in the cross-reference, I found several hangs during a test, and also the following assertion failure that could share a root cause with this one:
bb-10.8-merge ed204a5cf9ec524e00f9ae9680d68911599c8ae5
|
2022-11-17 18:10:01 7 [Note] InnoDB: Phase II - Purge records from index `PRIMARY`
|
Assertion failed: s > buf_page_t::FREED, file D:\Buildbot\amd64-windows\build\storage\innobase\mtr\mtr0mtr.cc, line 230
|
{"report":{"fcp":779.2999999523163,"ttfb":197.29999995231628,"pageVisibility":"visible","entityId":125362,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"aca8859a-b508-4ec5-bb28-77b79c42d646","navigationType":0,"readyForUser":895.2999999523163,"redirectCount":0,"resourceLoadedEnd":511.10000014305115,"resourceLoadedStart":206.10000014305115,"resourceTiming":[{"duration":6.699999809265137,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":206.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":206.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":212.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":6.6000001430511475,"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":206.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":206.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":212.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":184,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":206.5,"connectEnd":206.5,"connectStart":206.5,"domainLookupEnd":206.5,"domainLookupStart":206.5,"fetchStart":206.5,"redirectEnd":0,"redirectStart":0,"requestStart":221.60000014305115,"responseEnd":390.5,"responseStart":238.5,"secureConnectionStart":206.5},{"duration":304.60000014305115,"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":206.5,"connectEnd":206.5,"connectStart":206.5,"domainLookupEnd":206.5,"domainLookupStart":206.5,"fetchStart":206.5,"redirectEnd":0,"redirectStart":0,"requestStart":223.90000009536743,"responseEnd":511.10000014305115,"responseStart":243.20000004768372,"secureConnectionStart":206.5},{"duration":40.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":206.60000014305115,"connectEnd":206.60000014305115,"connectStart":206.60000014305115,"domainLookupEnd":206.60000014305115,"domainLookupStart":206.60000014305115,"fetchStart":206.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":224.20000004768372,"responseEnd":247.10000014305115,"responseStart":245.20000004768372,"secureConnectionStart":206.60000014305115},{"duration":42.5,"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":206.79999995231628,"connectEnd":206.79999995231628,"connectStart":206.79999995231628,"domainLookupEnd":206.79999995231628,"domainLookupStart":206.79999995231628,"fetchStart":206.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":224.40000009536743,"responseEnd":249.29999995231628,"responseStart":247.60000014305115,"secureConnectionStart":206.79999995231628},{"duration":46.30000019073486,"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":206.79999995231628,"connectEnd":206.79999995231628,"connectStart":206.79999995231628,"domainLookupEnd":206.79999995231628,"domainLookupStart":206.79999995231628,"fetchStart":206.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":227.10000014305115,"responseEnd":253.10000014305115,"responseStart":249.70000004768372,"secureConnectionStart":206.79999995231628},{"duration":12.600000143051147,"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":207,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":219.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":46.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":207.10000014305115,"connectEnd":207.10000014305115,"connectStart":207.10000014305115,"domainLookupEnd":207.10000014305115,"domainLookupStart":207.10000014305115,"fetchStart":207.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":227.70000004768372,"responseEnd":253.5,"responseStart":250.60000014305115,"secureConnectionStart":207.10000014305115},{"duration":13.400000095367432,"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":207.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":220.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":55.799999952316284,"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":207.20000004768372,"connectEnd":207.20000004768372,"connectStart":207.20000004768372,"domainLookupEnd":207.20000004768372,"domainLookupStart":207.20000004768372,"fetchStart":207.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":228.5,"responseEnd":263,"responseStart":251.40000009536743,"secureConnectionStart":207.20000004768372},{"duration":260,"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":211.70000004768372,"connectEnd":211.70000004768372,"connectStart":211.70000004768372,"domainLookupEnd":211.70000004768372,"domainLookupStart":211.70000004768372,"fetchStart":211.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":240.79999995231628,"responseEnd":471.7000000476837,"responseStart":464.40000009536743,"secureConnectionStart":211.70000004768372},{"duration":260.7999999523163,"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":211.70000004768372,"connectEnd":211.70000004768372,"connectStart":211.70000004768372,"domainLookupEnd":211.70000004768372,"domainLookupStart":211.70000004768372,"fetchStart":211.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":249.20000004768372,"responseEnd":472.5,"responseStart":466.40000009536743,"secureConnectionStart":211.70000004768372},{"duration":92.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":537.9000000953674,"connectEnd":537.9000000953674,"connectStart":537.9000000953674,"domainLookupEnd":537.9000000953674,"domainLookupStart":537.9000000953674,"fetchStart":537.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":596.2000000476837,"responseEnd":630.5,"responseStart":628.7999999523163,"secureConnectionStart":537.9000000953674},{"duration":107.39999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":771.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":771.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":879.2999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":38,"responseStart":197,"responseEnd":211,"domLoading":201,"domInteractive":964,"domContentLoadedEventStart":964,"domContentLoadedEventEnd":1013,"domComplete":1461,"loadEventStart":1461,"loadEventEnd":1461,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":933.7999999523163},{"name":"bigPipe.sidebar-id.end","time":934.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":934.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.end","time":937.9000000953674},{"name":"activityTabFullyLoaded","time":1032.4000000953674}],"measures":[],"correlationId":"136e735e6a07ac","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This was observed in another IMPORT TABLESPACE test: https://buildbot.mariadb.org/#/builders/534/builds/11223/steps/7/logs/stdio
10.6 b52b7b41296fa8857bcd2abc42f9ab6721b86f8b
CURRENT_TEST: innodb_zip.wl5522_debug_zip
mysqltest: At line 372: query 'ALTER TABLE t1 IMPORT TABLESPACE' failed: <Unknown> (2013): Lost connection to server during query
…
2023-11-06 14:58:39 3 [Note] InnoDB: Phase II - Purge records from index `idx1`
mariadbd: /home/buildbot/amd64-ubuntu-2204-debug-ps/build/storage/innobase/buf/buf0flu.cc:2642: void buf_flush_validate_low(): Assertion `om == 1 || !bpage || __builtin_expect(recv_sys.recovery_on, (0)) || om >= bpage->oldest_modification()' failed.