The change in MDEV-26674 sets innodb_use_native_aio=OFF for any system running kernel < 5.15.3 due to hangs related to liburing. Since RHEL9 is likely to use kernel 5.14 for quite some time (it goes EoL in 2028), the fix in MDEV-26674 will likely affect quite a lot of people, particularly enterprises. Users of Rocky and Alma Linux will also be affected.
Could MariaDB be compiled with libaio and allow the use of libaio for kernel 5.14 instead of setting innodb_use_native_aio=OFF which impacts performance?
There's also the possibility that Red Hat will (perhaps already?) backport the fix to 5.14. If that's the case a more rigorous check for kernel version/platform would be needed in ha_innodb.cc.
Attachments
Issue Links
is caused by
MDEV-26674io_uring related hangs on the Linux kernel
Closed
relates to
MDEV-35886MariaDB Server frequently hanging, causing data corruption.
Closed
MDEV-36234mysqld: io_uring_queue_init() failed with errno 1
> Could MariaDB be compiled with libaio and allow the use of libaio for kernel 5.14 instead of setting innodb_use_native_aio=OFF which impacts performance?
It gets a bit messy to affect build time compilation by the kernel version of what is being built.
Also a fun situation where running containers on a host kernel that isn't mapping to the container build. This was the reason behind runtime checks of version (despite their imperfection).
Another invasive solution, that I don't immediately advocate, is to link against uring and libaio at the same time.
> There's also the possibility that Red Hat will (perhaps already?) backport the fix to 5.14.
Based on Red Hat kernel processes I think its highly likely the RHEL image has this corrected.
> If that's the case a more rigorous check for kernel version/platform would be needed in ha_innodb.cc.
I'm open to this. If you've got a uname -v and a uname -r output from a RHEL9 kernel that would be most useful.
Or given how old the version checks where in MDEV-26674, 2.5 years ago, just remove the version checks and let the responsible people who pay for kernel stability, or are responsible to update kernels to gain fixes, let them gain the use of the features that are fixed.
Daniel Black
added a comment - - edited > Could MariaDB be compiled with libaio and allow the use of libaio for kernel 5.14 instead of setting innodb_use_native_aio=OFF which impacts performance?
It gets a bit messy to affect build time compilation by the kernel version of what is being built.
Also a fun situation where running containers on a host kernel that isn't mapping to the container build. This was the reason behind runtime checks of version (despite their imperfection).
Another invasive solution, that I don't immediately advocate, is to link against uring and libaio at the same time.
> There's also the possibility that Red Hat will (perhaps already?) backport the fix to 5.14.
Based on Red Hat kernel processes I think its highly likely the RHEL image has this corrected.
> If that's the case a more rigorous check for kernel version/platform would be needed in ha_innodb.cc.
I'm open to this. If you've got a uname -v and a uname -r output from a RHEL9 kernel that would be most useful.
Or given how old the version checks where in MDEV-26674 , 2.5 years ago, just remove the version checks and let the responsible people who pay for kernel stability, or are responsible to update kernels to gain fixes, let them gain the use of the features that are fixed.
Do you have a preference Ali.maria or marko ?
We should also keep in mind that there may be regressions in the kernel forks of GNU/Linux distributions, such as MDEV-35886. As far as I understand, this bug was never present in an upstream Linux kernel.
I was thinking that it might be useful to link to both libaio and liburing and enhance innodb_use_native_aio to an enumeration that would include the explicit values innodb_use_native_aio=libaio and innodb_use_native_aio=uring where available. The libaio interface is much older and much less likely to change.
It could also be a good idea to remove the run-time check for the 5.x kernels, from 11.4 onwards, if 11.4 is the version that would be included in the GNU/Linux distributions that use a Linux 5.14 based kernel fork.
Marko Mäkelä
added a comment - We should also keep in mind that there may be regressions in the kernel forks of GNU/Linux distributions, such as MDEV-35886 . As far as I understand, this bug was never present in an upstream Linux kernel.
I was thinking that it might be useful to link to both libaio and liburing and enhance innodb_use_native_aio to an enumeration that would include the explicit values innodb_use_native_aio=libaio and innodb_use_native_aio=uring where available. The libaio interface is much older and much less likely to change.
It could also be a good idea to remove the run-time check for the 5.x kernels, from 11.4 onwards, if 11.4 is the version that would be included in the GNU/Linux distributions that use a Linux 5.14 based kernel fork.
With UBI container images (starting at 10.6) based on RHEL9 userspace and using RHEL9 MariaDB packages if a version check is removed I would prefer it happen in 10.6.
I'd rather not rely on seccomp filters blocking uring or aio syscalls as that may disappear at any time.
Daniel Black
added a comment - With UBI container images (starting at 10.6) based on RHEL9 userspace and using RHEL9 MariaDB packages if a version check is removed I would prefer it happen in 10.6.
I'd rather not rely on seccomp filters blocking uring or aio syscalls as that may disappear at any time.
People
Marko Mäkelä
Alasdair Haswell
Votes:
0Vote for this issue
Watchers:
7Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":910.8000001907349,"ttfb":190.40000009536743,"pageVisibility":"visible","entityId":133025,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"fc8797e5-104d-43b7-90f8-bb368121ca68","navigationType":0,"readyForUser":980.9000000953674,"redirectCount":0,"resourceLoadedEnd":833.1000003814697,"resourceLoadedStart":194.90000009536743,"resourceTiming":[{"duration":227.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":194.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":194.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":422.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":228.09999990463257,"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":195.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":195.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":423.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":236.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":195.30000019073486,"connectEnd":195.30000019073486,"connectStart":195.30000019073486,"domainLookupEnd":195.30000019073486,"domainLookupStart":195.30000019073486,"fetchStart":195.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":195.30000019073486,"responseEnd":431.90000009536743,"responseStart":431.90000009536743,"secureConnectionStart":195.30000019073486},{"duration":304.1000003814697,"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":195.5,"connectEnd":195.5,"connectStart":195.5,"domainLookupEnd":195.5,"domainLookupStart":195.5,"fetchStart":195.5,"redirectEnd":0,"redirectStart":0,"requestStart":195.5,"responseEnd":499.6000003814697,"responseStart":499.6000003814697,"secureConnectionStart":195.5},{"duration":308.09999990463257,"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":195.60000038146973,"connectEnd":195.60000038146973,"connectStart":195.60000038146973,"domainLookupEnd":195.60000038146973,"domainLookupStart":195.60000038146973,"fetchStart":195.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":195.60000038146973,"responseEnd":503.7000002861023,"responseStart":503.7000002861023,"secureConnectionStart":195.60000038146973},{"duration":308.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":195.7000002861023,"connectEnd":195.7000002861023,"connectStart":195.7000002861023,"domainLookupEnd":195.7000002861023,"domainLookupStart":195.7000002861023,"fetchStart":195.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":195.7000002861023,"responseEnd":504.30000019073486,"responseStart":504.2000002861023,"secureConnectionStart":195.7000002861023},{"duration":308.7000002861023,"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":196,"connectEnd":196,"connectStart":196,"domainLookupEnd":196,"domainLookupStart":196,"fetchStart":196,"redirectEnd":0,"redirectStart":0,"requestStart":196,"responseEnd":504.7000002861023,"responseStart":504.7000002861023,"secureConnectionStart":196},{"duration":376.19999980926514,"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":196.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":572.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":308.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":196.2000002861023,"connectEnd":196.2000002861023,"connectStart":196.2000002861023,"domainLookupEnd":196.2000002861023,"domainLookupStart":196.2000002861023,"fetchStart":196.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":196.2000002861023,"responseEnd":505.1000003814697,"responseStart":505.1000003814697,"secureConnectionStart":196.2000002861023},{"duration":376.2000002861023,"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":196.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":572.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":309.09999990463257,"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":196.60000038146973,"connectEnd":196.60000038146973,"connectStart":196.60000038146973,"domainLookupEnd":196.60000038146973,"domainLookupStart":196.60000038146973,"fetchStart":196.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":196.60000038146973,"responseEnd":505.7000002861023,"responseStart":505.7000002861023,"secureConnectionStart":196.60000038146973},{"duration":414.5,"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":203.7000002861023,"connectEnd":203.7000002861023,"connectStart":203.7000002861023,"domainLookupEnd":203.7000002861023,"domainLookupStart":203.7000002861023,"fetchStart":203.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":203.7000002861023,"responseEnd":618.2000002861023,"responseStart":618.2000002861023,"secureConnectionStart":203.7000002861023},{"duration":442.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":205.7000002861023,"connectEnd":205.7000002861023,"connectStart":205.7000002861023,"domainLookupEnd":205.7000002861023,"domainLookupStart":205.7000002861023,"fetchStart":205.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":205.7000002861023,"responseEnd":648.2000002861023,"responseStart":648.2000002861023,"secureConnectionStart":205.7000002861023},{"duration":36.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":583.1000003814697,"connectEnd":583.1000003814697,"connectStart":583.1000003814697,"domainLookupEnd":583.1000003814697,"domainLookupStart":583.1000003814697,"fetchStart":583.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":583.1000003814697,"responseEnd":619.2000002861023,"responseStart":619.2000002861023,"secureConnectionStart":583.1000003814697},{"duration":209.60000038146973,"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":623.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":623.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":833.1000003814697,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":21,"responseStart":190,"responseEnd":205,"domLoading":193,"domInteractive":1031,"domContentLoadedEventStart":1031,"domContentLoadedEventEnd":1073,"domComplete":1286,"loadEventStart":1286,"loadEventEnd":1286,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1010.2000002861023},{"name":"bigPipe.sidebar-id.end","time":1010.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1011},{"name":"bigPipe.activity-panel-pipe-id.end","time":1012.6000003814697},{"name":"activityTabFullyLoaded","time":1090.9000000953674}],"measures":[],"correlationId":"dc1ed9271a9fa4","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
> Could MariaDB be compiled with libaio and allow the use of libaio for kernel 5.14 instead of setting innodb_use_native_aio=OFF which impacts performance?
It gets a bit messy to affect build time compilation by the kernel version of what is being built.
Also a fun situation where running containers on a host kernel that isn't mapping to the container build. This was the reason behind runtime checks of version (despite their imperfection).
Another invasive solution, that I don't immediately advocate, is to link against uring and libaio at the same time.
> There's also the possibility that Red Hat will (perhaps already?) backport the fix to 5.14.
Based on Red Hat kernel processes I think its highly likely the RHEL image has this corrected.
> If that's the case a more rigorous check for kernel version/platform would be needed in ha_innodb.cc.
I'm open to this. If you've got a uname -v and a uname -r output from a RHEL9 kernel that would be most useful.
Or given how old the version checks where in
MDEV-26674, 2.5 years ago, just remove the version checks and let the responsible people who pay for kernel stability, or are responsible to update kernels to gain fixes, let them gain the use of the features that are fixed.Do you have a preference Ali.maria or marko?