Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26212

PAM authentication fails with ENOMEM

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Sergei Golubchik made transition -
            Open In Progress
            231d 6h 1
            Sergei Golubchik made transition -
            In Progress In Review
            5s 1
            Sergei Golubchik made transition -
            In Review In Testing
            45d 23h 24m 1
            Sergei Golubchik made transition -
            In Testing Closed
            17h 17m 1

            People

              serg Sergei Golubchik
              vklasen Volker Klasen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.