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

Innodb fails to start on older kernels that don't support F_DUPFD_CLOEXEC

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            njackson Nicholas Jackson created issue -
            njackson Nicholas Jackson made changes -
            Field Original Value New Value
            njackson Nicholas Jackson made changes -
            Description After 10.1.34 was released, we have received several reports of systems unable to start innodb with the error:
            {noformat}
            InnoDB: Error: unable to create temporary file; errno: 22
            {noformat}

            An strace shows:
            {noformat}
            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>
            {noformat}

            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.
            After 10.1.34 was released, we have received several reports of systems using the community repositories unable to start innodb with the error:
            {noformat}
            InnoDB: Error: unable to create temporary file; errno: 22
            {noformat}

            An strace shows:
            {noformat}
            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>
            {noformat}

            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.
            njackson Nicholas Jackson made changes -
            Environment Linux kernels older than 2.6.24
            elenst Elena Stepanova made changes -
            Component/s Storage Engine - InnoDB [ 10129 ]
            Fix Version/s 10.1 [ 16100 ]
            Assignee Jan Lindström [ jplindst ]
            serg Sergei Golubchik made changes -
            Labels need_feedback
            serg Sergei Golubchik made changes -
            Labels need_feedback
            serg Sergei Golubchik made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            serg Sergei Golubchik made changes -
            Affects Version/s 10.2.16 [ 23110 ]
            Affects Version/s 10.3.8 [ 23113 ]
            jplindst Jan Lindström (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jplindst Jan Lindström (Inactive) made changes -
            Assignee Jan Lindström [ jplindst ] Thirunarayanan B [ thiru ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2018-11-08 06:50:14.0 2018-11-08 06:50:14.343
            marko Marko Mäkelä made changes -
            Component/s Storage Engine - XtraDB [ 10135 ]
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.3 [ 22126 ]
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            Resolution Won't Fix [ 2 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 87980 ] MariaDB v4 [ 154551 ]

            People

              marko Marko Mäkelä
              njackson Nicholas Jackson
              Votes:
              2 Vote for this issue
              Watchers:
              10 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.