When using simulated AIO, the IO (pread/pwrite), and the completion function are executed
in the same io callback. This might lead to deadlock, when completion function executes other AIOs - an example is the completion of the large doublewrite, which then issues multiple page writes.
The reason for the deadlock is that current implementation does not release the io control block aiocb soon enough, but only after the user callback, which, if we're unlucky, might itself require a free aiocb. This does not happen in native AIO implementations where control blocks are released as soon as OS indicates that write is finished.
MDEV-24313 workarounds the problem by having at least 2 IO write threads, but the solution is hacky, and only relies on the fact that at any point of time there will be only one IO callback that submits more AIOs, which is still true in 10.5 .
The correct solution, which is more in line with native AIO, is to split pread/pwrite from completion code, i.e submit task to threadpool after pwrite completion, instead of executing it right after pwrite.
Transition |
Time In Source Status |
Execution Times |
Open |
|
Closed |
|
3h 38m
|
1
|
{"report":{"fcp":691.5,"ttfb":172.20000004768372,"pageVisibility":"visible","entityId":100605,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"2abca525-3116-40cf-bc4f-f5e2ab895af8","navigationType":0,"readyForUser":740.3999998569489,"redirectCount":0,"resourceLoadedEnd":268.59999990463257,"resourceLoadedStart":177.70000004768372,"resourceTiming":[{"duration":5.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":177.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":183.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":5.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":177.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":183.5,"responseStart":0,"secureConnectionStart":0},{"duration":74.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":178.09999990463257,"connectEnd":178.09999990463257,"connectStart":178.09999990463257,"domainLookupEnd":178.09999990463257,"domainLookupStart":178.09999990463257,"fetchStart":178.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":190.89999985694885,"responseEnd":252.29999995231628,"responseStart":213.20000004768372,"secureConnectionStart":178.09999990463257},{"duration":90.39999985694885,"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":178.20000004768372,"connectEnd":178.20000004768372,"connectStart":178.20000004768372,"domainLookupEnd":178.20000004768372,"domainLookupStart":178.20000004768372,"fetchStart":178.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":190.89999985694885,"responseEnd":268.59999990463257,"responseStart":221.39999985694885,"secureConnectionStart":178.20000004768372},{"duration":47.299999952316284,"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":178.29999995231628,"connectEnd":178.29999995231628,"connectStart":178.29999995231628,"domainLookupEnd":178.29999995231628,"domainLookupStart":178.29999995231628,"fetchStart":178.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":191,"responseEnd":225.59999990463257,"responseStart":225.09999990463257,"secureConnectionStart":178.29999995231628},{"duration":46.60000014305115,"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":178.39999985694885,"connectEnd":178.39999985694885,"connectStart":178.39999985694885,"domainLookupEnd":178.39999985694885,"domainLookupStart":178.39999985694885,"fetchStart":178.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":191.09999990463257,"responseEnd":225,"responseStart":224.39999985694885,"secureConnectionStart":178.39999985694885},{"duration":45.799999952316284,"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":178.5,"connectEnd":178.5,"connectStart":178.5,"domainLookupEnd":178.5,"domainLookupStart":178.5,"fetchStart":178.5,"redirectEnd":0,"redirectStart":0,"requestStart":191.29999995231628,"responseEnd":224.29999995231628,"responseStart":223.79999995231628,"secureConnectionStart":178.5},{"duration":11.899999856948853,"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":178.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":178.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":190.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":80.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":178.79999995231628,"connectEnd":178.79999995231628,"connectStart":178.79999995231628,"domainLookupEnd":178.79999995231628,"domainLookupStart":178.79999995231628,"fetchStart":178.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":192.89999985694885,"responseEnd":258.89999985694885,"responseStart":258,"secureConnectionStart":178.79999995231628},{"duration":13.300000190734863,"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":178.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":178.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":192.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":53.80000019073486,"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":178.89999985694885,"connectEnd":178.89999985694885,"connectStart":178.89999985694885,"domainLookupEnd":178.89999985694885,"domainLookupStart":178.89999985694885,"fetchStart":178.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":193.70000004768372,"responseEnd":232.70000004768372,"responseStart":230.70000004768372,"secureConnectionStart":178.89999985694885},{"duration":32.200000047683716,"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":188.39999985694885,"connectEnd":200.20000004768372,"connectStart":200.20000004768372,"domainLookupEnd":200.20000004768372,"domainLookupStart":200.20000004768372,"fetchStart":188.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":200.79999995231628,"responseEnd":220.59999990463257,"responseStart":215.29999995231628,"secureConnectionStart":200.20000004768372},{"duration":32.299999952316284,"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":188.5,"connectEnd":188.5,"connectStart":188.5,"domainLookupEnd":188.5,"domainLookupStart":188.5,"fetchStart":188.5,"redirectEnd":0,"redirectStart":0,"requestStart":201,"responseEnd":220.79999995231628,"responseStart":216.09999990463257,"secureConnectionStart":188.5},{"duration":152.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":458.7000000476837,"connectEnd":458.7000000476837,"connectStart":458.7000000476837,"domainLookupEnd":458.7000000476837,"domainLookupStart":458.7000000476837,"fetchStart":458.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":575.8999998569489,"responseEnd":611.2000000476837,"responseStart":610.2999999523163,"secureConnectionStart":458.7000000476837},{"duration":102.59999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":665.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":665.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":767.7999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":42,"responseStart":172,"responseEnd":187,"domLoading":176,"domInteractive":788,"domContentLoadedEventStart":788,"domContentLoadedEventEnd":827,"domComplete":1105,"loadEventStart":1105,"loadEventEnd":1106,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":770.7999999523163},{"name":"bigPipe.sidebar-id.end","time":771.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":771.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":772.7000000476837},{"name":"activityTabFullyLoaded","time":837.7000000476837}],"measures":[],"correlationId":"7650252c4b1ace","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":78,"dbReadsTimeInMs":17,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}