- Create encrypted table using some keys
- Restart server with different keys and innodb-defragment=1
- optimize table (defragment table)
Stack:
hread pointer: 0x0x7f3388c63060
|
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 = 0x7f337c2bfe70 thread_stack 0x48000
|
mysys/stacktrace.c:246(my_print_stacktrace)[0x7f33854f6993]
|
sql/signal_handler.cc:162(handle_fatal_signal)[0x7f3384ea2098]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x7f338439a8d0]
|
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f33820ef107]
|
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f33820f04e8]
|
include/btr0btr.ic:124(btr_page_get_level_low)[0x7f3385290787]
|
btr/btr0defragment.cc:221(btr_defragment_add_index(dict_index_t*, bool))[0x7f33852917a2]
|
handler/ha_innodb.cc:12703(ha_innobase::defragment_table(char const*, char const*, bool))[0x7f33850b310c]
|
handler/ha_innodb.cc:13920(ha_innobase::optimize(THD*, st_ha_check_opt*))[0x7f33850b54eb]
|
sql/handler.cc:4067(handler::ha_optimize(THD*, st_ha_check_opt*))[0x7f3384eac0c3]
|
sql/sql_admin.cc:750(mysql_admin_table)[0x7f3384db4e99]
|
sql/sql_admin.cc:1246(Sql_cmd_optimize_table::execute(THD*))[0x7f3384db6c2a]
|
sql/sql_parse.cc:5611(mysql_execute_command(THD*))[0x7f3384c7f35d]
|
sql/sql_parse.cc:7214(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x7f3384c83471]
|
sql/sql_parse.cc:1477(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f3384c7246f]
|
sql/sql_parse.cc:1097(do_command(THD*))[0x7f3384c711a5]
|
sql/sql_connect.cc:1350(do_handle_one_connection(THD*))[0x7f3384da3b98]
|
sql/sql_connect.cc:1263(handle_one_connection)[0x7f3384da38fc]
|
perfschema/pfs.cc:1862(pfs_spawn_thread)[0x7f33850859d8]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x80a4)[0x7f33843930a4]
|
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f33821a004d]
|
Test case:
--source include/have_innodb.inc
|
# embedded does not support restart
|
-- source include/not_embedded.inc
|
-- source include/not_valgrind.inc
|
# Avoid CrashReporter popup on Mac
|
-- source include/not_crashrep.inc
|
#
|
# MDEV-8750: Server crashes in page_cur_is_after_last on altering table using a wrong encryption key
|
#
|
call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted");
|
call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match.");
|
call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file.");
|
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
|
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
|
# Suppression for builds where file_key_management plugin is linked statically
|
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--shutdown_server
|
--source include/wait_until_disconnected.inc
|
|
--write_file $MYSQLTEST_VARDIR/keys1.txt
|
1;770A8A65DA156D24EE2A093277530142
|
4;770A8A65DA156D24EE2A093277530143
|
EOF
|
|
--exec echo "restart:--innodb-encrypt-tables --innodb-defragment=1 --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--enable_reconnect
|
--source include/wait_until_connected_again.inc
|
|
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
|
--let $MYSQLD_DATADIR = `SELECT @@datadir`
|
|
--disable_query_log
|
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
--enable_query_log
|
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
SET GLOBAL innodb_file_per_table = ON;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
|
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--shutdown_server
|
--source include/wait_until_disconnected.inc
|
|
--write_file $MYSQLTEST_VARDIR/keys2.txt
|
1;770A8A65DA156D24EE2A093277530142
|
4;770A8A65DA156D24EE2A093277530144
|
EOF
|
|
--exec echo "restart:--innodb-encrypt-tables --innodb-defragment=1 --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--enable_reconnect
|
--source include/wait_until_connected_again.inc
|
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
SET GLOBAL innodb_file_per_table = ON;
|
|
OPTIMIZE TABLE t1;
|
|
--remove_file $MYSQLTEST_VARDIR/keys1.txt
|
--remove_file $MYSQLTEST_VARDIR/keys2.txt
|
|
# reset system
|
--disable_query_log
|
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
--enable_query_log
|
{"report":{"fcp":1767.2000002861023,"ttfb":710.1000003814697,"pageVisibility":"visible","entityId":53013,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ca629c8a-0181-46b5-8226-ceaad477cb2b","navigationType":0,"readyForUser":1866.8000001907349,"redirectCount":0,"resourceLoadedEnd":2048.6000003814697,"resourceLoadedStart":716.9000000953674,"resourceTiming":[{"duration":554.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":716.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":716.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1271.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":554.0999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":717.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":717.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1272,"responseStart":0,"secureConnectionStart":0},{"duration":566.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":718.1000003814697,"connectEnd":718.1000003814697,"connectStart":718.1000003814697,"domainLookupEnd":718.1000003814697,"domainLookupStart":718.1000003814697,"fetchStart":718.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":718.1000003814697,"responseEnd":1284.4000000953674,"responseStart":1284.4000000953674,"secureConnectionStart":718.1000003814697},{"duration":628.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":718.3000001907349,"connectEnd":718.3000001907349,"connectStart":718.3000001907349,"domainLookupEnd":718.3000001907349,"domainLookupStart":718.3000001907349,"fetchStart":718.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":718.3000001907349,"responseEnd":1346.7000002861023,"responseStart":1346.7000002861023,"secureConnectionStart":718.3000001907349},{"duration":632.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":718.5,"connectEnd":718.5,"connectStart":718.5,"domainLookupEnd":718.5,"domainLookupStart":718.5,"fetchStart":718.5,"redirectEnd":0,"redirectStart":0,"requestStart":718.5,"responseEnd":1350.7000002861023,"responseStart":1350.7000002861023,"secureConnectionStart":718.5},{"duration":632.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":718.7000002861023,"connectEnd":718.7000002861023,"connectStart":718.7000002861023,"domainLookupEnd":718.7000002861023,"domainLookupStart":718.7000002861023,"fetchStart":718.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":718.7000002861023,"responseEnd":1351.3000001907349,"responseStart":1351.3000001907349,"secureConnectionStart":718.7000002861023},{"duration":632.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":718.8000001907349,"connectEnd":718.8000001907349,"connectStart":718.8000001907349,"domainLookupEnd":718.8000001907349,"domainLookupStart":718.8000001907349,"fetchStart":718.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":718.8000001907349,"responseEnd":1351.6000003814697,"responseStart":1351.6000003814697,"secureConnectionStart":718.8000001907349},{"duration":716.1000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":719,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":719,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1435.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":632.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":719.2000002861023,"connectEnd":719.2000002861023,"connectStart":719.2000002861023,"domainLookupEnd":719.2000002861023,"domainLookupStart":719.2000002861023,"fetchStart":719.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":719.2000002861023,"responseEnd":1352.1000003814697,"responseStart":1352.1000003814697,"secureConnectionStart":719.2000002861023},{"duration":715.9000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":719.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":719.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1435.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":633.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":719.5,"connectEnd":719.5,"connectStart":719.5,"domainLookupEnd":719.5,"domainLookupStart":719.5,"fetchStart":719.5,"redirectEnd":0,"redirectStart":0,"requestStart":719.5,"responseEnd":1352.6000003814697,"responseStart":1352.6000003814697,"secureConnectionStart":719.5},{"duration":1024.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":728.6000003814697,"connectEnd":728.6000003814697,"connectStart":728.6000003814697,"domainLookupEnd":728.6000003814697,"domainLookupStart":728.6000003814697,"fetchStart":728.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":728.6000003814697,"responseEnd":1752.7000002861023,"responseStart":1752.7000002861023,"secureConnectionStart":728.6000003814697},{"duration":1319.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":728.7000002861023,"connectEnd":728.7000002861023,"connectStart":728.7000002861023,"domainLookupEnd":728.7000002861023,"domainLookupStart":728.7000002861023,"fetchStart":728.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":728.7000002861023,"responseEnd":2048.6000003814697,"responseStart":2048.6000003814697,"secureConnectionStart":728.7000002861023},{"duration":306.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1449,"connectEnd":1449,"connectStart":1449,"domainLookupEnd":1449,"domainLookupStart":1449,"fetchStart":1449,"redirectEnd":0,"redirectStart":0,"requestStart":1449,"responseEnd":1755.3000001907349,"responseStart":1755.3000001907349,"secureConnectionStart":1449}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":163,"responseStart":710,"responseEnd":726,"domLoading":715,"domInteractive":2112,"domContentLoadedEventStart":2112,"domContentLoadedEventEnd":2174,"domComplete":2774,"loadEventStart":2774,"loadEventEnd":2775,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2053.1000003814697},{"name":"bigPipe.sidebar-id.end","time":2054.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":2054.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":2055.4000000953674},{"name":"activityTabFullyLoaded","time":2187.4000000953674}],"measures":[],"correlationId":"ec92e14892580f","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":9,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
commit ddaddf1019f07f00ba419988f69f8cb9ebd3e169
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Mon Sep 14 12:15:27 2015 +0300
MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keysAdd error handling when getting block from encrypted table and decryption
fails.