Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
-- source include/have_innodb.inc
|
|
--echo
|
--echo # Start server with keys3.txt
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt --plugin-load-add=file_key_management --innodb-encrypt-log
|
-- source include/restart_mysqld.inc
|
|
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES;
|
INSERT INTO t1 VALUES ('foobar');
|
|
--echo
|
--echo # Restart server with keys2.txt
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt --plugin-load-add=file_key_management --innodb-encrypt-log
|
-- source include/restart_mysqld.inc
|
|
SELECT * FROM t1;
|
|
DROP TABLE t1;
|
BROKEN: block: 3190 checkpoint: 7 35967bef ac9a0f8b
|
BROKEN: block: 3190 checkpoint: 7 35967bef ac9a0f8b
|
InnoDB: Log block no 3190 at lsn 1632768 has
|
InnoDB: ok header, but checksum field contains 2895777675, should be 899054575
|
InnoDB: Set innodb_force_recovery to ignore this error.
|
2015-08-11 01:18:15 7fcd89f92760 InnoDB: Assertion failure in thread 140520759830368 in file log0recv.cc line 2833
|
InnoDB: We intentionally generate a memory trap.
|
Stack trace from 10.1 3025c42605af4d3341d0df155525dc174fe10843 |
#5 0x00007fcd87b6f3e0 in *__GI_abort () at abort.c:92
|
#6 0x00007fcd8a9091f7 in recv_scan_log_recs (available_memory=4177920, store_to_hash=1, buf=0x7fcd7f406200 "\200", len=65536, start_lsn=1632768, contiguous_lsn=0x7fffdfbbee20, group_scanned_lsn=0x7fffdfbbee18) at 10.1/storage/xtradb/log/log0recv.cc:2833
|
#7 0x00007fcd8a909770 in recv_group_scan_log_recs (group=0x7fcd8705f0b8, contiguous_lsn=0x7fffdfbbee20, group_scanned_lsn=0x7fffdfbbee18) at 10.1/storage/xtradb/log/log0recv.cc:3039
|
#8 0x00007fcd8a909f75 in recv_recovery_from_checkpoint_start_func (type=78656949, limit_lsn=18446744073709551615, min_flushed_lsn=1633257, max_flushed_lsn=1633257) at 10.1/storage/xtradb/log/log0recv.cc:3324
|
#9 0x00007fcd8a9eb6aa in innobase_start_or_create_for_mysql () at 10.1/storage/xtradb/srv/srv0start.cc:2523
|
#10 0x00007fcd8a881b28 in innobase_init (p=0x7fcd8702e070) at 10.1/storage/xtradb/handler/ha_innodb.cc:4101
|
#11 0x00007fcd8a710eaa in ha_initialize_handlerton (plugin=0x7fcd82ffa6e8) at 10.1/sql/handler.cc:513
|
#12 0x00007fcd8a4f7504 in plugin_initialize (tmp_root=0x7fffdfbc2ba0, plugin=0x7fcd82ffa6e8, argc=0x7fcd8b7b9430, argv=0x7fcd870730c0, options_only=false) at 10.1/sql/sql_plugin.cc:1407
|
#13 0x00007fcd8a4f80d6 in plugin_init (argc=0x7fcd8b7b9430, argv=0x7fcd870730c0, flags=2) at 10.1/sql/sql_plugin.cc:1680
|
#14 0x00007fcd8a3daff4 in init_server_components () at 10.1/sql/mysqld.cc:5160
|
#15 0x00007fcd8a3dbf8c in mysqld_main (argc=141, argv=0x7fcd870730c0) at 10.1/sql/mysqld.cc:5717
|
#16 0x00007fcd8a3d1810 in main (argc=21, argv=0x7fffdfbc38f8) at 10.1/sql/main.cc:25
|
Apparently it was fixed by the following revision, at least it does not crash since then:
commit 18b0176a058d7e6cc9a4f6886f32460345df8d0c
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Fri Aug 7 15:21:20 2015 +0300
MDEV-8410: Changing file-key-management to example-key-management causes crash and no real error
MDEV-8409: Changing file-key-management-encryption-algorithm causes crash and no real info why
Analysis: Both bugs has two different error cases. Firstly, at startup
when server reads latest checkpoint but requested key_version,
key management plugin or encryption algorithm or method is not found
leading corrupted log entry. Secondly, similarly when reading system
tablespace if requested key_version, key management plugin or encryption
algorithm or method is not found leading buffer pool page corruption.
Fix: Firsly, when reading checkpoint at startup check if the log record
may be encrypted and if we find that it could be encrypted, print error
message and do not start server. Secondly, if page is buffer pool seems
corrupted but we find out that there is crypt_info, print additional
error message before asserting.
Instead, now it returns an error:
BROKEN: block: 3190 checkpoint: 8 3115bc92 c8f50b10
BROKEN: block: 3190 checkpoint: 8 3115bc92 c8f50b10
InnoDB: Log block no 3190 at lsn 1632768 has
InnoDB: ok header, but checksum field contains 3371502352, should be 823508114
2015-08-11 2:15:12 140041614554976 [ERROR] InnoDB: Redo log crypto: failed to decrypt log block. Reason could be that requested key version is not found, required encryption key management plugin is not found or configured encryption algorithm and/or method does not match.
2015-08-11 2:15:12 140041614554976 [ERROR] Plugin 'InnoDB' init function returned error.
2015-08-11 2:15:12 140041614554976 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.