Bug #114896 Several tablespace encryption tests failing
Submitted: 6 May 15:00 Modified: 4 Jul 8:02
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.4.0 OS:MacOS (14.4.1)
Assigned to: CPU Architecture:ARM

[6 May 15:00] Laurynas Biveinis
Description:
Using a debug build:
$ mtr component_keyring_file.tablespace_encrypt_10
...
[ 50%] component_keyring_file.tablespace_encrypt_10  [ fail ]
        Test ended at 2024-05-06 17:54:17

CURRENT_TEST: component_keyring_file.tablespace_encrypt_10
mysqltest: At line 23: Query 'SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'' failed with wrong error 2002: 'Can't connect to local MySQL server through socket '/tmp/mtr-GIn1/mysqld.1.sock' (61)', should have failed with any of '2013,2006' errors.
In included file ./suite/innodb/include/resume_test_encryption.inc: 23
included from ./include/keyring_tests/innodb/tablespace_encrypt_10.inc: 90
included from /Users/laurynas/vilniusdb/mysql-8.4.0/mysql-test/suite/component_keyring_file/t/tablespace_encrypt_10.test: 10

The result from queries just before the failure was:
SOME VALUES
SOME VALUES
SOME VALUES
SOME VALUES
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y';
ERROR HY000: Can't find master key from keyring, please check in the server log if a keyring is loaded and initialized successfully.
#-------------------------- TEST 1 -------------------------------------#
# RESTART 1 : WITH KEYRING
# Restore local manifest file for MySQL server instance from backup
########################################################################
# ALTER TABLESPACE :    Unencrypted => Encrypted                       #
########################################################################
# Set process to crash at page 10
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10';
# Encrypt the tablespace. It will cause crash.
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y';
# RESTART 2 : WITH KEYRING COMPONENT after crash and cause resume operation
#              to crash just before flushing page 0 at the end
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts';
ERROR HY000: Can't connect to local MySQL server through socket '/tmp/mtr-GIn1/mysqld.1.sock' (61)

How to repeat:
See above. CMake options -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON -DFORCE_COLORED_OUTPUT=ON -DWITH_ZLIB=bundled
[6 May 15:08] Laurynas Biveinis
Likewise component_keyring_file.tablespace_encrypt_9
[6 May 15:11] Laurynas Biveinis
Likewise innodb.tablespace_encrypt_10
[7 May 4:55] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

regards,
Umesh
[4 Jul 8:02] Laurynas Biveinis
Does not reproduce on 8.0.38 / 8.4.1 / 9.0.0