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

InnoDB startup fails to wait for recv_writer_thread to finish

    XMLWordPrintable

Details

    Description

      InnoDB crash recovery starts recv_writer_thread to keep track of page flushing. As part of startup, recv_recovery_from_checkpoint_finish() would normally wait for this thread to exit, by waiting for !recv_writer_thread_active.

      However, it is possible that on a busy system, recv_writer_thread will not get scheduled for execution before recv_recovery_from_checkpoint_finish() executes the test. In this case, recv_writer_thread() could start executing later than it should. Ultimately this could end in an assertion failure, as was observed on buildbot for the recently added test innodb.log_file:

      void
      recv_recovery_rollback_active(void)
      /*===============================*/
      {
      	ut_ad(!recv_writer_thread_active);
      

      A simple fix would be to initialize `recv_writer_thread_active=true` in the thread creator, similar to what was done in MDEV-11638 some time ago.

      Attachments

        Issue Links

          Activity

            People

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