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

race condition in InnoDB dict_stats_schedule()

    XMLWordPrintable

Details

    Description

      dict_stats_schedule() can be invoked with ms=0. In that case dict_stats_func is
      invoked immediately, it calls dict_stats_process_entry_from_recalc_pool()
      which at the end might try to call dict_stats_schedule() again to
      queue another recalc. And it can happen that the first
      dict_stats_schedule(0) call didn't release dict_stats_mutex yet,
      so the second dict_stats_schedule() won't queue a recalc. And as a result the table
      won't have its stats recalculated at all, not now, not later.

      This causes innodb.innodb_stats_auto_recalc to fail sporadically.

      The fix could be to revert commit 7c7f9bef28a, use mutex locks, not trylocks, and resolve the deadlock somehow differently.

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            serg Sergei Golubchik
            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.