MariaDB [test]> insert into t(cid, d, c) values (1, '2018-01-01', 20000.05);
Query OK, 1 row affected (0,056 sec)
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 1 row affected (0,051 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 2 rows affected (0,040 sec)
Records: 2 Duplicates: 0 Warnings: 0
...
\MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 32768 rows affected (0,794 sec)
Records: 32768 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 65536 rows affected (1,400 sec)
Records: 65536 Duplicates: 0 Warnings: 0
MariaDB [test]> select count(*) from t;
+----------+
| count(*) |
+----------+
| 131072 |
+----------+
1 row in set (0,070 sec)
MariaDB [test]> select distinct cid, week(d) as week, max(c) over (partition by cid, week(d)) as c_mx, sum(c) over (partition by cid, week(d)) as c_sum, count(c) over (partition by cid, week(d)) as c_cnt, max(week(d)) over (partition by year(d)) as w_max from t where year(d) = '2018';
ERROR 2013 (HY000): Lost connection to MySQL server during query
In the error log we see:
190810 13:58:35 [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=1
max_threads=153
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1781135 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f93740010b8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
Some pointers may be invalid and cause the dump to abort.
Query (0x7f93740136a8): is an invalid pointer
Connection ID (thread ID): 11
Status: NOT_KILLED
Valerii Kravchuk
added a comment - This is easily repeatable with InnoDB table on 10.3.16 (or ColumnStore 1.2.5-1 ):
openxs@ao756:~$ mcsmysql -uroot test
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.3.16-MariaDB-log Columnstore 1.2.5-1
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [test]> CREATE TABLE `t` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(11) DEFAULT NULL, `d` datetime DEFAULT NULL, `c` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB;
Query OK, 0 rows affected (0,243 sec)
MariaDB [test]> insert into t(cid, d, c) values (1, '2018-01-01', 20000.05);
Query OK, 1 row affected (0,056 sec)
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 1 row affected (0,051 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 2 rows affected (0,040 sec)
Records: 2 Duplicates: 0 Warnings: 0
...
\MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 32768 rows affected (0,794 sec)
Records: 32768 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 65536 rows affected (1,400 sec)
Records: 65536 Duplicates: 0 Warnings: 0
MariaDB [test]> select count(*) from t;
+----------+
| count(*) |
+----------+
| 131072 |
+----------+
1 row in set (0,070 sec)
MariaDB [test]> select distinct cid, week(d) as week, max(c) over (partition by cid, week(d)) as c_mx, sum(c) over (partition by cid, week(d)) as c_sum, count(c) over (partition by cid, week(d)) as c_cnt, max(week(d)) over (partition by year(d)) as w_max from t where year(d) = '2018';
ERROR 2013 (HY000): Lost connection to MySQL server during query
In the error log we see:
190810 13:58:35 [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=1
max_threads=153
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1781135 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f93740010b8
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 = 0x7f93c086fe98 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x563a83082259]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x307)[0x563a82bcbe57]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f93fb01c390]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x6997e7)[0x563a82b2e7e7]
sql/sql_window.cc:436(compare_order_elements)[0x563a82b31d06]
sql/sql_window.cc:588(compare_window_funcs_by_window_specs)[0x563a82a4c5e2]
sql/sql_select.cc:3342(JOIN::make_aggr_tables_info())[0x563a82a548f4]
sql/sql_select.cc:2637(JOIN::optimize_stage2())[0x563a82a5606a]
sql/sql_select.cc:1533(JOIN::optimize_inner())[0x563a82a5632f]
sql/sql_select.cc:1455(JOIN::optimize())[0x563a82a5835a]
sql/sql_select.cc:4514(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x563a82a58517]
sql/sql_select.cc:386(handle_select(THD*, LEX*, select_result*, unsigned long))[0x563a82a8d674]
sql/sql_table.cc:11114(Sql_cmd_create_table_like::execute(THD*))[0x563a82a0243f]
sql/sql_parse.cc:6064(mysql_execute_command(THD*))[0x563a82a08469]
sql/sql_parse.cc:7871(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x563a82a086a2]
sql/sql_class.h:2885(THD::set_row_count_func(long long))[0x563a82a0a037]
sql/sql_parse.cc:10666(idb_vtable_process(THD*, unsigned long long, Statement*))[0x563a82a0d139]
sql/sql_parse.cc:1875(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x563a82a0e9d0]
sql/sql_parse.cc:1425(do_command(THD*))[0x563a82ad6054]
sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x563a82ad61d4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f93fb0126ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f93fa4a741d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f93740136a8): is an invalid pointer
Connection ID (thread ID): 11
Status: NOT_KILLED
-> select distinct cid, week(d) as week, max(c) over (partition by cid, week(d)) as c_mx, sum(c) over (partition by cid, week(d)) as c_sum, count(c) over (partition by cid, week(d)) as c_cnt, max(week(d)) over (partition by year(d)) as w_max from t where year(d) = '2018';
Varun Gupta (Inactive)
added a comment - valerii I cannot reproduce it on 10.3.16
MariaDB [test]> select count(*) from t;
+----------+
| count(*) |
+----------+
| 131072 |
+----------+
1 row in set (1.751 sec)
MariaDB [test]> explain
-> select distinct cid, week(d) as week, max(c) over (partition by cid, week(d)) as c_mx, sum(c) over (partition by cid, week(d)) as c_sum, count(c) over (partition by cid, week(d)) as c_cnt, max(week(d)) over (partition by year(d)) as w_max from t where year(d) = '2018';
+------+-------------+-------+------+---------------+------+---------+------+--------+------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-------+------+---------------+------+---------+------+--------+------------------------------+
| 1 | SIMPLE | t | ALL | NULL | NULL | NULL | NULL | 131540 | Using where; Using temporary |
+------+-------------+-------+------+---------------+------+---------+------+--------+------------------------------+
1 row in set (0.004 sec)
I can easily reproduce it for InnoDB table on Columnstore 1.2.5 using MariaDB 10.3.16. However, it doesn't break on vanilla MariaDB 10.3.16. Bummer.
This breaks:
select avg(comm_total) over (partition by customer) as wk_comm_avg, max(week(trade_date)) over (partition by year(trade_date)) as max_week from book_entry_cs;
this does not break:
(remove the partition from first or function from partition of second)
select avg(comm_total) over () as wk_comm_avg, max(week(trade_date)) over (partition by year(trade_date)) as max_week from book_entry_cs;
--or--
select avg(comm_total) over (partition by customer) as wk_comm_avg, max(week(trade_date)) over (partition by trade_date) as max_week from book_entry_cs;
David Hall (Inactive)
added a comment - - edited I can easily reproduce it for InnoDB table on Columnstore 1.2.5 using MariaDB 10.3.16. However, it doesn't break on vanilla MariaDB 10.3.16. Bummer.
This breaks:
select avg(comm_total) over (partition by customer) as wk_comm_avg, max(week(trade_date)) over (partition by year(trade_date)) as max_week from book_entry_cs;
this does not break:
(remove the partition from first or function from partition of second)
select avg(comm_total) over () as wk_comm_avg, max(week(trade_date)) over (partition by year(trade_date)) as max_week from book_entry_cs;
--or--
select avg(comm_total) over (partition by customer) as wk_comm_avg, max(week(trade_date)) over (partition by trade_date) as max_week from book_entry_cs;
In debug mode, it asserts the following in compare_order_elements():
DBUG_ASSERT(item1->type() == Item::FIELD_ITEM &&
item2->type() == Item::FIELD_ITEM);
In actuality, item2->type() == item::FUNC_ITEM
Not sure how this gets this way.
David Hall (Inactive)
added a comment - - edited In debug mode, it asserts the following in compare_order_elements():
DBUG_ASSERT(item1->type() == Item::FIELD_ITEM &&
item2->type() == Item::FIELD_ITEM);
In actuality, item2->type() == item::FUNC_ITEM
Not sure how this gets this way.
In sql_select.cc optimize_stage2(), Columnstore has added:
// @InfiniDB We don't need tmp table for vtable create phase. Plus
// to build tmp table may corrupt some field table_name & db_name (for some reason)
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE)
need_tmp = false;
Removing this allows the query to run against InnoDB correcty. Investigating other things.
As far as I can tell, this is a Columnstore build only problem. MCOL-3434 has been opened to track it.
David Hall (Inactive)
added a comment - In sql_select.cc optimize_stage2(), Columnstore has added:
// @InfiniDB We don't need tmp table for vtable create phase. Plus
// to build tmp table may corrupt some field table_name & db_name (for some reason)
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE)
need_tmp = false;
Removing this allows the query to run against InnoDB correcty. Investigating other things.
As far as I can tell, this is a Columnstore build only problem. MCOL-3434 has been opened to track it.
People
Varun Gupta (Inactive)
Lukas Eder
Votes:
0Vote for this issue
Watchers:
8Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1442,"ttfb":422.19999980926514,"pageVisibility":"visible","entityId":75803,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"df682b11-b5a2-4c5f-ab71-8bd030c3322c","navigationType":0,"readyForUser":1526.1999998092651,"redirectCount":0,"resourceLoadedEnd":1672.8999996185303,"resourceLoadedStart":430,"resourceTiming":[{"duration":480.6000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":430,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":430,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":910.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":481.1000003814697,"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":430.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":430.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":911.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":537.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":430.5,"connectEnd":430.5,"connectStart":430.5,"domainLookupEnd":430.5,"domainLookupStart":430.5,"fetchStart":430.5,"redirectEnd":0,"redirectStart":0,"requestStart":430.5,"responseEnd":968.1999998092651,"responseStart":968.1999998092651,"secureConnectionStart":430.5},{"duration":615.6999998092651,"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":430.6000003814697,"connectEnd":430.6000003814697,"connectStart":430.6000003814697,"domainLookupEnd":430.6000003814697,"domainLookupStart":430.6000003814697,"fetchStart":430.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":430.6000003814697,"responseEnd":1046.3000001907349,"responseStart":1046.3000001907349,"secureConnectionStart":430.6000003814697},{"duration":619.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":430.80000019073486,"connectEnd":430.80000019073486,"connectStart":430.80000019073486,"domainLookupEnd":430.80000019073486,"domainLookupStart":430.80000019073486,"fetchStart":430.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":430.80000019073486,"responseEnd":1050.3000001907349,"responseStart":1050.3000001907349,"secureConnectionStart":430.80000019073486},{"duration":619.6999998092651,"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":431,"connectEnd":431,"connectStart":431,"domainLookupEnd":431,"domainLookupStart":431,"fetchStart":431,"redirectEnd":0,"redirectStart":0,"requestStart":431,"responseEnd":1050.6999998092651,"responseStart":1050.6999998092651,"secureConnectionStart":431},{"duration":619.9000005722046,"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":431.19999980926514,"connectEnd":431.19999980926514,"connectStart":431.19999980926514,"domainLookupEnd":431.19999980926514,"domainLookupStart":431.19999980926514,"fetchStart":431.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":431.19999980926514,"responseEnd":1051.1000003814697,"responseStart":1051.1000003814697,"secureConnectionStart":431.19999980926514},{"duration":683.8000001907349,"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":431.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":431.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1115.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":620,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":431.6000003814697,"connectEnd":431.6000003814697,"connectStart":431.6000003814697,"domainLookupEnd":431.6000003814697,"domainLookupStart":431.6000003814697,"fetchStart":431.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":431.6000003814697,"responseEnd":1051.6000003814697,"responseStart":1051.6000003814697,"secureConnectionStart":431.6000003814697},{"duration":683.5,"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":431.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":431.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1115.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":620.3999996185303,"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":431.80000019073486,"connectEnd":431.80000019073486,"connectStart":431.80000019073486,"domainLookupEnd":431.80000019073486,"domainLookupStart":431.80000019073486,"fetchStart":431.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":431.80000019073486,"responseEnd":1052.1999998092651,"responseStart":1052.1999998092651,"secureConnectionStart":431.80000019073486},{"duration":1147.7000007629395,"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":432.8999996185303,"connectEnd":432.8999996185303,"connectStart":432.8999996185303,"domainLookupEnd":432.8999996185303,"domainLookupStart":432.8999996185303,"fetchStart":432.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":432.8999996185303,"responseEnd":1580.6000003814697,"responseStart":1580.6000003814697,"secureConnectionStart":432.8999996185303},{"duration":1239.8999996185303,"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":433,"connectEnd":433,"connectStart":433,"domainLookupEnd":433,"domainLookupStart":433,"fetchStart":433,"redirectEnd":0,"redirectStart":0,"requestStart":433,"responseEnd":1672.8999996185303,"responseStart":1672.8999996185303,"secureConnectionStart":433},{"duration":453.70000076293945,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1127.3999996185303,"connectEnd":1127.3999996185303,"connectStart":1127.3999996185303,"domainLookupEnd":1127.3999996185303,"domainLookupStart":1127.3999996185303,"fetchStart":1127.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1127.3999996185303,"responseEnd":1581.1000003814697,"responseStart":1581.1000003814697,"secureConnectionStart":1127.3999996185303},{"duration":291.5999994277954,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1435.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1435.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1726.8999996185303,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":235,"responseStart":422,"responseEnd":427,"domLoading":427,"domInteractive":1729,"domContentLoadedEventStart":1729,"domContentLoadedEventEnd":1781,"domComplete":2442,"loadEventStart":2442,"loadEventEnd":2443,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1674.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1675.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1675.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1680.5},{"name":"activityTabFullyLoaded","time":1798.8000001907349}],"measures":[],"correlationId":"e56d8cd1ffee9d","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":127,"dbReadsTimeInMs":23,"dbConnsTimeInMs":34,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This is easily repeatable with InnoDB table on 10.3.16 (or ColumnStore 1.2.5-1 ):
openxs@ao756:~$ mcsmysql -uroot test
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.3.16-MariaDB-log Columnstore 1.2.5-1
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [test]> CREATE TABLE `t` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` int(11) DEFAULT NULL, `d` datetime DEFAULT NULL, `c` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB;
Query OK, 0 rows affected (0,243 sec)
MariaDB [test]> insert into t(cid, d, c) values (1, '2018-01-01', 20000.05);
Query OK, 1 row affected (0,056 sec)
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 1 row affected (0,051 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 2 rows affected (0,040 sec)
Records: 2 Duplicates: 0 Warnings: 0
...
\MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 32768 rows affected (0,794 sec)
Records: 32768 Duplicates: 0 Warnings: 0
MariaDB [test]> insert into t(cid, d, c) select round(rand()*100), date_sub(now(), interval rand()*100 week), round(rand()*100000,2) from t;
Query OK, 65536 rows affected (1,400 sec)
Records: 65536 Duplicates: 0 Warnings: 0
MariaDB [test]> select count(*) from t;
+----------+
| count(*) |
+----------+
| 131072 |
+----------+
1 row in set (0,070 sec)
MariaDB [test]> select distinct cid, week(d) as week, max(c) over (partition by cid, week(d)) as c_mx, sum(c) over (partition by cid, week(d)) as c_sum, count(c) over (partition by cid, week(d)) as c_cnt, max(week(d)) over (partition by year(d)) as w_max from t where year(d) = '2018';
ERROR 2013 (HY000): Lost connection to MySQL server during query
In the error log we see:
190810 13:58:35 [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=1
max_threads=153
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1781135 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f93740010b8
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 = 0x7f93c086fe98 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x563a83082259]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x307)[0x563a82bcbe57]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f93fb01c390]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x6997e7)[0x563a82b2e7e7]
sql/sql_window.cc:436(compare_order_elements)[0x563a82b31d06]
sql/sql_window.cc:588(compare_window_funcs_by_window_specs)[0x563a82a4c5e2]
sql/sql_select.cc:3342(JOIN::make_aggr_tables_info())[0x563a82a548f4]
sql/sql_select.cc:2637(JOIN::optimize_stage2())[0x563a82a5606a]
sql/sql_select.cc:1533(JOIN::optimize_inner())[0x563a82a5632f]
sql/sql_select.cc:1455(JOIN::optimize())[0x563a82a5835a]
sql/sql_select.cc:4514(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x563a82a58517]
sql/sql_select.cc:386(handle_select(THD*, LEX*, select_result*, unsigned long))[0x563a82a8d674]
sql/sql_table.cc:11114(Sql_cmd_create_table_like::execute(THD*))[0x563a82a0243f]
sql/sql_parse.cc:6064(mysql_execute_command(THD*))[0x563a82a08469]
sql/sql_parse.cc:7871(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x563a82a086a2]
sql/sql_class.h:2885(THD::set_row_count_func(long long))[0x563a82a0a037]
sql/sql_parse.cc:10666(idb_vtable_process(THD*, unsigned long long, Statement*))[0x563a82a0d139]
sql/sql_parse.cc:1875(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x563a82a0e9d0]
sql/sql_parse.cc:1425(do_command(THD*))[0x563a82ad6054]
sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x563a82ad61d4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f93fb0126ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f93fa4a741d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f93740136a8): is an invalid pointer
Connection ID (thread ID): 11
Status: NOT_KILLED