In MDEV-27774, the log_sys.mutex and log_sys.flush_order_mutex were replaced with a shared log_sys.latch. This means that concurrently executing mtr_t::commit() may insert records to the buf_pool.flush_list roughly concurrently. Each insertion is still protected by buf_pool.flush_list_mutex.
In buf_pool_t::insert_into_flush_list() we attempted to compensate for this by not unconditionally inserting blocks first in buf_pool.flush_list but by searching for an appropriate insert position. This compensation does not appear to be working at all times. With the following command, I was able to reproduce a crash on my system:
Marko Mäkelä
added a comment - Another failure:
CURRENT_TEST: encryption.innodb-checksum-algorithm
mysqltest: At line 53: query 'ALTER TABLE tc DISCARD TABLESPACE' failed: <Unknown> (2013): Lost connection to server during query
…
buf/buf0flu.cc:2585(buf_flush_validate_low())[0x55d918032422]
buf/buf0flu.cc:112(buf_flush_validate_skip())[0x55d9180367fd]
buf/buf0flu.cc:220(buf_pool_t::delete_from_flush_list(buf_page_t*, bool))[0x55d918036a4c]
buf/buf0flu.cc:254(buf_flush_remove_pages(unsigned int))[0x55d917ef81d5]
row/row0mysql.cc:2543(row_discard_tablespace_for_mysql(dict_table_t*, trx_t*))[0x55d917d74fc3]
I had forgotten that since MDEV-25113, the buf_pool.flush_list may contain clean blocks that are identified by buf_page_t:oldest_modification()==1. Those blocks must be removed or disregarded when buf_pool_t::insert_into_flush_list() determines the correct insert position.
Marko Mäkelä
added a comment - I had forgotten that since MDEV-25113 , the buf_pool.flush_list may contain clean blocks that are identified by buf_page_t:oldest_modification()==1 . Those blocks must be removed or disregarded when buf_pool_t::insert_into_flush_list() determines the correct insert position.
People
Marko Mäkelä
Marko Mäkelä
Votes:
0Vote for this issue
Watchers:
1Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1050.5,"ttfb":273.89999997615814,"pageVisibility":"visible","entityId":108126,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"b3a3038f-3c6c-4afd-ba8d-7cd43685f49d","navigationType":0,"readyForUser":1166.2999999523163,"redirectCount":0,"resourceLoadedEnd":738.2999999523163,"resourceLoadedStart":290.89999997615814,"resourceTiming":[{"duration":31.600000023841858,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":290.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.5,"responseStart":0,"secureConnectionStart":0},{"duration":35.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":291.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":326.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":287.8000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":291.39999997615814,"connectEnd":291.39999997615814,"connectStart":291.39999997615814,"domainLookupEnd":291.39999997615814,"domainLookupStart":291.39999997615814,"fetchStart":291.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":329.89999997615814,"responseEnd":579.2000000476837,"responseStart":344.7000000476837,"secureConnectionStart":291.39999997615814},{"duration":446.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":291.5,"connectEnd":291.5,"connectStart":291.5,"domainLookupEnd":291.5,"domainLookupStart":291.5,"fetchStart":291.5,"redirectEnd":0,"redirectStart":0,"requestStart":330.2999999523163,"responseEnd":738.2999999523163,"responseStart":371,"secureConnectionStart":291.5},{"duration":92.69999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":291.7000000476837,"connectEnd":291.7000000476837,"connectStart":291.7000000476837,"domainLookupEnd":291.7000000476837,"domainLookupStart":291.7000000476837,"fetchStart":291.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":340.89999997615814,"responseEnd":384.39999997615814,"responseStart":377.2000000476837,"secureConnectionStart":291.7000000476837},{"duration":92.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":291.89999997615814,"connectEnd":291.89999997615814,"connectStart":291.89999997615814,"domainLookupEnd":291.89999997615814,"domainLookupStart":291.89999997615814,"fetchStart":291.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":342.5,"responseEnd":384.60000002384186,"responseStart":378.10000002384186,"secureConnectionStart":291.89999997615814},{"duration":92.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":292.10000002384186,"connectEnd":292.10000002384186,"connectStart":292.10000002384186,"domainLookupEnd":292.10000002384186,"domainLookupStart":292.10000002384186,"fetchStart":292.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":343,"responseEnd":384.7000000476837,"responseStart":378.7999999523163,"secureConnectionStart":292.10000002384186},{"duration":42.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":292.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":334.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":92.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":292.5,"connectEnd":292.5,"connectStart":292.5,"domainLookupEnd":292.5,"domainLookupStart":292.5,"fetchStart":292.5,"redirectEnd":0,"redirectStart":0,"requestStart":343.39999997615814,"responseEnd":384.7000000476837,"responseStart":379.5,"secureConnectionStart":292.5},{"duration":42.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":292.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":335.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":96.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":292.7000000476837,"connectEnd":292.7000000476837,"connectStart":292.7000000476837,"domainLookupEnd":292.7000000476837,"domainLookupStart":292.7000000476837,"fetchStart":292.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":343.7999999523163,"responseEnd":389,"responseStart":380.2000000476837,"secureConnectionStart":292.7000000476837},{"duration":369.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":293.7000000476837,"connectEnd":293.7000000476837,"connectStart":293.7000000476837,"domainLookupEnd":293.7000000476837,"domainLookupStart":293.7000000476837,"fetchStart":293.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":446.89999997615814,"responseEnd":663.3999999761581,"responseStart":656.8999999761581,"secureConnectionStart":293.7000000476837},{"duration":370.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":293.7999999523163,"connectEnd":293.7999999523163,"connectStart":293.7999999523163,"domainLookupEnd":293.7999999523163,"domainLookupStart":293.7999999523163,"fetchStart":293.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":478,"responseEnd":664.2999999523163,"responseStart":658.7000000476837,"secureConnectionStart":293.7999999523163},{"duration":196.89999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":752.1000000238419,"connectEnd":752.1000000238419,"connectStart":752.1000000238419,"domainLookupEnd":752.1000000238419,"domainLookupStart":752.1000000238419,"fetchStart":752.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":913,"responseEnd":949,"responseStart":948.2000000476837,"secureConnectionStart":752.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":76,"responseStart":274,"responseEnd":288,"domLoading":277,"domInteractive":1257,"domContentLoadedEventStart":1262,"domContentLoadedEventEnd":1319,"domComplete":1844,"loadEventStart":1844,"loadEventEnd":1844,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1228.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1229},{"name":"bigPipe.activity-panel-pipe-id.start","time":1229.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1230.7999999523163},{"name":"activityTabFullyLoaded","time":1334.3999999761581}],"measures":[],"correlationId":"d17d3b45ab8441","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":113,"dbReadsTimeInMs":20,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Another failure:
CURRENT_TEST: encryption.innodb-checksum-algorithm
mysqltest: At line 53: query 'ALTER TABLE tc DISCARD TABLESPACE' failed: <Unknown> (2013): Lost connection to server during query
…
buf/buf0flu.cc:2585(buf_flush_validate_low())[0x55d918032422]
buf/buf0flu.cc:112(buf_flush_validate_skip())[0x55d9180367fd]
buf/buf0flu.cc:220(buf_pool_t::delete_from_flush_list(buf_page_t*, bool))[0x55d918036a4c]
buf/buf0flu.cc:254(buf_flush_remove_pages(unsigned int))[0x55d917ef81d5]
row/row0mysql.cc:2543(row_discard_tablespace_for_mysql(dict_table_t*, trx_t*))[0x55d917d74fc3]