Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.1(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL)
-
None
Description
Start server with
--plugin-load-add=file_key_management --plugin-load-add=example_key_management --innodb-encrypt-tables --innodb-encryption-threads=1
|
otherwise defaults.
Doesn't matter whether file-key-management-filename is provided or not.
Error log after startup |
2016-04-19 20:38:43 139999079106432 [ERROR] Plugin 'file_key_management' registration as a ENCRYPTION failed.
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Using mutexes to ref count buffer pool pages
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: The InnoDB memory heap is disabled
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Memory barrier is not used
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Compressed tables use zlib 1.2.8
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Using Linux native AIO
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Using generic crc32 instructions
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Initializing buffer pool, size = 128.0M
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Completed initialization of buffer pool
|
2016-04-19 20:38:43 139999079106432 [Note] InnoDB: Highest supported file format is Barracuda.
|
2016-04-19 20:38:45 139999079106432 [Note] InnoDB: 128 rollback segment(s) are active.
|
2016-04-19 20:38:45 139999079106432 [Note] InnoDB: Waiting for purge to start
|
2016-04-19 20:38:45 139999079106432 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616819
|
2016-04-19 20:38:45 139999079106432 [Note] InnoDB: Creating #1 thread id 139998336632576 total threads 1.
|
2016-04-19 20:38:45 139998361810688 [Note] InnoDB: Dumping buffer pool(s) not yet started
|
2016-04-19 20:38:45 139999079106432 [Note] Plugin 'FEEDBACK' is disabled.
|
2016-04-19 20:38:45 139999079106432 [Note] Server socket created on IP: '::'.
|
2016-04-19 20:38:45 139999079106432 [Note] /bld/10.1/bin/mysqld: ready for connections.
|
Version: '10.1.13-MariaDB-debug' socket: '/bld/10.1/data/tmp/mysql.sock' port: 3306 Source distribution
|
Run
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; |
Stack trace from 10.1 commit 1cf852d874b0e82ebfa3854300abaacd04d3eb01 |
2016-04-19 20:31:09 139814445774592 [ERROR] InnoDB: Used key_id 1 can't be found from key file.
|
2016-04-19 20:31:09 7f29165ff700 InnoDB: Assertion failure in thread 139814445774592 in file fil0crypt.cc line 994
|
InnoDB: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
|
|
#5 0x00007f2940b0e538 in abort () from /lib64/libc.so.6
|
#6 0x000056211447fa76 in fil_crypt_get_key_state (new_state=0x7f29165fee00) at /src/10.1/storage/xtradb/fil/fil0crypt.cc:994
|
#7 0x00005621144803e4 in fil_crypt_space_needs_rotation (state=0x7f29165fee10, key_state=0x7f29165fee00, recheck=0x7f29165fedeb) at /src/10.1/storage/xtradb/fil/fil0crypt.cc:1339
|
#8 0x0000562114480a61 in fil_crypt_find_space_to_rotate (key_state=0x7f29165fee00, state=0x7f29165fee10, recheck=0x7f29165fedeb) at /src/10.1/storage/xtradb/fil/fil0crypt.cc:1587
|
#9 0x00005621144820a5 in fil_crypt_thread (arg=0x0) at /src/10.1/storage/xtradb/fil/fil0crypt.cc:2260
|
#10 0x00007f2942a4f0a4 in start_thread () from /lib64/libpthread.so.0
|
#11 0x00007f2940bbd04d in clone () from /lib64/libc.so.6
|
Attachments
Issue Links
- relates to
-
MDEV-9909 Enable plugins for MTR
-
- Closed
-
-
MDEV-12863 No table can be created after second encryption plugin attempted to load
-
- Closed
-
-
MDEV-28280 Multiple key management plugins refuse to load with generic error
-
- Open
-
Another case when the failure happens is if upon mariabackup prepare a key management plugin cannot be loaded on whatever reason. E.g. with file key management:
--source include/have_innodb.inc
--exec echo "1;0123456789012345678901234567890A" > $MYSQL_TMP_DIR/mykeys.txt
--let $restart_parameters= --plugin-load-add=file_key_management --file-key-management-filename=$MYSQL_TMP_DIR/mykeys.txt
--source include/restart_mysqld.inc
--exec $XTRABACKUP --backup -uroot --protocol=tcp --port=$MASTER_MYPORT --target-dir=$MYSQL_TMP_DIR/bk
--remove_file $MYSQL_TMP_DIR/mykeys.txt
--exec $XTRABACKUP --prepare --target-dir=$MYSQL_TMP_DIR/bk
# Cleanup
10.5 cfdb6212
2022-04-11 00:25:10 0x7fba02efb700 InnoDB: Assertion failure in file /data/src/10.5/storage/innobase/fil/fil0crypt.cc line 549
InnoDB: Failing assertion: key_version != ENCRYPTION_KEY_VERSION_INVALID
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
220411 0:25:10 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.5.16-MariaDB-debug
key_buffer_size=0
read_buffer_size=131072
max_used_connections=0
max_threads=1
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 6154 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
/mnt8t/bld/10.5-debug-nightly/bin/mariabackup(my_print_stacktrace+0x40)[0x5651d504f404]
mysys/stacktrace.c:212(my_print_stacktrace)[0x5651d48096de]
sigaction.c:0(__restore_rt)[0x7fba044c8140]
linux/raise.c:51(__GI_raise)[0x7fba03ff7ce1]
stdlib/abort.c:81(__GI_abort)[0x7fba03fe1537]
ut/ut0mem.cc:45(ut_str3cat(char const*, char const*, char const*)::{lambda()#1}::operator()() const)[0x5651d4ef0792]
fil/fil0crypt.cc:552(fil_encrypt_buf_for_full_crc32(fil_space_crypt_t*, unsigned long, unsigned long, unsigned long, unsigned char const*, unsigned char*))[0x5651d4c169ba]
fil/fil0crypt.cc:598(fil_encrypt_buf(fil_space_crypt_t*, unsigned long, unsigned long, unsigned char const*, unsigned long, unsigned char*, bool))[0x5651d4c16bcb]
fil/fil0crypt.cc:649(fil_space_encrypt(fil_space_t const*, unsigned long, unsigned char*, unsigned char*))[0x5651d4c16d97]
buf/buf0flu.cc:723(buf_page_encrypt(fil_space_t*, buf_page_t*, unsigned char*, unsigned long*))[0x5651d4baa384]
buf/buf0flu.cc:918(buf_flush_page(buf_page_t*, bool, fil_space_t*))[0x5651d4bab2a0]
buf/buf0flu.cc:1519(buf_do_flush_list_batch(unsigned long, unsigned long))[0x5651d4bade2a]
buf/buf0flu.cc:1595(buf_flush_list(unsigned long, unsigned long))[0x5651d4bae39c]
buf/buf0flu.cc:2385(buf_flush_page_cleaner(void*))[0x5651d4bb1b0f]
nptl/pthread_create.c:478(start_thread)[0x7fba044bcea7]
x86_64/clone.S:97(__GI___clone)[0x7fba040b9def]
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /dev/shm/var_auto_JT0M/tmp/bk
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 385901 385901 processes
Max open files 1024 1024 files
Max locked memory 12659513856 12659513856 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 385901 385901 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: core
Also happens with hashicorp plugin on 10.9.