[MDEV-29230] atomic.alter_table fails with "file not found" warnings on delete Created: 2022-08-02  Updated: 2024-01-24  Resolved: 2024-01-24

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - InnoDB
Affects Version/s: 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.6.10

Type: Bug Priority: Minor
Reporter: Marko Mäkelä Assignee: Matthias Leich
Resolution: Cannot Reproduce Votes: 0
Labels: need_rr

Issue Links:
Relates
relates to MDEV-25180 Atomic ALTER TABLE Closed

 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.



 Comments   
Comment by Marko Mäkelä [ 2024-01-24 ]

According to the cross-reference, this test last failed in this way in August 2022. There was one more recent failure in March 2023 for a development branch bb-10.6.9-hash-join-improvements, which was a few commits ahead of the mariadb-10.6.9 release tag (August 2022). It looks like this bug must have been fixed in MariaDB Server 10.6.10.

Possibly, this was fixed by MDEV-29282.

Generated at Thu Feb 08 10:06:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.