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

innodb.innodb_28867993 fails on FreeBSD with an error in log file

Details

    Description

      10.8 0e0a3580e

      innodb.innodb_28867993 'innodb'          w3 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2022-05-28 00:37:06
      line
      2022-05-28  0:37:05 0 [ERROR] InnoDB: File ./ib_logfile2: 'delete' returned OS error 201.
      ^ Found warnings in /tmp/var/3/log/mysqld.1.err
      ok
      

      It fails seemingly reliably (or at least very frequently) on 10.8+. No recorded failures on 10.7.

      Attachments

        Activity

          InnoDB sometimes likes to add OS_FILE_ERROR_MAX (200) to the errno codes. In FreeBSD, EPERM is 1. The Linux man 2 unlink says:

          EPERM The system does not allow unlinking of directories, or unlinking
          of directories requires privileges that the calling process
          doesn't have. (This is the POSIX prescribed error return; as
          noted above, Linux returns EISDIR for this case.)

          It seems that the following should fix this. It is applicable to every major version.

          diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
          index 42772904bc3..83beccc6909 100644
          --- a/storage/innobase/os/os0file.cc
          +++ b/storage/innobase/os/os0file.cc
          @@ -810,6 +810,7 @@ os_file_get_last_error_low(
           		return(OS_FILE_ALREADY_EXISTS);
           	case EXDEV:
           	case ENOTDIR:
          +	case EPERM:
           	case EISDIR:
           		return(OS_FILE_PATH_ERROR);
           	case EAGAIN:
          

          marko Marko Mäkelä added a comment - InnoDB sometimes likes to add OS_FILE_ERROR_MAX (200) to the errno codes. In FreeBSD, EPERM is 1. The Linux man 2 unlink says: EPERM The system does not allow unlinking of directories, or unlinking of directories requires privileges that the calling process doesn't have. (This is the POSIX prescribed error return; as noted above, Linux returns EISDIR for this case.) It seems that the following should fix this. It is applicable to every major version. diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 42772904bc3..83beccc6909 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -810,6 +810,7 @@ os_file_get_last_error_low( return(OS_FILE_ALREADY_EXISTS); case EXDEV: case ENOTDIR: + case EPERM: case EISDIR: return(OS_FILE_PATH_ERROR); case EAGAIN:

          Here is the result of a test push for a 10.8-based branch:
          http://buildbot.askmonty.org/buildbot/builders/kvm-ports-freebsd130-amd64/builds/1120/steps/mtr/logs/stdio

          innodb.innodb_28867993 'innodb'          w1 [ pass ]   1613
          

          marko Marko Mäkelä added a comment - Here is the result of a test push for a 10.8-based branch: http://buildbot.askmonty.org/buildbot/builders/kvm-ports-freebsd130-amd64/builds/1120/steps/mtr/logs/stdio innodb.innodb_28867993 'innodb' w1 [ pass ] 1613

          People

            marko Marko Mäkelä
            elenst Elena Stepanova
            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.