After 10.1.34 was released, we have received several reports of systems using the community repositories unable to start innodb with the error:
InnoDB: Error: unable to create temporary file; errno: 22
|
An strace shows:
3517 1529471977.932867 fcntl(6, F_DUPFD_CLOEXEC, 0) = -1 EINVAL (Invalid argument) <0.000004>
|
13517 1529471977.932897 write(2, "2018-06-20 2:19:37 47857084847680 [ERROR] mysqld: Out of resources when opening file 'ib*' (Errcode: 22 \"Invalid argument\")\n", 125) = 125 <0.000008>
|
13517 1529471977.932931 close(6) = 0 <0.000010>
|
13517 1529471977.932955 write(2, "2018-06-20 02:19:37 2b86988ad640", 32) = 32 <0.000006>
|
13517 1529471977.932978 write(2, " InnoDB: Error: unable to create temporary file; errno: 22\n", 60) = 60 <0.000006>
|
Seems that this was introduced in https://github.com/MariaDB/server/commit/bbee025370
Likely need a runtime check added to ensure F_DUPFD_CLOEXEC is supported by the kernel.
Haven't checked what other versions may be affected, but there are likely others.
- is caused by
-
MDEV-8743
galera in SST keeps innodb files open
-
-
Closed
{"report":{"fcp":1234.3999998569489,"ttfb":289.89999985694885,"pageVisibility":"visible","entityId":68270,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"acd21f72-d4f1-42a6-965c-2989b6cb9a84","navigationType":0,"readyForUser":1368.5999999046326,"redirectCount":0,"resourceLoadedEnd":969.6999998092651,"resourceLoadedStart":298,"resourceTiming":[{"duration":100.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":298,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":298,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":101.10000014305115,"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":298.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":298.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":399.5,"responseStart":0,"secureConnectionStart":0},{"duration":426.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":298.5,"connectEnd":298.5,"connectStart":298.5,"domainLookupEnd":298.5,"domainLookupStart":298.5,"fetchStart":298.5,"redirectEnd":0,"redirectStart":0,"requestStart":402.5,"responseEnd":725,"responseStart":419.2999999523163,"secureConnectionStart":298.5},{"duration":529.8000001907349,"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":298.69999980926514,"connectEnd":298.69999980926514,"connectStart":298.69999980926514,"domainLookupEnd":298.69999980926514,"domainLookupStart":298.69999980926514,"fetchStart":298.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":403.2999999523163,"responseEnd":828.5,"responseStart":429.2999999523163,"secureConnectionStart":298.69999980926514},{"duration":146.79999995231628,"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":298.89999985694885,"connectEnd":298.89999985694885,"connectStart":298.89999985694885,"domainLookupEnd":298.89999985694885,"domainLookupStart":298.89999985694885,"fetchStart":298.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":413.39999985694885,"responseEnd":445.69999980926514,"responseStart":436.69999980926514,"secureConnectionStart":298.89999985694885},{"duration":146.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":299.09999990463257,"connectEnd":299.09999990463257,"connectStart":299.09999990463257,"domainLookupEnd":299.09999990463257,"domainLookupStart":299.09999990463257,"fetchStart":299.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":413.69999980926514,"responseEnd":445.7999999523163,"responseStart":437.5,"secureConnectionStart":299.09999990463257},{"duration":148.40000009536743,"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":299.19999980926514,"connectEnd":299.19999980926514,"connectStart":299.19999980926514,"domainLookupEnd":299.19999980926514,"domainLookupStart":299.19999980926514,"fetchStart":299.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":413.7999999523163,"responseEnd":447.59999990463257,"responseStart":441.89999985694885,"secureConnectionStart":299.19999980926514},{"duration":111.29999995231628,"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":299.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":410.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":148.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":299.5,"connectEnd":299.5,"connectStart":299.5,"domainLookupEnd":299.5,"domainLookupStart":299.5,"fetchStart":299.5,"redirectEnd":0,"redirectStart":0,"requestStart":413.89999985694885,"responseEnd":447.7999999523163,"responseStart":443.89999985694885,"secureConnectionStart":299.5},{"duration":111.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":299.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":299.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":411.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":150.70000004768372,"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":299.7999999523163,"connectEnd":299.7999999523163,"connectStart":299.7999999523163,"domainLookupEnd":299.7999999523163,"domainLookupStart":299.7999999523163,"fetchStart":299.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":418.2999999523163,"responseEnd":450.5,"responseStart":446.09999990463257,"secureConnectionStart":299.7999999523163},{"duration":529.6000001430511,"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":309.89999985694885,"connectEnd":309.89999985694885,"connectStart":309.89999985694885,"domainLookupEnd":309.89999985694885,"domainLookupStart":309.89999985694885,"fetchStart":309.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":765.7999999523163,"responseEnd":839.5,"responseStart":834,"secureConnectionStart":309.89999985694885},{"duration":659.7999999523163,"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":309.89999985694885,"connectEnd":309.89999985694885,"connectStart":309.89999985694885,"domainLookupEnd":309.89999985694885,"domainLookupStart":309.89999985694885,"fetchStart":309.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":954.5999999046326,"responseEnd":969.6999998092651,"responseStart":966.2999999523163,"secureConnectionStart":309.89999985694885},{"duration":171.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":872.0999999046326,"connectEnd":872.0999999046326,"connectStart":872.0999999046326,"domainLookupEnd":872.0999999046326,"domainLookupStart":872.0999999046326,"fetchStart":872.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":996.1999998092651,"responseEnd":1044,"responseStart":1029.5,"secureConnectionStart":872.0999999046326},{"duration":191.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1165.7999999523163,"connectEnd":1165.7999999523163,"connectStart":1165.7999999523163,"domainLookupEnd":1165.7999999523163,"domainLookupStart":1165.7999999523163,"fetchStart":1165.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1324.2999999523163,"responseEnd":1357,"responseStart":1355,"secureConnectionStart":1165.7999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":79,"responseStart":290,"responseEnd":307,"domLoading":296,"domInteractive":1460,"domContentLoadedEventStart":1460,"domContentLoadedEventEnd":1509,"domComplete":1885,"loadEventStart":1885,"loadEventEnd":1885,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1418.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1419},{"name":"bigPipe.activity-panel-pipe-id.start","time":1419.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1422},{"name":"activityTabFullyLoaded","time":1527.3999998569489}],"measures":[],"correlationId":"4e8eb684bae8dc","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":121,"dbReadsTimeInMs":21,"dbConnsTimeInMs":31,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
In above commt I added CHECK_C_SOURCE where fcntl(fd, F_DUPFD_CLOEXEC, 0); is used and we define HAVE_IB_F_DUPFD_CLOEXEC only if call succeeds. In InnoDB then we use #if defined(F_DUPFD_CLOEXEC) && defined(HAVE_IB_F_DUPFD_CLOEXEC). If that is not enough I do not know what to do.