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

Test innodb-wl5522-debug-zip aka innodb_zip.wl5522_debug_zip has race condition between opening tablespaces and external tool

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.2(EOL)
    • 10.2.5
    • Tests
    • None

    Description

      InnoDB tries to open file on read-only mode but some external tool (in this case ib-utils) also has opened it as read-write.

      innodb.innodb-wl5522-debug-zip 'innodb'  [ fail ]  Found warnings/errors in server log file!
              Test ended at 2016-12-19 10:38:46
      line
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: Cannot open datafile for read-only: './test_wl5522/t1.ibd' OS error: 71
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2016-12-19 10:38:35 139864375539584 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
      2016-12-19 10:38:35 139864375539584 [Warning] InnoDB: Ignoring tablespace `test_wl5522/t1` because it could not be opened.
      ^ Found warnings in /dev/shm/log/mysqld.1.err
      

      Attachments

        Activity

          It would be useful to see more of the server error log, to determine at which point of the test the message was issued.
          I renamed the test to innodb_zip.wl5522_debug_zip and did some minor cleanup on 2017-02-24.
          It is possible that my DBUG_DEBUG fix reduced the I/O workload enough so that the race condition is now harder to repeat.

          marko Marko Mäkelä added a comment - It would be useful to see more of the server error log, to determine at which point of the test the message was issued. I renamed the test to innodb_zip.wl5522_debug_zip and did some minor cleanup on 2017-02-24. It is possible that my DBUG_DEBUG fix reduced the I/O workload enough so that the race condition is now harder to repeat.

          Is this still an issue?

          marko Marko Mäkelä added a comment - Is this still an issue?

          The Description looks like a misunderstanding. No source code revision was stated, but based on the timestamp, this was slightly before the mariadb-10.2.3 release. The test innodb.innodb-wl5522-debug-zip had not been modified between 10.2.2 and 10.2.3, but there were some changes to the suppressions in 10.2.4. In MDEV-11927 (10.2.5) the test was partly replaced with innodb_zip.wl5522_debug_zip.

          I believe that the “ib-utils” refers to sections of the test like this:

          FLUSH TABLES t1 FOR EXPORT;
           
          perl;
          do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
          ib_backup_tablespaces("test", "t1");
          EOF
          UNLOCK TABLES;
          

          There is no race condition here, because the file is being accessed between FLUSH TABLES…FOR EXPORT and UNLOCK TABLES.

          It looks like the problem simply was that the call mtr.add_suppression() had not been adjusted to the changed error messages:

          git grep -B1 'The error means' mariadb-10.2.3 -- storage/innobase/ mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
          

          This will find several ib::error() calls with that string but no suppression in the test. (There are suppressions in the test innodb-wl5522-debug.)

          I suspect that this was fixed in the 10.2.5 release.

          marko Marko Mäkelä added a comment - The Description looks like a misunderstanding. No source code revision was stated, but based on the timestamp, this was slightly before the mariadb-10.2.3 release. The test innodb.innodb-wl5522-debug-zip had not been modified between 10.2.2 and 10.2.3, but there were some changes to the suppressions in 10.2.4. In MDEV-11927 (10.2.5) the test was partly replaced with innodb_zip.wl5522_debug_zip . I believe that the “ ib-utils ” refers to sections of the test like this: FLUSH TABLES t1 FOR EXPORT;   perl; do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl" ; ib_backup_tablespaces( "test" , "t1" ); EOF UNLOCK TABLES; There is no race condition here, because the file is being accessed between FLUSH TABLES…FOR EXPORT and UNLOCK TABLES . It looks like the problem simply was that the call mtr.add_suppression() had not been adjusted to the changed error messages: git grep -B1 'The error means' mariadb-10.2.3 -- storage/innobase/ mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test This will find several ib::error() calls with that string but no suppression in the test. (There are suppressions in the test innodb-wl5522-debug .) I suspect that this was fixed in the 10.2.5 release.

          People

            marko Marko Mäkelä
            jplindst Jan Lindström (Inactive)
            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.