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

Increase OS_FILE_LIMIT to ULLONG_MAX

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • Variables
    • None

    Description

      MariaDB uses open_files_limit to set its limit on open file descriptors with setrlimit:

      https://github.com/MariaDB/server/blob/5abc79dd7ab2fccb4b05ca38a512ec816d2f8e52/mysys/my_file.c#L42

      And it only allows a maximum limit of OS_FILE_LIMIT:

      https://github.com/MariaDB/server/blob/5abc79dd7ab2fccb4b05ca38a512ec816d2f8e52/mysys/my_file.c#L102

      https://github.com/MariaDB/server/blob/78829a5780d3e48da376c1ca4e62731da450c551/sql/sys_vars.cc#L2434

      And OS_FILE_LIMIT is currently defined as UINT_MAX (4294967295):

      https://github.com/MariaDB/server/blob/8dc460b844dcb8a8ef70396bfaf932010076b9a3/include/my_global.h#L695

      RLIMIT_INFINITY seems to be defined as ULLONG_MAX on my system:

      $ grep "RLIM_INFINITY" /usr/include/bits/resource.h
      # define RLIM_INFINITY ((__rlim_t) -1)
      # define RLIM_INFINITY 0xffffffffffffffffuLL
      #define RLIM_SAVED_MAX  RLIM_INFINITY
      #define RLIM_SAVED_CUR  RLIM_INFINITY
      

      So if we increased OS_FILE_LIMIT to ULLONG_MAX, it looks like we could allow users to set an infinite limit.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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