Details
-
Type:
Bug
-
Status: Stalled
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.1.4
-
Fix Version/s: 10.1
-
Component/s: Encryption, Storage Engine - InnoDB, Storage Engine - XtraDB
-
Labels:
Description
Let below test crash at least once, after that crash recovery will fail always to this same asertion.
# 2015-05-18T15:12:27 [8106] | 2015-05-18 15:08:27 7f9b20234780 InnoDB: Assertion failure in thread 140304235841408 in file fil0crypt.cc line 771 # 2015-05-18T15:12:27 [8106] | InnoDB: Failing assertion: crypt_data->type == 1 # 2015-05-18T15:12:27 [8106] | InnoDB: We intentionally generate a memory trap. # 2015-05-18T15:12:27 [8106] | InnoDB: Submit a detailed bug report to http://bugs.mysql.com. # 2015-05-18T15:12:27 [8106] | InnoDB: If you get repeated assertion failures or crashes, even # 2015-05-18T15:12:27 [8106] | InnoDB: immediately after the mysqld startup, there may be # 2015-05-18T15:12:27 [8106] | InnoDB: corruption in the InnoDB tablespace. Please refer to # 2015-05-18T15:12:27 [8106] | InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html # 2015-05-18T15:12:27 [8106] | InnoDB: about forcing recovery. # 2015-05-18T15:12:27 [8106] | 150518 15:08:27 [ERROR] mysqld got signal 6 ; # 2015-05-18T15:12:27 [8106] | This could be because you hit a bug. It is also possible that this binary # 2015-05-18T15:12:27 [8106] | or one of the libraries it was linked against is corrupt, improperly built, # 2015-05-18T15:12:27 [8106] | or misconfigured. This error can also be caused by malfunctioning hardware. # 2015-05-18T15:12:27 [8106] | # 2015-05-18T15:12:27 [8106] | To report this bug, see http://kb.askmonty.org/en/reporting-bugs # 2015-05-18T15:12:27 [8106] | # 2015-05-18T15:12:27 [8106] | We will try our best to scrape up some info that will hopefully help # 2015-05-18T15:12:27 [8106] | diagnose the problem, but since we have already crashed, # 2015-05-18T15:12:27 [8106] | something is definitely wrong and this may fail. # 2015-05-18T15:12:27 [8106] | # 2015-05-18T15:12:27 [8106] | Server version: 10.1.5-MariaDB-wsrep-debug-log # 2015-05-18T15:12:27 [8106] | key_buffer_size=134217728 # 2015-05-18T15:12:27 [8106] | read_buffer_size=131072 # 2015-05-18T15:12:27 [8106] | max_used_connections=0 # 2015-05-18T15:12:27 [8106] | max_threads=153 # 2015-05-18T15:12:28 [8106] | thread_count=0 # 2015-05-18T15:12:28 [8106] | It is possible that mysqld could use up to # 2015-05-18T15:12:28 [8106] | key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467322 K bytes of memory # 2015-05-18T15:12:28 [8106] | Hope that's ok; if not, decrease some variables in the equation. # 2015-05-18T15:12:28 [8106] | # 2015-05-18T15:12:28 [8106] | Thread pointer: 0x0x0 # 2015-05-18T15:12:28 [8106] | Attempting backtrace. You can use the following information to find out # 2015-05-18T15:12:28 [8106] | where mysqld died. If you see no messages after this, something went # 2015-05-18T15:12:28 [8106] | terribly wrong... # 2015-05-18T15:12:28 [8106] | stack_bottom = 0x0 thread_stack 0x48000 # 2015-05-18T15:12:28 [8106] | mysys/stacktrace.c:246(my_print_stacktrace)[0x7f9b20f9301c] # 2015-05-18T15:12:28 [8106] | sql/signal_handler.cc:155(handle_fatal_signal)[0x7f9b20940075] # 2015-05-18T15:12:28 [8106] | /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f9b1e759340] # 2015-05-18T15:12:28 [8106] | /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7f9b1ddb0cc9] # 2015-05-18T15:12:28 [8106] | /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f9b1ddb40d8] # 2015-05-18T15:12:28 [8106] | fil/fil0crypt.cc:775(fil_space_decrypt(fil_space_crypt_struct*, unsigned char const*, unsigned long, unsigned char*))[0x7f9b20eeb5dc] # 2015-05-18T15:12:28 [8106] | fil/fil0crypt.cc:846(fil_space_decrypt(unsigned long, unsigned char const*, unsigned long, unsigned char*))[0x7f9b20eeb7f0] # 2015-05-18T15:12:28 [8106] | buf/buf0buf.cc:6038(buf_page_decrypt_after_read(buf_page_t*))[0x7f9b20e745ce] # 2015-05-18T15:12:28 [8106] | buf/buf0buf.cc:4323(buf_page_io_complete(buf_page_t*))[0x7f9b20e70b0e] # 2015-05-18T15:12:28 [8106] | buf/buf0rea.cc:261(buf_read_page_low(dberr_t*, bool, unsigned long, unsigned long, unsigned long, unsigned long, long, unsigned long, trx_t*))[0x7f9b20e8e953] # 2015-05-18T15:12:28 [8106] | buf/buf0rea.cc:465(buf_read_page(unsigned long, unsigned long, unsigned long, trx_t*))[0x7f9b20e8ed95] # 2015-05-18T15:12:28 [8106] | buf/buf0buf.cc:2789(buf_page_get_gen(unsigned long, unsigned long, unsigned long, unsigned long, buf_block_t*, unsigned long, char const*, unsigned long, mtr_t*))[0x7f9b20e6d1bc] # 2015-05-18T15:12:28 [8106] | dict/dict0boot.cc:56(dict_hdr_get(mtr_t*))[0x7f9b20e95e7c] # 2015-05-18T15:12:28 [8106] | dict/dict0boot.cc:286(dict_boot())[0x7f9b20e964d2] # 2015-05-18T15:12:28 [8106] | srv/srv0start.cc:2543(innobase_start_or_create_for_mysql())[0x7f9b20dddd5d] # 2015-05-18T15:12:28 [8106] | handler/ha_innodb.cc:4107(innobase_init)[0x7f9b20c76dd9] # 2015-05-18T15:12:28 [8106] | sql/handler.cc:512(ha_initialize_handlerton(st_plugin_int*))[0x7f9b20941fde] # 2015-05-18T15:12:28 [8106] | sql/sql_plugin.cc:1403(plugin_initialize)[0x7f9b2072ca24] # 2015-05-18T15:12:28 [8106] | sql/sql_plugin.cc:1675(plugin_init(int*, char**, int))[0x7f9b2072d5e7] # 2015-05-18T15:12:28 [8106] | sql/mysqld.cc:5039(init_server_components)[0x7f9b2064fa1e] # 2015-05-18T15:12:28 [8106] | sql/mysqld.cc:5631(mysqld_main(int, char**))[0x7f9b20650b52] # 2015-05-18T15:12:28 [8106] | sql/main.cc:26(main)[0x7f9b20646895] # 2015-05-18T15:12:28 [8106] | /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f9b1dd9bec5] # 2015-05-18T15:12:28 [8106] | /home/jan/mysql/10.1-encryption/sql/mysqld(+0x3d5788)[0x7f9b20646788] # 2015-05-18T15:12:28 [8106] | The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains # 2015-05-18T15:12:28 [8106] | information that should help you find out what is causing the crash. # 2015-05-18T15:12:28 [8106] | Writing a core file # 2015-05-18T15:12:28 [8106] | Aborted (core dumped)
query:
INSERT IGNORE INTO _table ( _field ) VALUES ( _digit ), ( _digit ), ( _digit ), ( _digit ) |
DELETE FROM _table WHERE `pk` > _digit LIMIT 4 ;
thread2:
set_encrypt_option |
create_or_replace;
set_encrypt_option:
SET GLOBAL innodb_encrypt_tables = enc_tables |
SET GLOBAL innodb_encryption_threads = _digit |
SET GLOBAL innodb_scrub_log_speed = _smallint_unsigned
;
encrypt_on_off:
ON | OFF ;
enc_tables:
ON | OFF | 'FORCE' ;
create_or_replace:
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM _table ;
RQG data template enc2.zz
$tables = {
rows => [0, 1, 10 ],
pk => [ 'int auto_increment' ]
};
$fields = {
types => [ 'int' ],
indexes => [ 'key', undef ]
};
$data = {
numbers => [ 'digit', 'null', undef ],
strings => [ 'letter', 'english' ],
blobs => [ 'data' ],
temporals => ['date', 'year', 'null', undef ]
}
RQG command line (use lp:~elenst/randgen/mariadb-patches):
perl ./runall-new.pl --threads=2 --duration=400 --queries=100M --mysqld=--plugin-load-add=file_key_management.so --mysqld=--file_key_management_filename=<your basedir>/mysql-test/std_data/keys.txt --grammar=enc2.yy --gendata=enc2.zz --mtr-build-thread=73 --basedir1=<your basedir> --vardir1=<your vardir>
See MDEV-8171 for instructions how to run the same test several times.
Gliffy Diagrams
Attachments
Issue Links
- blocks
-
MDEV-8172 Intermittent InnoDB: Failing assertion: crypt_data and InnoDB: Failing assertion: mutex->magic_n == MUTEX_MAGIC_N
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
No need for crash recovery. mtr test case:
# # MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1 # SET GLOBAL innodb_encryption_threads = 4; CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3); CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb; CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL); INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 ); INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); --connect (con1,localhost,root,,test) --connect (con2,localhost,root,,test) --disable_abort_on_error --disable_warnings let $i = 2000; while ($i) { connection con1; send SET GLOBAL innodb_encrypt_tables = ON; connection default; CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; connection con2; send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; connection default; send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`; connection con1; --reap; send SET GLOBAL innodb_encrypt_tables = OFF; connection con2; --reap; connection default; --reap; send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; connection con2; send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; connection con1; --reap; send SET GLOBAL innodb_encrypt_tables = FORCE; connection default; --reap; send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; connection con2; --reap; CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`; connection con1; --reap; connection default; --reap; Sdec $i; } connection default; drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc; --disconnect con1; --disconnect con2; --enable_abort_on_error --enable_warnings SET GLOBAL innodb_encryption_threads = 0;stack: