[MDEV-16944] innodb.alter_crash failed in buildbot - The process cannot access the file Created: 2018-08-11  Updated: 2023-11-29

Status: Confirmed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Microsoft Windows



 Description   

http://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/9770

innodb.alter_crash 'innodb'              w3 [ fail ]
        Test ended at 2018-07-26 11:17:18
 
CURRENT_TEST: innodb.alter_crash
The process cannot access the file because it is being used by another process.
mysqltest: In included file "./include/start_mysqld.inc": 
included from D:/win32-debug/build/src/mysql-test/suite/innodb/t/alter_crash.test at line 77:
At line 10: exec of 'D:\win32-debug\build\client\Debug\echo.exe "restart" > D:/win32-debug/build/mysql-test/var/3/tmp/mysqld.1.expect' failed, error: 1, status: 1, errno: 2
Output from before failure:
# Restart mysqld after the crash and reconnect.
 
 
 
The result from queries just before the failure was:
< snip >
ALTER TABLE t1 ADD INDEX (c2,c3);
ERROR HY000: Index c3 is corrupted
ALTER TABLE t1 CHANGE c3 c3 INT NOT NULL;
CHECK TABLE t1;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
ALTER TABLE t1 ADD INDEX (c2,c3);
DROP TABLE t1;
#
# Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
#
# -- Scenario 1:
# Crash the server in ha_innobase::commit_inplace_alter_table()
# just after committing the dictionary changes.
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
INSERT INTO t1 VALUES (1,2),(3,4);
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
 
More results from queries before failure can be found in D:\win32-debug\build\mysql-test\var\3\log\alter_crash.log



 Comments   
Comment by Alice Sherepa [ 2020-12-02 ]

https://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/18579/steps/test/logs/stdio

innodb.alter_crash 'innodb'              w4 [ fail ]
        Test ended at 2020-12-01 11:29:01
 
CURRENT_TEST: innodb.alter_crash
The process cannot access the file because it is being used by another process.
mysqltest: In included file "./include/start_mysqld.inc": 
included from D:/win32-debug/build/src/mysql-test/suite/innodb/t/alter_crash.test at line 186:
At line 10: exec of 'D:\win32-debug\build\client\Debug\echo.exe "restart" > D:/win32-debug/build/mysql-test/var/4/tmp/mysqld.1.expect' failed, error: 1, status: 1, errno: 2
Output from before failure:
# Restart mysqld after the crash and reconnect.
 
 
 
The result from queries just before the failure was:
< snip >
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
DROP TABLE t2;
db.opt
# -------------------------
# End of Testing Scenario 2
# -------------------------
#
# Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
# DATA DICTIONARY INCONSISTENCY
#
CREATE TABLE t1(a int PRIMARY KEY, b varchar(255), c int NOT NULL)
ENGINE=InnoDB;
INSERT INTO t1 SET a=1,c=2;
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
 
More results from queries before failure can be found in D:\win32-debug\build\mysql-test\var\4\log\alter_crash.log
 
 - saving 'D:/win32-debug/build/mysql-test/var/4/log/innodb.alter_crash-innodb/' to 'D:/win32-debug/build/mysql-test/var/log/innodb.alter_crash-innodb/'
 
Retrying test innodb.alter_crash, attempt(2/3)...
 
***Warnings generated in error logs during shutdown after running tests: innodb.alter_crash
 
2020-12-01 11:28:55 7032 [ERROR] InnoDB: Flagged corruption of `c2` in table `test`.`t1` in dict_set_index_corrupted
2020-12-01 11:28:55 7032 [ERROR] InnoDB: Flagged corruption of `c3` in table `test`.`t1` in dict_set_index_corrupted
2020-12-01 11:28:58 6780 [ERROR] InnoDB: Index `c2` of table `test`.`t1` is corrupted
2020-12-01 11:28:58 6780 [ERROR] InnoDB: Index `c3` of table `test`.`t1` is corrupted

Comment by Marko Mäkelä [ 2023-11-29 ]

This appears to be something specific to Microsoft Windows. wlad, can you help? Here is the latest failure:

preview-11.3-preview b9b56b5fdd7d096e6ce59d3c1072ca30506dd694

innodb.alter_crash 'innodb'              w2 [ fail ]
        Test ended at 2023-09-13 20:33:02
 
CURRENT_TEST: innodb.alter_crash
The process cannot access the file because it is being used by another process.
mysqltest: In included file "./include/start_mysqld.inc": 
included from D:/winx64-debug/build/src/mysql-test/suite/innodb/t/alter_crash.test at line 160:
At line 37: exec of 'D:\winx64-debug\build\client\\Debug\echo.exe "restart" > D:/winx64-debug/build/mysql-test/var/2/tmp/mysqld.1.expect' failed, error: 1, status: 1, errno: 2
Output from before failure:
# Restart mysqld after the crash and reconnect.

This would appear to be a bug in the restart_mysqld.inc logic.

Comment by Vladislav Vaintroub [ 2023-11-29 ]

This all stems from nonsensical "fix" by Bjorn Munch https://bugs.mysql.com/bug.php?id=58515
Everyone is repeating "exec echo" since then.

Generated at Thu Feb 08 08:32:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.