Type:
Bug
Priority:
Blocker
Resolution:
Fixed
Affects Version/s:
10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11
The fix of MDEV-27414 turns out to be incomplete. The server can still hang, with a deadlock between buf_pool_t::release_freed_page() and trx_purge_truncate_history() . In the latter, we'd better actively wait for the former to complete:
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index b834c5d070d..e162456e63f 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -768,11 +768,12 @@ TRANSACTIONAL_TARGET static void trx_purge_truncate_history()
auto block= reinterpret_cast<buf_block_t*>(bpage);
if (!bpage->lock.x_lock_try())
{
+ rescan:
/* Let buf_pool_t::release_freed_page() proceed. */
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- std::this_thread::yield();
+ mysql_mutex_lock(&buf_pool.mutex);
mysql_mutex_lock(&buf_pool.flush_list_mutex);
- rescan:
+ mysql_mutex_unlock(&buf_pool.mutex);
bpage= UT_LIST_GET_LAST(buf_pool.flush_list);
continue;
}
{"report":{"fcp":906.6000001430511,"ttfb":259.80000019073486,"pageVisibility":"visible","entityId":117550,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7a3a2ff8-4930-4b65-8b1c-36d938fb19fd","navigationType":0,"readyForUser":988.3000001907349,"redirectCount":0,"resourceLoadedEnd":1032.6000001430511,"resourceLoadedStart":266.10000014305115,"resourceTiming":[{"duration":18.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":266.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":266.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":23.200000047683716,"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":266.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":266.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":289.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":117.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":266.60000014305115,"connectEnd":266.60000014305115,"connectStart":266.60000014305115,"domainLookupEnd":266.60000014305115,"domainLookupStart":266.60000014305115,"fetchStart":266.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":266.60000014305115,"responseEnd":383.7000000476837,"responseStart":383.7000000476837,"secureConnectionStart":266.60000014305115},{"duration":187.5,"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":266.7000000476837,"connectEnd":266.7000000476837,"connectStart":266.7000000476837,"domainLookupEnd":266.7000000476837,"domainLookupStart":266.7000000476837,"fetchStart":266.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":266.7000000476837,"responseEnd":454.2000000476837,"responseStart":454.10000014305115,"secureConnectionStart":266.7000000476837},{"duration":191.5,"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":266.90000009536743,"connectEnd":266.90000009536743,"connectStart":266.90000009536743,"domainLookupEnd":266.90000009536743,"domainLookupStart":266.90000009536743,"fetchStart":266.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":266.90000009536743,"responseEnd":458.40000009536743,"responseStart":458.40000009536743,"secureConnectionStart":266.90000009536743},{"duration":192.59999990463257,"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":267.10000014305115,"connectEnd":267.10000014305115,"connectStart":267.10000014305115,"domainLookupEnd":267.10000014305115,"domainLookupStart":267.10000014305115,"fetchStart":267.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":267.10000014305115,"responseEnd":459.7000000476837,"responseStart":459.7000000476837,"secureConnectionStart":267.10000014305115},{"duration":193.59999990463257,"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":267.30000019073486,"connectEnd":267.30000019073486,"connectStart":267.30000019073486,"domainLookupEnd":267.30000019073486,"domainLookupStart":267.30000019073486,"fetchStart":267.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":267.30000019073486,"responseEnd":460.90000009536743,"responseStart":460.90000009536743,"secureConnectionStart":267.30000019073486},{"duration":262.5,"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":267.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530,"responseStart":0,"secureConnectionStart":0},{"duration":194.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":267.7000000476837,"connectEnd":267.7000000476837,"connectStart":267.7000000476837,"domainLookupEnd":267.7000000476837,"domainLookupStart":267.7000000476837,"fetchStart":267.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":267.7000000476837,"responseEnd":462.10000014305115,"responseStart":462.10000014305115,"secureConnectionStart":267.7000000476837},{"duration":262.2999999523163,"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":267.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":195.40000009536743,"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":268,"connectEnd":268,"connectStart":268,"domainLookupEnd":268,"domainLookupStart":268,"fetchStart":268,"redirectEnd":0,"redirectStart":0,"requestStart":268,"responseEnd":463.40000009536743,"responseStart":463.40000009536743,"secureConnectionStart":268},{"duration":388.2000000476837,"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":274.60000014305115,"connectEnd":274.60000014305115,"connectStart":274.60000014305115,"domainLookupEnd":274.60000014305115,"domainLookupStart":274.60000014305115,"fetchStart":274.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":274.60000014305115,"responseEnd":662.8000001907349,"responseStart":662.8000001907349,"secureConnectionStart":274.60000014305115},{"duration":629.7000000476837,"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":284.7000000476837,"connectEnd":284.7000000476837,"connectStart":284.7000000476837,"domainLookupEnd":284.7000000476837,"domainLookupStart":284.7000000476837,"fetchStart":284.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":284.7000000476837,"responseEnd":914.4000000953674,"responseStart":914.4000000953674,"secureConnectionStart":284.7000000476837},{"duration":119.70000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":544.1000001430511,"connectEnd":544.1000001430511,"connectStart":544.1000001430511,"domainLookupEnd":544.1000001430511,"domainLookupStart":544.1000001430511,"fetchStart":544.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":544.1000001430511,"responseEnd":663.8000001907349,"responseStart":663.8000001907349,"secureConnectionStart":544.1000001430511},{"duration":111.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":804.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":804.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":916,"responseStart":0,"secureConnectionStart":0},{"duration":216.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":805.4000000953674,"connectEnd":805.4000000953674,"connectStart":805.4000000953674,"domainLookupEnd":805.4000000953674,"domainLookupStart":805.4000000953674,"fetchStart":805.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":805.4000000953674,"responseEnd":1022,"responseStart":1022,"secureConnectionStart":805.4000000953674},{"duration":226.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":805.8000001907349,"connectEnd":805.8000001907349,"connectStart":805.8000001907349,"domainLookupEnd":805.8000001907349,"domainLookupStart":805.8000001907349,"fetchStart":805.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":805.8000001907349,"responseEnd":1032.6000001430511,"responseStart":1032.6000001430511,"secureConnectionStart":805.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":92,"responseStart":259,"responseEnd":284,"domLoading":263,"domInteractive":1044,"domContentLoadedEventStart":1044,"domContentLoadedEventEnd":1084,"domComplete":1424,"loadEventStart":1424,"loadEventEnd":1425,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1032.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1033.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":1033.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1034.4000000953674},{"name":"activityTabFullyLoaded","time":1104.5}],"measures":[],"correlationId":"59a3e9ce5e590c","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":16,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I can confirm that commit be6a3d9a01c exhibits the hang and that this hang is gone (fixed) in commit 64231528ed6.