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

openat(<directory>, ...O_EXEC) fails on Illumos / Solaris.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.22
    • Fix Version/s: 5.5.56, 10.1.23, 10.0.31
    • Component/s: Server
    • Labels:
      None
    • Environment:
      OmniOS r151020 - Illumos derivative.
      Solaris 11.3 (maybe earlier).

      Description

      MariaDB fails to start with error:

      ERROR: 1030  Got error 8 "Exec format error" from storage engine MyISAM
      

      This is due to openat() being called on a directory with the O_EXEC flag set.

      The man page for openat() on these platforms specifies that:

             O_EXEC      Open ordinary file for execute only.
      

      and returns:

             ENOEXEC         The O_EXEC access mode was specified and the file to be
                             opened is not an ordinary file.
      

      Trace shows that this is occurring:

      28152/27:       openat(4294967295, "/data", O_EXEC|O_NOFOLLOW)  Err#8 ENOEXEC
      28152/27:       write(2, " E R R O R :  ", 7)                   = 7
      

      My MariaDB files are under /data/mariadb/ — the parent directory is being opened with O_EXEC hence the failure.

      The last working version that I've tried is 10.1.19

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                fiddaman Andy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: