This was original opened against Columnstore using build 1.2.5. CS Eng reported it was a crash in InnoDB. May need to be an MDEV ticket. So opening this ticket from MCOL-3740.
Customer reporting that everytime they do a systemShutdown, the mysqld_safe and mysql still show to be running after shutdown is completed.
I worked with them to just try running the below commands to see what happens when nothing else of going on, and it still crashed
/usr/local/mariadb/columnstore/mysql/mysql-Columnstore start
|
/usr/local/mariadb/columnstore/mysql/mysql-Columnstore stop
|
/usr/local/mariadb/columnstore/mysql/mysql-Columnstore status
|
Log files always shows the same thing,
Event Scheduler: Purging the queue. 21 events
|
200123 13:48:41 [ERROR] mysqld got signal 11 ;
|
|
/usr/local/mariadb/columnstore/mysql//bin/mysqld (initiated by: unknown): Normal shutdown
|
2020-01-23 13:48:41 0 [Note] Event Scheduler: Killing the scheduler thread, thread id 6
|
2020-01-23 13:48:41 0 [Note] Event Scheduler: Waiting for the scheduler thread to reply
|
2020-01-23 13:48:41 0 [Note] Event Scheduler: Stopped
|
2020-01-23 13:48:41 0 [Note] Event Scheduler: Purging the queue. 21 events
|
200123 13:48:41 [ERROR] mysqld got signal 11 ;
|
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.3.16-MariaDB-log
|
key_buffer_size=536870912
|
read_buffer_size=4194304
|
max_used_connections=0
|
max_threads=65537
|
thread_count=7
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 537414652 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 0x80000
|
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x55b20cbe6279]
|
mysys/stacktrace.c:270(my_print_stacktrace)[0x55b20c71eb6f]
|
sigaction.c:0(__restore_rt)[0x7f9c220485d0]
|
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0xa1632a)[0x55b20c9eb32a]
|
btr/btr0cur.cc:1375(btr_cur_search_to_nth_level_func(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, rw_lock_t*, char const*, unsigned int, mtr_t*, unsigned long))[0x55b20c9631ae]
|
include/btr0pcur.ic:511(btr_pcur_open_with_no_init_func)[0x55b20c9696fd]
|
row/row0sel.cc:1681(row_sel(sel_node_t*, que_thr_t*))[0x55b20c96b17b]
|
row/row0sel.cc:2347(row_sel_step(que_thr_t*))[0x55b20c92007b]
|
que/que0que.cc:1018(que_thr_step)[0x55b20caa5695]
|
fts/fts0sql.cc:221(fts_eval_sql(trx_t*, que_fork_t*))[0x55b20ca8f5f4]
|
fts/fts0fts.cc:2684(fts_cmp_set_sync_doc_id(dict_table_t const*, unsigned long, unsigned long, unsigned long*))[0x55b20ca8f8dc]
|
fts/fts0fts.cc:4193(fts_sync_commit(fts_sync_t*))[0x55b20ca92fca]
|
fts/fts0fts.cc:4391(fts_sync(fts_sync_t*, bool, bool, bool) [clone .part.105])[0x55b20ca96942]
|
fts/fts0opt.cc:2782(fts_optimize_sync_table(unsigned long))[0x55b20ca9c785]
|
pthread_create.c:0(start_thread)[0x7f9c22040dd5]
|
/lib64/libc.so.6(clone+0x6d)[0x7f9c1ffecead]
|
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
|
information that should help you find out what is causing the crash.
|
Writing a core file...
|
Working directory at /usr/local/mariadb/columnstore/mysql/db
|
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 982518 982518 processes
|
Max open files 65535 65535 files
|
Max locked memory 65536 65536 bytes
|
Max address space unlimited unlimited bytes
|
Max file locks unlimited unlimited locks
|
Max pending signals 982518 982518 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
|
------------------------
From customer
There are 21 events in the mysql.event table that are enabled
i tried turning off event scheduler but that didn't help still crashed on shutdown
{"report":{"fcp":1428.2000000476837,"ttfb":486.90000009536743,"pageVisibility":"visible","entityId":82640,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"1fbc7f48-5e7d-4bc7-ae32-a05c8b2390af","navigationType":0,"readyForUser":1551.4000000953674,"redirectCount":0,"resourceLoadedEnd":1673.0999999046326,"resourceLoadedStart":492.2000000476837,"resourceTiming":[{"duration":343.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":492.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":492.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":835.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":343.69999980926514,"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":492.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":492.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":836.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":407.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":492.59999990463257,"connectEnd":492.59999990463257,"connectStart":492.59999990463257,"domainLookupEnd":492.59999990463257,"domainLookupStart":492.59999990463257,"fetchStart":492.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":492.59999990463257,"responseEnd":900.2999999523163,"responseStart":900.2999999523163,"secureConnectionStart":492.59999990463257},{"duration":533.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":492.7999999523163,"connectEnd":492.7999999523163,"connectStart":492.7999999523163,"domainLookupEnd":492.7999999523163,"domainLookupStart":492.7999999523163,"fetchStart":492.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":492.7999999523163,"responseEnd":1026.2000000476837,"responseStart":1026.2000000476837,"secureConnectionStart":492.7999999523163},{"duration":537.5,"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":493,"connectEnd":493,"connectStart":493,"domainLookupEnd":493,"domainLookupStart":493,"fetchStart":493,"redirectEnd":0,"redirectStart":0,"requestStart":493,"responseEnd":1030.5,"responseStart":1030.5,"secureConnectionStart":493},{"duration":538.1000001430511,"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":493.2999999523163,"connectEnd":493.2999999523163,"connectStart":493.2999999523163,"domainLookupEnd":493.2999999523163,"domainLookupStart":493.2999999523163,"fetchStart":493.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":493.2999999523163,"responseEnd":1031.4000000953674,"responseStart":1031.4000000953674,"secureConnectionStart":493.2999999523163},{"duration":538.2999999523163,"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":493.40000009536743,"connectEnd":493.40000009536743,"connectStart":493.40000009536743,"domainLookupEnd":493.40000009536743,"domainLookupStart":493.40000009536743,"fetchStart":493.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":493.40000009536743,"responseEnd":1031.7000000476837,"responseStart":1031.7000000476837,"secureConnectionStart":493.40000009536743},{"duration":555,"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":493.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":493.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1048.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":538.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":493.7999999523163,"connectEnd":493.7999999523163,"connectStart":493.7999999523163,"domainLookupEnd":493.7999999523163,"domainLookupStart":493.7999999523163,"fetchStart":493.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":493.7999999523163,"responseEnd":1032.2000000476837,"responseStart":1032.2000000476837,"secureConnectionStart":493.7999999523163},{"duration":554.8999998569489,"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":493.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":493.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1048.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":538.7000000476837,"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":494.09999990463257,"connectEnd":494.09999990463257,"connectStart":494.09999990463257,"domainLookupEnd":494.09999990463257,"domainLookupStart":494.09999990463257,"fetchStart":494.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":494.09999990463257,"responseEnd":1032.7999999523163,"responseStart":1032.7999999523163,"secureConnectionStart":494.09999990463257},{"duration":1117.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":500.2000000476837,"connectEnd":500.2000000476837,"connectStart":500.2000000476837,"domainLookupEnd":500.2000000476837,"domainLookupStart":500.2000000476837,"fetchStart":500.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":500.2000000476837,"responseEnd":1617.2999999523163,"responseStart":1617.2999999523163,"secureConnectionStart":500.2000000476837},{"duration":1117.7999999523163,"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":500.7999999523163,"connectEnd":500.7999999523163,"connectStart":500.7999999523163,"domainLookupEnd":500.7999999523163,"domainLookupStart":500.7999999523163,"fetchStart":500.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":500.7999999523163,"responseEnd":1618.5999999046326,"responseStart":1618.5999999046326,"secureConnectionStart":500.7999999523163},{"duration":334.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1061.5999999046326,"connectEnd":1061.5999999046326,"connectStart":1061.5999999046326,"domainLookupEnd":1061.5999999046326,"domainLookupStart":1061.5999999046326,"fetchStart":1061.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1061.5999999046326,"responseEnd":1396.2000000476837,"responseStart":1396.2000000476837,"secureConnectionStart":1061.5999999046326},{"duration":279.09999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1420.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1420.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1699.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":230.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-jira.view.issue,-jira.navigator.kickass,-viewissue.standalone,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1442.9000000953674,"connectEnd":1442.9000000953674,"connectStart":1442.9000000953674,"domainLookupEnd":1442.9000000953674,"domainLookupStart":1442.9000000953674,"fetchStart":1442.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1442.9000000953674,"responseEnd":1673.0999999046326,"responseStart":1673.0999999046326,"secureConnectionStart":1442.9000000953674}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":307,"responseStart":487,"responseEnd":500,"domLoading":491,"domInteractive":1758,"domContentLoadedEventStart":1758,"domContentLoadedEventEnd":1810,"domComplete":2324,"loadEventStart":2324,"loadEventEnd":2324,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1705.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1706.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1707},{"name":"bigPipe.activity-panel-pipe-id.end","time":1710.4000000953674},{"name":"activityTabFullyLoaded","time":1825.5999999046326}],"measures":[],"correlationId":"2fb16ecbeabf13","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The following test case does crash during shutdown :
--source include/have_innodb.inc
let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
let $MYSQLD_DATADIR = `SELECT @@datadir`;
create table t1(f1 int not null, f2 varchar(100),
fulltext idx(f2))engine=innodb;
set debug_dbug="+d,fts_instrument_sync_request";
insert into t1 values(1, "mariadb");
alter table t1 discard tablespace;
--source include/restart_mysqld.inc
drop table t1;
The following patch solves the issue:
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index c9cab91cb1f..22628acd166 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -3140,6 +3140,16 @@ row_discard_tablespace_for_mysql(
err = DB_ERROR;
} else {
+ bool fts_exist =(dict_table_has_fts_index(table)
+ || DICT_TF2_FLAG_IS_SET(
+ table, DICT_TF2_FTS_HAS_DOC_ID));
+
+ if (fts_exist) {
+ row_mysql_unlock_data_dictionary(trx);
+ fts_optimize_remove_table(table);
+ row_mysql_lock_data_dictionary(trx);
+ }
+
ut_ad(!table->n_foreign_key_checks_running);
/* Do foreign key constraint checks. */
@@ -3149,6 +3159,10 @@ row_discard_tablespace_for_mysql(
if (err == DB_SUCCESS) {
err = row_discard_tablespace(trx, table);
}
+
+ if (fts_exist && err != DB_SUCCESS) {
+ fts_optimize_add_table(table);
+ }
}
return(row_discard_tablespace_end(trx, table, err));
Problem is that, while discarding the fts tablespace, InnoDB fails to remove the table from fts_optimize_wq. This patch does remove the table from fts_optimize_wq.