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

atomic.alter_table fails with "file not found" warnings on delete

    XMLWordPrintable

Details

    Description

      The following test failed for me locally:

      10.7 97d16c7544c40430facda441dab89fa4b23468a0

      atomic.alter_table 'innodb'              w41 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2022-08-02 08:40:07
      line
      2022-08-02  8:39:10 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2022-08-02  8:39:10 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2022-08-02  8:39:10 0 [ERROR] InnoDB: File ./test/#sql-backup-55d70-4.ibd: 'delete' returned OS error 71.
      ^ Found warnings in /dev/shm/10.7/mysql-test/var/41/log/mysqld.1.err
      

      In the var/41/log/mysqld.1.err, the warnings occurred in the following snippet:

      10.7 97d16c7544c40430facda441dab89fa4b23468a0

      Version: '10.7.5-MariaDB-debug-log'  socket: '/dev/shm/10.7/mysql-test/var/tmp/41/mysqld.1.sock'  port: 16760  Source distribution
      2022-08-02  8:39:10 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2022-08-02  8:39:10 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2022-08-02  8:39:10 0 [ERROR] InnoDB: File ./test/#sql-backup-55d70-4.ibd: 'delete' returned OS error 71.
      2022-08-02  8:39:11 4 [Note] mariadbd: Crashing at ddl_log_alter_after_delete_backup
      SIGKILL myself
      

      The "OS error 71" is actually InnoDB’s own invented error code OS_FILE_NOT_FOUND.

      Based on this output, I created a reduced version of the test, preserving only this and the previous crash point, and covering only the InnoDB recovery:

      diff --git a/mysql-test/suite/atomic/alter_table.test b/mysql-test/suite/atomic/alter_table.test
      index 1f87b7e71b8..2b415a68a16 100644
      --- a/mysql-test/suite/atomic/alter_table.test
      +++ b/mysql-test/suite/atomic/alter_table.test
      @@ -32,16 +32,16 @@ RESET MASTER;
       
       if ($engine_count == "")
       {
      -  let $engine_count=2;
      -  let $engines='myisam','innodb';
      +  let $engine_count=1;
      +  let $engines='innodb';
       }
       if ($extra_engine == "")
       {
         let $extra_engine=aria;
       }
       
      -let $crash_count=13;
      -let $crash_points='ddl_log_alter_after_create_frm', 'ddl_log_alter_after_create_table', 'ddl_log_alter_after_prepare_inplace','ddl_log_alter_after_copy', 'ddl_log_alter_after_log', 'ddl_log_alter_after_rename_to_backup', 'ddl_log_alter_after_rename_to_backup_log', 'ddl_log_alter_rename_frm', 'ddl_log_alter_after_rename_to_original', 'ddl_log_alter_before_rename_triggers', 'ddl_log_alter_after_rename_triggers', 'ddl_log_alter_after_delete_backup', 'ddl_log_alter_after_drop_original_table';
      +let $crash_count=2;
      +let $crash_points='ddl_log_alter_after_rename_triggers', 'ddl_log_alter_after_delete_backup';
       
       let $statement_count=16;
       let $statements='ALTER TABLE t1 ADD COLUMN c INT, COMMENT "new"',
      

      Unfortunately, I was unable to reproduce the failure by running either the full test or the reduced test several times. The reduced test passed 33×100 runs on both 10.6 and 10.7.

      I would like to see rr record traces both of the killed server and of the recovery where such messages are being emitted.

      The messages seem to be a nuisance only; I do not see any correctness problem.

      Attachments

        Issue Links

          Activity

            People

              mleich Matthias Leich
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.