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

engines/funcs.crash_manytables_number crashes with error 24 (too many open files)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2
    • 10.1.32
    • Server
    • None

    Description

      mtr engines/funcs.crash_manytables_number

      engines/funcs.crash_manytables_number 'innodb' [ pass ]  46262
      engines/funcs.crash_manytables_number 'myisam' [ fail ]
      CURRENT_TEST: engines/funcs.crash_manytables_number
      mysqltest: At line 966: query 'CREATE TABLE t482 (c1 INTEGER) ' failed: 1005: Can't create table `test`.`t482` (errno: 24 "Too many open files")
      

      This happens because we don't adjust the size of open table cache based on the number of files we can open.

      The current code adjust tc_size only if the following is true:

        (!open_files_limit || IS_SYSVAR_AUTOSIZE(&open_files_limit))
      

      The code should be adjusted so that we always adjust tc_size if it's bigger than

      (files - 10 - max_connections) / 2
      

      (I think that 10 is probably too low, we may need more file descriptors for temporary files etc).

      Currently the tc_size has a lower value of TABLE_OPEN_CACHE_MIN, which is 400.
      I think this should be made lower to at least 200 as it's more important that we get correct operations than run faster to a problem.

      Suggested fix:

      • Move code for adjusting tc_size out of current block and to be always
        tested. Write a warning if warning_level > 1 if it's adjusted
      • Change TABLE_OPEN_CACHE_MIN to 200
      • Change '10' to '30', to get a margin
      • Ensure that mtr engines/funcs.crash_manytables_number works, even when
        running it in a loop for a few times

      When mysqld is started with systemd, the number of files that can be
      opened is 64K and all of the above changes will have no affect. In
      other words, this change mostly affect development and test systems
      and when running mysql-test-run. It should not affect production systems.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              monty Michael Widenius
              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.