When using the authentication plugin PAM it fails in case the mariadb process uses more memory than is still free and memory overcommit is disabled.
The reason lies in fork() (https://github.com/MariaDB/server/blob/10.7/plugin/auth_pam/auth_pam.c#L62) which duplicates the process. As there is not enough free memory for a duplicate process fork() fails (silently) and the authentication does not succeed.
As the forked process is only used to exec() the pam tool, there is no need for a fork of the whole server process.
It can be reproduced by running a mariadb server with an innodb_buffer of more than half of the server's (best a VM with as few RAM as possible) RAM and filling it up by selecting a big table of test data.
This issue had already been reported in Percona server: https://jira.percona.com/browse/PS-3332
Cheers
Volker
- relates to
-
MDEV-30734
[ERROR] mariadbd: pam: cannot exec /usr/lib64/mysql/plugin/auth_pam_tool_dir/auth_pam_tool (errno: 12 "Cannot allocate memory")
-
-
Closed
{"report":{"fcp":884,"ttfb":259.39999997615814,"pageVisibility":"visible","entityId":101443,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"a67e456b-7cf5-404e-9ebf-62a23dab3b78","navigationType":0,"readyForUser":957.8999999761581,"redirectCount":0,"resourceLoadedEnd":751.1999999880791,"resourceLoadedStart":268,"resourceTiming":[{"duration":94.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":268,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":362.5,"responseStart":0,"secureConnectionStart":0},{"duration":94.60000002384186,"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":268.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":362.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":219.69999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":268.5,"connectEnd":268.5,"connectStart":268.5,"domainLookupEnd":268.5,"domainLookupStart":268.5,"fetchStart":268.5,"redirectEnd":0,"redirectStart":0,"requestStart":364.39999997615814,"responseEnd":488.19999998807907,"responseStart":379.2999999523163,"secureConnectionStart":268.5},{"duration":339.60000002384186,"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":269.0999999642372,"connectEnd":269.0999999642372,"connectStart":269.0999999642372,"domainLookupEnd":269.0999999642372,"domainLookupStart":269.0999999642372,"fetchStart":269.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":366.19999998807907,"responseEnd":608.6999999880791,"responseStart":395.5999999642372,"secureConnectionStart":269.0999999642372},{"duration":129.10000002384186,"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":269.2999999523163,"connectEnd":269.2999999523163,"connectStart":269.2999999523163,"domainLookupEnd":269.2999999523163,"domainLookupStart":269.2999999523163,"fetchStart":269.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":366.39999997615814,"responseEnd":398.39999997615814,"responseStart":396.5999999642372,"secureConnectionStart":269.2999999523163},{"duration":129.0999999642372,"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":269.5,"connectEnd":269.5,"connectStart":269.5,"domainLookupEnd":269.5,"domainLookupStart":269.5,"fetchStart":269.5,"redirectEnd":0,"redirectStart":0,"requestStart":366.5999999642372,"responseEnd":398.5999999642372,"responseStart":397.0999999642372,"secureConnectionStart":269.5},{"duration":131.19999998807907,"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":269.69999998807907,"connectEnd":269.69999998807907,"connectStart":269.69999998807907,"domainLookupEnd":269.69999998807907,"domainLookupStart":269.69999998807907,"fetchStart":269.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":367.5999999642372,"responseEnd":400.89999997615814,"responseStart":398.69999998807907,"secureConnectionStart":269.69999998807907},{"duration":96.30000001192093,"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":269.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":366.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":131,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":270,"connectEnd":270,"connectStart":270,"domainLookupEnd":270,"domainLookupStart":270,"fetchStart":270,"redirectEnd":0,"redirectStart":0,"requestStart":368.5,"responseEnd":401,"responseStart":399.5,"secureConnectionStart":270},{"duration":97.30000001192093,"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":270.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":367.5,"responseStart":0,"secureConnectionStart":0},{"duration":133.20000004768372,"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":270.2999999523163,"connectEnd":270.2999999523163,"connectStart":270.2999999523163,"domainLookupEnd":270.2999999523163,"domainLookupStart":270.2999999523163,"fetchStart":270.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":369.69999998807907,"responseEnd":403.5,"responseStart":401.5,"secureConnectionStart":270.2999999523163},{"duration":356.19999998807907,"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":279.89999997615814,"connectEnd":279.89999997615814,"connectStart":279.89999997615814,"domainLookupEnd":279.89999997615814,"domainLookupStart":279.89999997615814,"fetchStart":279.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":624.5,"responseEnd":636.0999999642372,"responseStart":635.0999999642372,"secureConnectionStart":279.89999997615814},{"duration":471.19999998807907,"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":280,"connectEnd":280,"connectStart":280,"domainLookupEnd":280,"domainLookupStart":280,"fetchStart":280,"redirectEnd":0,"redirectStart":0,"requestStart":739.1999999880791,"responseEnd":751.1999999880791,"responseStart":750.2999999523163,"secureConnectionStart":280},{"duration":161.39999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":614.5,"connectEnd":614.5,"connectStart":614.5,"domainLookupEnd":614.5,"domainLookupStart":614.5,"fetchStart":614.5,"redirectEnd":0,"redirectStart":0,"requestStart":738.7999999523163,"responseEnd":775.8999999761581,"responseStart":774.7999999523163,"secureConnectionStart":614.5}],"fetchStart":0,"domainLookupStart":39,"domainLookupEnd":57,"connectStart":58,"connectEnd":78,"secureConnectionStart":67,"requestStart":79,"responseStart":259,"responseEnd":278,"domLoading":263,"domInteractive":1009,"domContentLoadedEventStart":1009,"domContentLoadedEventEnd":1053,"domComplete":1967,"loadEventStart":1967,"loadEventEnd":1967,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":989.5},{"name":"bigPipe.sidebar-id.end","time":990.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":990.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":991.8999999761581},{"name":"activityTabFullyLoaded","time":1073.3999999761581}],"measures":[],"correlationId":"d02e64cc993c60","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":21,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}