Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.5.4
    • N/A
    • Server
    • POWER_PPC64, AIX 7.1, GCC 8.4

    Description

      Hi,

      On AIX, all tests fail with an EBADF:

      [ERROR] Error in accept: Bad file number

      The error is from handle_connections_sockets() function in sql/mysqld.cc. This function has been rewritten in 10.5.
      If I compare https://github.com/MariaDB/server/blob/10.4/sql/mysqld.cc#L6549 and https://github.com/MariaDB/server/blob/10.5/sql/mysqld.cc#L6262, I think the logic is not the same.
      In particular, if getting fd is a success, the loop is over on 10.4, and the loop retries in 10.5.
      It causes the EBADF on AIX. The following patch corrects the trouble on AIX and does not affect Linux tests result.

      --- ./sql/mysqld.cc.orig        2020-07-10 13:26:15 +0200
      +++ ./sql/mysqld.cc     2020-07-10 16:57:03 +0200
      @@ -6260,8 +6260,8 @@
                 sql_perror("Error in accept");
               if (socket_errno == SOCKET_ENFILE || socket_errno == SOCKET_EMFILE)
                 sleep(1); // Give other threads some time
      -        break;
             }
      +      break;
           }
         }
         sd_notify(0, "STOPPING=1\n"
      

      I think this patch restores the same logical between 10.4 and 10.5.

      Tested on:
      AIX configuration: POWER_PPC64, AIX 7.1, GCC 8.4
      Linux configuration: x86_64, Fedora 31, 9.3

      Attachments

        Activity

          This bug cannot be reproduced on 10.5.13.

          EGuesnet Etienne Guesnet added a comment - This bug cannot be reproduced on 10.5.13.

          AIX is not supported on 10.4. I think this bug is no more relevant.
          The error has disappeared after an update (I do not remember which one). We have worked with my colleagues to understand this bug but it is abstruse.

          EGuesnet Etienne Guesnet added a comment - AIX is not supported on 10.4. I think this bug is no more relevant. The error has disappeared after an update (I do not remember which one). We have worked with my colleagues to understand this bug but it is abstruse.
          danblack Daniel Black added a comment -

          Thanks EGuesnet

          danblack Daniel Black added a comment - Thanks EGuesnet

          People

            danblack Daniel Black
            EGuesnet Etienne Guesnet
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.