May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: 190502 14:28:29 [ERROR] mysqld got signal 11 ;
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: This could be because you hit a bug. It is also possible that this binary
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: or one of the libraries it was linked against is corrupt, improperly built,
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: or misconfigured. This error can also be caused by malfunctioning hardware.
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: To report this bug, see https://mariadb.com/kb/en/reporting-bugs
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: We will try our best to scrape up some info that will hopefully help
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: diagnose the problem, but since we have already crashed,
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: something is definitely wrong and this may fail.
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: Server version: 10.3.14-MariaDB
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: key_buffer_size=134217728
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: read_buffer_size=131072
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: max_used_connections=11
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: max_threads=153
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: thread_count=22
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: It is possible that mysqld could use up to
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467390 K bytes of memory
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: Hope that's ok; if not, decrease some variables in the equation.
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: Thread pointer: 0x7efefc0008c8
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: Attempting backtrace. You can use the following information to find out
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: where mysqld died. If you see no messages after this, something went
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: terribly wrong...
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: stack_bottom = 0x7effc1a63d00 thread_stack 0x49000
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x56445dcabdfe]
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(handle_fatal_signal+0x357)[0x56445d74bcc7]
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: /lib64/libpthread.so.0(+0xf5d0)[0x7f0a5ee4d5d0]
May 02 14:28:29 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z20find_field_in_tablesP3THDP10Item_identP10TABLE_LISTS4_PP4Item27find_item_error_report_typebb+0x622)[0x56445d518862]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z11setup_groupP3THD20Bounds_checked_arrayIP4ItemEP10TABLE_LISTR4ListIS2_ES9_P8st_orderPbb+0x2d8)[0x56445d5b8d38]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z13setup_windowsP3THD20Bounds_checked_arrayIP4ItemEP10TABLE_LISTR4ListIS2_ES9_RS7_I11Window_specERS7_I16Item_window_funcE+0x1aa)[0x56445d6a7b9a]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN4JOIN7prepareEP10TABLE_LISTjP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x929)[0x56445d5bb5e9]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN18st_select_lex_unit12prepare_joinEP3THDP13st_select_lexP13select_resultmb+0x113)[0x56445d60b673]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resultm+0x10c1)[0x56445d60f241]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z21mysql_derived_prepareP3THDP3LEXP10TABLE_LIST+0x263)[0x56445d538a43]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xfc)[0x56445d53979c]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z20mysql_prepare_insertP3THDP10TABLE_LISTP5TABLER4ListI4ItemEPS7_S8_S8_15enum_duplicatesPPS6_b+0xba)[0x56445d53fc9a]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z27mysql_insert_select_prepareP3THD+0x62)[0x56445d543d22]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x887d)[0x56445d5753bd]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x36)[0x56445d4db886]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0x99)[0x56445d4e3319]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x64c)[0x56445d4e3d6c]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN7sp_head7executeEP3THDb+0x860)[0x56445d4df280]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x74d)[0x56445d4e049d]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(+0x59c819)[0x56445d565819]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(+0x59dd76)[0x56445d566d76]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_ZN12Sql_cmd_call7executeEP3THD+0x90)[0x56445d567590]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3952)[0x56445d570492]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x22b)[0x56445d575cab]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1d3e)[0x56445d578a2e]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z10do_commandP3THD+0x13e)[0x56445d57988e]
May 02 14:28:30 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x56445d64fb6a]
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(handle_one_connection+0x3d)[0x56445d64fc8d]
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: /usr/sbin/mysqld(+0xc9748d)[0x56445dc6048d]
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: /lib64/libpthread.so.0(+0x7dd5)[0x7f0a5ee45dd5]
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: /lib64/libc.so.6(clone+0x6d)[0x7f0a5d1e7ead]
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Trying to get some variables.
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Some pointers may be invalid and cause the dump to abort.
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Query (0x7efefc13e1c0): REPLACE INTO abc_by_quarter_75_v2( quarter, sku_prefix, brand_name, 6_month_rev, 6_month_abc, 12_month_rev, 12_month_abc, refreshed_at) WITH 12_month as ( SELECT oiam.sku_prefix, m.brand_name, @quarter as `quarter`, SUM(CASE WHEN DATE(oiam.created_at) BETWEEN @start_date_12_month AND @end_date THEN oiam.product_amount_ordered ELSE NULL END) as 12_month_rev #12 month product revenue by maker for most recently completed quarter FROM `bi-test`.mv_order_item_as_merchandised oiam LEFT JOIN `bi-test`.mv_maker m USING(sku_prefix) WHERE oiam.sku_prefix != '1' GROUP BY oiam.sku_prefix, m.brand_name HAVING 12_month_rev > 0) #Query SELECT a.quarter, a.sku_prefix, a.brand_name, b.6_month_rev, b.6_month_abc, a.12_month_rev, a.12_month_abc, NOW() as refreshed_at FROM (SELECT s.*, SUM(s.percent) over (partition by s.quarter order by s.12_month_rev DESC) as running_total, CASE WHEN SUM(s.percent) over (partition by s.quarter order by s.12_month_rev DESC) <= .75 THEN "A" WHEN SUM(s.percent) over (partition by s.quarter order by s.12_month_rev DESC) >= .95 THEN "C" ELSE "B" END as 12_month_abc FROM (SELECT m.quarter, m.sku_prefix, m.brand_name, m.12_month_rev, y.total_12_month_rev, m.12_month_rev / y.total_12_month_rev as percent FROM 12_month m #joining total sales for the specified time period in order to calculate the % of rev by maker of the total sales - mimics subquery above but is total sales by quarter RIGHT JOIN (SELECT f.quarter, SUM(f.12_month_rev) as total_12_month_rev FROM 12_month f GROUP BY f.quarter) y ON y.quarter = m.quarter) s GROUP BY s.quarter, s.sku_prefix ORDER BY s.quarter ASC, s.12_month_rev DESC) a LEFT JOIN #same queries as above but for 6 months rather than 12 months - so the first query is for 6 month sales by maker and the second query is tot
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: al 6 month sales for that time period (SELECT s.*, SUM(s.percent) over (partition by s.quarter order by s.6_month_rev DESC) as running_total, CASE WHEN SUM(s.percent) over (partition by s.quarter order by s.6_month_rev DESC) <= .75 THEN "A" WHEN SUM(s.percent) over (partition by s.quarter order by s.6_month_rev DESC) >= .95 THEN "C" ELSE "B" END as 6_month_abc FROM (SELECT m.quarter, m.sku_prefix, m.brand_name, m.6_month_rev, y.total_6_month_rev, m.6_month_rev / y.total_6_month_rev as percent FROM (SELECT oiam.sku_prefix, m.brand_name, @quarter as `quarter`, SUM(CASE WHEN DATE(oiam.created_at) BETWEEN @start_date_6_month AND @end_date THEN oiam.product_amount_ordered ELSE NULL END) as 6_month_rev #6 month product revenue by maker for most recently completed quarter FROM `bi-test`.mv_order_item_as_merchandised oiam LEFT JOIN `bi-test`.mv_maker m USING(sku_prefix) WHERE oiam.sku_prefix != '1' GROUP BY oiam.sku_prefix, m.brand_name) m #total 6 month sales RIGHT JOIN (SELECT f.quarter, SUM(f.6_month_rev) as total_6_month_rev FROM (SELECT oiam.sku_prefix, m.brand_name, @quarter as `quarter`, SUM(CASE WHEN DATE(oiam.created_at) BETWEEN @start_date_6_month AND @end_date THEN oiam.product_amount_ordered ELSE NULL END) as 6_month_rev #6 month product revenue by maker for most recently completed quarter FROM `bi-test`.mv_order_item_as_merchandised oiam LEFT JOIN `bi-test`.mv_maker m USING(sku_prefix) WHERE oiam.sku_prefix != '1' GROUP BY oiam.sku_prefix, m.brand_name) f GROUP BY f.quarter) y ON y.quarter = m.quarter) s GROUP BY s.quarter, s.sku_prefix) b ON b.quarter = a.quarter AND b.sku_prefix = a.sku_prefix WHERE a.12_month_rev > 0
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Connection ID (thread ID): 16
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Status: NOT_KILLED
May 02 14:28:31 ip-10-0-192-142.ec2.internal mysqld[28907]: Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
Thanks for the report!
Reproduced on 10.2-10.4:
delimiter $$;
begin
delimiter ;$$
call pr();
call pr();
call pr();
10.2 8ce702aa90c174566f4a
#0 0x5578b6b7d6f0 in find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, Item**, find_item_error_report_type, bool, bool) /10.2/sql/sql_base.cc:5945
#1 0x5578b6d9ad92 in find_order_in_list /10.2/sql/sql_select.cc:22455
#2 0x5578b6d9c110 in setup_group(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, List<Item>&, List<Item>&, st_order*, bool*, bool) /10.2/sql/sql_select.cc:22633
#3 0x5578b709f7fa in setup_windows(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, List<Item>&, List<Item>&, List<Window_spec>&, List<Item_window_func>&) /10.2/sql/sql_window.cc:208
#4 0x5578b6d05a33 in setup_without_group /10.2/sql/sql_select.cc:664
#5 0x5578b6d071e8 in JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /10.2/sql/sql_select.cc:819
#6 0x5578b6ea93a0 in st_select_lex_unit::prepare(THD*, select_result*, unsigned long) /10.2/sql/sql_union.cc:586
#7 0x5578b6c04dd1 in mysql_derived_prepare(THD*, LEX*, TABLE_LIST*) /10.2/sql/sql_derived.cc:741
#8 0x5578b6c021b1 in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /10.2/sql/sql_derived.cc:198
#9 0x5578b6f10b10 in TABLE_LIST::handle_derived(LEX*, unsigned int) /10.2/sql/table.cc:7988
#10 0x5578b6c3a4fd in LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) /10.2/sql/sql_lex.h:3185
#11 0x5578b6c56d6e in st_select_lex::handle_derived(LEX*, unsigned int) /10.2/sql/sql_lex.cc:3918
#12 0x5578b6d0600a in JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /10.2/sql/sql_select.cc:716
#13 0x5578b6d23d2f in 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*) /10.2/sql/sql_select.cc:3798
#14 0x5578b6d0363a in handle_select(THD*, LEX*, select_result*, unsigned long) /10.2/sql/sql_select.cc:376
#15 0x5578b6c8b0d6 in execute_sqlcom_select /10.2/sql/sql_parse.cc:6486
#16 0x5578b6c784cb in mysql_execute_command(THD*) /10.2/sql/sql_parse.cc:3534
#17 0x5578b75d9bf1 in sp_instr_stmt::exec_core(THD*, unsigned int*) /10.2/sql/sp_head.cc:3248
#18 0x5578b75d8874 in sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*) /10.2/sql/sp_head.cc:3011
#19 0x5578b75d94ce in sp_instr_stmt::execute(THD*, unsigned int*) /10.2/sql/sp_head.cc:3164
#20 0x5578b75cee57 in sp_head::execute(THD*, bool) /10.2/sql/sp_head.cc:1329
#21 0x5578b75d2cbe in sp_head::execute_procedure(THD*, List<Item>*) /10.2/sql/sp_head.cc:2118
#22 0x5578b6c74a15 in do_execute_sp /10.2/sql/sql_parse.cc:2956
#23 0x5578b6c86571 in mysql_execute_command(THD*) /10.2/sql/sql_parse.cc:5834
#24 0x5578b6c9383a in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /10.2/sql/sql_parse.cc:8020
#25 0x5578b6c6eec4 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /10.2/sql/sql_parse.cc:1833
#26 0x5578b6c6c041 in do_command(THD*) /10.2/sql/sql_parse.cc:1387
#27 0x5578b6f95689 in do_handle_one_connection(CONNECT*) /10.2/sql/sql_connect.cc:1335
#28 0x5578b6f95091 in handle_one_connection /10.2/sql/sql_connect.cc:1241
#29 0x5578b8143ac5 in pfs_spawn_thread /10.2/storage/perfschema/pfs.cc:1862
#30 0x7f22508656b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)
#31 0x7f224fcfa41c in clone (/lib/x86_64-linux-gnu/libc.so.6+0x10741c)