[Current thread is 1 (Thread 0x14d66bab7700 (LWP 1255655))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1 0x00005632ce06bbd7 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
#2 0x00005632cda3601a in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:330
#3 <signal handler called>
#4 0x00005632cda3368c in sortlength (allow_packing_for_sortkeys=<synthetic pointer>, sort_keys=0x14d6478d2da0, thd=0x14d647812018) at /test/10.5_opt/sql/filesort.cc:2237
#6 0x00005632cd889e55 in create_sort_index (thd=thd@entry=0x14d647812018, join=join@entry=0x14d647849bb8, tab=tab@entry=0x14d64784c858, fsort=0x14d6478d20c8) at /test/10.5_opt/sql/sql_select.cc:23875
#7 0x00005632cd9a7187 in Window_funcs_sort::exec (this=0x14d6478d1fc8, join=join@entry=0x14d647849bb8, keep_filesort_result=keep_filesort_result@entry=false) at /test/10.5_opt/sql/sql_window.cc:2998
#8 0x00005632cd9a7a7a in Window_funcs_computation::exec (this=<optimized out>, join=join@entry=0x14d647849bb8, keep_last_filesort_result=<optimized out>) at /test/10.5_opt/sql/sql_window.cc:3131
#9 0x00005632cd895ce3 in AGGR_OP::end_send (this=0x14d64784cfd8) at /test/10.5_opt/sql/sql_select.cc:28896
#10 0x00005632cd895ece in sub_select_postjoin_aggr (join=0x14d647849bb8, join_tab=0x14d64784c858, end_of_records=<optimized out>) at /test/10.5_opt/sql/sql_select.cc:20351
#11 0x00005632cd89d89d in do_select (procedure=<optimized out>, join=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:20177
#12 JOIN::exec_inner (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4450
#13 0x00005632cd89dca7 in JOIN::exec (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4231
#14 0x00005632cd89bfd2 in mysql_select (thd=thd@entry=0x14d647812018, tables=0x14d647847e08, fields=@0x14d6478472b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d647847718, last = 0x14d647847d98, elements = 2}, <No data fields>}, conds=0x14d647848eb0, og_num=<optimized out>, order=0x0, group=0x14d647849240, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14d647849b90, unit=0x14d647815e70, select_lex=0x14d647847160) at /test/10.5_opt/sql/sql_select.cc:4655
#15 0x00005632cd89c991 in handle_select (thd=thd@entry=0x14d647812018, lex=lex@entry=0x14d647815da8, result=result@entry=0x14d647849b90, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_opt/sql/sql_select.cc:417
#16 0x00005632cd843351 in execute_sqlcom_select (thd=thd@entry=0x14d647812018, all_tables=0x14d647847e08) at /test/10.5_opt/sql/sql_parse.cc:6209
#17 0x00005632cd83fa21 in mysql_execute_command (thd=thd@entry=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:3931
#18 0x00005632cd84646c in mysql_parse (thd=0x14d647812018, rawbuf=<optimized out>, length=98, parser_state=0x14d66bab6430, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7993
#19 0x00005632cd83b755 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d647812018, packet=packet@entry=0x14d64783a019 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1866
#20 0x00005632cd839a94 in do_command (thd=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:1347
#21 0x00005632cd92f191 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14d6688338f8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1411
#22 0x00005632cd92f4f4 in handle_one_connection (arg=arg@entry=0x14d6688338f8) at /test/10.5_opt/sql/sql_connect.cc:1313
#23 0x00005632cdc9fdea in pfs_spawn_thread (arg=0x14d66884f218) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
#24 0x000014d66aa306db in start_thread (arg=0x14d66bab7700) at pthread_create.c:463
#25 0x000014d669e2ea3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
#7 0x0000145db5e5a4a2 in __GI___assert_fail (assertion=assertion@entry=0x55fa8051bcd0 "pos->field != __null || pos->item != __null", file=file@entry=0x55fa8051bab0 "/test/10.5_dbg/sql/filesort.cc", line=line@entry=604, function=function@entry=0x55fa8051c960 <Filesort::make_sortorder(THD*, JOIN*, unsigned long long)::__PRETTY_FUNCTION__> "Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map)") at assert.c:101
#8 0x000055fa7f9bed2d in Filesort::make_sortorder (this=this@entry=0x145d9397b698, thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, first_table_bit=first_table_bit@entry=1) at /test/10.5_dbg/sql/filesort.cc:604
#9 0x000055fa7f9c2cd7 in filesort (thd=thd@entry=0x145d93815088, table=table@entry=0x145d9396e0a0, filesort=filesort@entry=0x145d9397b698, tracker=0x145d9397b928, join=join@entry=0x145d93876c40, first_table_bit=1) at /test/10.5_dbg/sql/filesort.cc:211
#10 0x000055fa7f7715a8 in create_sort_index (thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, tab=tab@entry=0x145d938798e0, fsort=0x145d9397b698) at /test/10.5_dbg/sql/sql_select.cc:23875
#11 0x000055fa7f912c86 in Window_funcs_sort::exec (this=0x145d9397b590, join=join@entry=0x145d93876c40, keep_filesort_result=<optimized out>) at /test/10.5_dbg/sql/sql_window.cc:2998
#12 0x000055fa7f9133a7 in Window_funcs_computation::exec (this=0x145d9397b570, join=join@entry=0x145d93876c40, keep_last_filesort_result=keep_last_filesort_result@entry=false) at /test/10.5_dbg/sql/sql_window.cc:3131
#13 0x000055fa7f778d2c in AGGR_OP::end_send (this=this@entry=0x145d9387a060) at /test/10.5_dbg/sql/sql_select.cc:28896
#14 0x000055fa7f7791c8 in sub_select_postjoin_aggr (join=0x145d93876c40, join_tab=0x145d938798e0, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20351
#15 0x000055fa7f75ffef in sub_select (join=join@entry=0x145d93876c40, join_tab=join_tab@entry=0x145d93879538, end_of_records=end_of_records@entry=true) at /test/10.5_dbg/sql/sql_select.cc:20586
#16 0x000055fa7f7605e0 in sub_select_cache (join=0x145d93876c40, join_tab=0x145d93879538, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20418
#17 0x000055fa7f75ffef in sub_select (join=0x145d93876c40, join_tab=0x145d93879190, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20586
#18 0x000055fa7f79a594 in do_select (procedure=<optimized out>, join=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:20177
#19 JOIN::exec_inner (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4450
#20 0x000055fa7f79a8fd in JOIN::exec (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4231
#21 0x000055fa7f798bf9 in mysql_select (thd=thd@entry=0x145d93815088, tables=<optimized out>, fields=@0x145d93874320: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145d93874788, last = 0x145d93874e20, elements = 2}, <No data fields>}, conds=0x145d93875f38, og_num=1, order=<optimized out>, group=0x145d938762c8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x145d93876c18, unit=0x145d938190a0, select_lex=0x145d938741d0) at /test/10.5_dbg/sql/sql_select.cc:4655
#22 0x000055fa7f798f28 in handle_select (thd=thd@entry=0x145d93815088, lex=lex@entry=0x145d93818fd8, result=result@entry=0x145d93876c18, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
#23 0x000055fa7f7217e2 in execute_sqlcom_select (thd=thd@entry=0x145d93815088, all_tables=0x145d93874e90) at /test/10.5_dbg/sql/sql_parse.cc:6209
#24 0x000055fa7f71a8b6 in mysql_execute_command (thd=thd@entry=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:3931
#25 0x000055fa7f727752 in mysql_parse (thd=thd@entry=0x145d93815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145db7bd3350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
#26 0x000055fa7f714204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145d93815088, packet=packet@entry=0x145d93867089 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1866
#27 0x000055fa7f7129de in do_command (thd=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:1347
#28 0x000055fa7f86ec3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x145d96cc7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
#29 0x000055fa7f86f357 in handle_one_connection (arg=arg@entry=0x145d96cc7808) at /test/10.5_dbg/sql/sql_connect.cc:1313
#30 0x000055fa7fcd2ca8 in pfs_spawn_thread (arg=0x145db4846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
#31 0x0000145db6b4d6db in start_thread (arg=0x145db7bd4700) at pthread_create.c:463
#32 0x0000145db5f4ba3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Roel Van de Paar
added a comment - - edited Original testcase still crashes latest 10.5.5 (optimized+debug)
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Optimized)
Core was generated by `/test/MD140720-mariadb-10.5.5-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
[Current thread is 1 (Thread 0x14d66bab7700 (LWP 1255655))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1 0x00005632ce06bbd7 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
#2 0x00005632cda3601a in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:330
#3 <signal handler called>
#4 0x00005632cda3368c in sortlength (allow_packing_for_sortkeys=<synthetic pointer>, sort_keys=0x14d6478d2da0, thd=0x14d647812018) at /test/10.5_opt/sql/filesort.cc:2237
#5 filesort (thd=thd@entry=0x14d647812018, table=table@entry=0x14d64794dc30, filesort=filesort@entry=0x14d6478d20c8, tracker=0x14d6478d2350, join=join@entry=0x14d647849bb8, first_table_bit=<optimized out>) at /test/10.5_opt/sql/filesort.cc:250
#6 0x00005632cd889e55 in create_sort_index (thd=thd@entry=0x14d647812018, join=join@entry=0x14d647849bb8, tab=tab@entry=0x14d64784c858, fsort=0x14d6478d20c8) at /test/10.5_opt/sql/sql_select.cc:23875
#7 0x00005632cd9a7187 in Window_funcs_sort::exec (this=0x14d6478d1fc8, join=join@entry=0x14d647849bb8, keep_filesort_result=keep_filesort_result@entry=false) at /test/10.5_opt/sql/sql_window.cc:2998
#8 0x00005632cd9a7a7a in Window_funcs_computation::exec (this=<optimized out>, join=join@entry=0x14d647849bb8, keep_last_filesort_result=<optimized out>) at /test/10.5_opt/sql/sql_window.cc:3131
#9 0x00005632cd895ce3 in AGGR_OP::end_send (this=0x14d64784cfd8) at /test/10.5_opt/sql/sql_select.cc:28896
#10 0x00005632cd895ece in sub_select_postjoin_aggr (join=0x14d647849bb8, join_tab=0x14d64784c858, end_of_records=<optimized out>) at /test/10.5_opt/sql/sql_select.cc:20351
#11 0x00005632cd89d89d in do_select (procedure=<optimized out>, join=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:20177
#12 JOIN::exec_inner (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4450
#13 0x00005632cd89dca7 in JOIN::exec (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4231
#14 0x00005632cd89bfd2 in mysql_select (thd=thd@entry=0x14d647812018, tables=0x14d647847e08, fields=@0x14d6478472b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d647847718, last = 0x14d647847d98, elements = 2}, <No data fields>}, conds=0x14d647848eb0, og_num=<optimized out>, order=0x0, group=0x14d647849240, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14d647849b90, unit=0x14d647815e70, select_lex=0x14d647847160) at /test/10.5_opt/sql/sql_select.cc:4655
#15 0x00005632cd89c991 in handle_select (thd=thd@entry=0x14d647812018, lex=lex@entry=0x14d647815da8, result=result@entry=0x14d647849b90, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_opt/sql/sql_select.cc:417
#16 0x00005632cd843351 in execute_sqlcom_select (thd=thd@entry=0x14d647812018, all_tables=0x14d647847e08) at /test/10.5_opt/sql/sql_parse.cc:6209
#17 0x00005632cd83fa21 in mysql_execute_command (thd=thd@entry=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:3931
#18 0x00005632cd84646c in mysql_parse (thd=0x14d647812018, rawbuf=<optimized out>, length=98, parser_state=0x14d66bab6430, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7993
#19 0x00005632cd83b755 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d647812018, packet=packet@entry=0x14d64783a019 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1866
#20 0x00005632cd839a94 in do_command (thd=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:1347
#21 0x00005632cd92f191 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14d6688338f8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1411
#22 0x00005632cd92f4f4 in handle_one_connection (arg=arg@entry=0x14d6688338f8) at /test/10.5_opt/sql/sql_connect.cc:1313
#23 0x00005632cdc9fdea in pfs_spawn_thread (arg=0x14d66884f218) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
#24 0x000014d66aa306db in start_thread (arg=0x14d66bab7700) at pthread_create.c:463
#25 0x000014d669e2ea3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Debug:
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)
mysqld: /test/10.5_dbg/sql/filesort.cc:604: Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map): Assertion `pos->field != __null || pos->item != __null' failed.
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)
Core was generated by `/test/MD140720-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
[Current thread is 1 (Thread 0x145db7bd4700 (LWP 1255802))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1 0x000055fa8020c4d7 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
#2 0x000055fa7f9c69ba in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
#3 <signal handler called>
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5 0x0000145db5e6a8b1 in __GI_abort () at abort.c:79
#6 0x0000145db5e5a42a in __assert_fail_base (fmt=0x145db5fe1a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55fa8051bcd0 "pos->field != __null || pos->item != __null", file=file@entry=0x55fa8051bab0 "/test/10.5_dbg/sql/filesort.cc", line=line@entry=604, function=function@entry=0x55fa8051c960 <Filesort::make_sortorder(THD*, JOIN*, unsigned long long)::__PRETTY_FUNCTION__> "Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map)") at assert.c:92
#7 0x0000145db5e5a4a2 in __GI___assert_fail (assertion=assertion@entry=0x55fa8051bcd0 "pos->field != __null || pos->item != __null", file=file@entry=0x55fa8051bab0 "/test/10.5_dbg/sql/filesort.cc", line=line@entry=604, function=function@entry=0x55fa8051c960 <Filesort::make_sortorder(THD*, JOIN*, unsigned long long)::__PRETTY_FUNCTION__> "Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map)") at assert.c:101
#8 0x000055fa7f9bed2d in Filesort::make_sortorder (this=this@entry=0x145d9397b698, thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, first_table_bit=first_table_bit@entry=1) at /test/10.5_dbg/sql/filesort.cc:604
#9 0x000055fa7f9c2cd7 in filesort (thd=thd@entry=0x145d93815088, table=table@entry=0x145d9396e0a0, filesort=filesort@entry=0x145d9397b698, tracker=0x145d9397b928, join=join@entry=0x145d93876c40, first_table_bit=1) at /test/10.5_dbg/sql/filesort.cc:211
#10 0x000055fa7f7715a8 in create_sort_index (thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, tab=tab@entry=0x145d938798e0, fsort=0x145d9397b698) at /test/10.5_dbg/sql/sql_select.cc:23875
#11 0x000055fa7f912c86 in Window_funcs_sort::exec (this=0x145d9397b590, join=join@entry=0x145d93876c40, keep_filesort_result=<optimized out>) at /test/10.5_dbg/sql/sql_window.cc:2998
#12 0x000055fa7f9133a7 in Window_funcs_computation::exec (this=0x145d9397b570, join=join@entry=0x145d93876c40, keep_last_filesort_result=keep_last_filesort_result@entry=false) at /test/10.5_dbg/sql/sql_window.cc:3131
#13 0x000055fa7f778d2c in AGGR_OP::end_send (this=this@entry=0x145d9387a060) at /test/10.5_dbg/sql/sql_select.cc:28896
#14 0x000055fa7f7791c8 in sub_select_postjoin_aggr (join=0x145d93876c40, join_tab=0x145d938798e0, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20351
#15 0x000055fa7f75ffef in sub_select (join=join@entry=0x145d93876c40, join_tab=join_tab@entry=0x145d93879538, end_of_records=end_of_records@entry=true) at /test/10.5_dbg/sql/sql_select.cc:20586
#16 0x000055fa7f7605e0 in sub_select_cache (join=0x145d93876c40, join_tab=0x145d93879538, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20418
#17 0x000055fa7f75ffef in sub_select (join=0x145d93876c40, join_tab=0x145d93879190, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20586
#18 0x000055fa7f79a594 in do_select (procedure=<optimized out>, join=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:20177
#19 JOIN::exec_inner (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4450
#20 0x000055fa7f79a8fd in JOIN::exec (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4231
#21 0x000055fa7f798bf9 in mysql_select (thd=thd@entry=0x145d93815088, tables=<optimized out>, fields=@0x145d93874320: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145d93874788, last = 0x145d93874e20, elements = 2}, <No data fields>}, conds=0x145d93875f38, og_num=1, order=<optimized out>, group=0x145d938762c8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x145d93876c18, unit=0x145d938190a0, select_lex=0x145d938741d0) at /test/10.5_dbg/sql/sql_select.cc:4655
#22 0x000055fa7f798f28 in handle_select (thd=thd@entry=0x145d93815088, lex=lex@entry=0x145d93818fd8, result=result@entry=0x145d93876c18, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
#23 0x000055fa7f7217e2 in execute_sqlcom_select (thd=thd@entry=0x145d93815088, all_tables=0x145d93874e90) at /test/10.5_dbg/sql/sql_parse.cc:6209
#24 0x000055fa7f71a8b6 in mysql_execute_command (thd=thd@entry=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:3931
#25 0x000055fa7f727752 in mysql_parse (thd=thd@entry=0x145d93815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145db7bd3350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
#26 0x000055fa7f714204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145d93815088, packet=packet@entry=0x145d93867089 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1866
#27 0x000055fa7f7129de in do_command (thd=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:1347
#28 0x000055fa7f86ec3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x145d96cc7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
#29 0x000055fa7f86f357 in handle_one_connection (arg=arg@entry=0x145d96cc7808) at /test/10.5_dbg/sql/sql_connect.cc:1313
#30 0x000055fa7fcd2ca8 in pfs_spawn_thread (arg=0x145db4846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
#31 0x0000145db6b4d6db in start_thread (arg=0x145db7bd4700) at pthread_create.c:463
#32 0x0000145db5f4ba3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
SIGSEGV|sortlength|filesort|create_sort_index|Window_funcs_sort::exec # Original testcase, optimized, 10.5.5 at 30e7a0a866dce530d8328c6d614e48d39a264f9b
SIGSEGV|sortlength|filesort|create_sort_index|st_join_table::sort_table # Second testcase above, optimized 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
SIGSEGV|sortlength|filesort|create_sort_index|st_join_table::sort_table # MDEV-22852 testcase, optimized, 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
pos->field != __null || pos->item != __null|SIGABRT|Filesort::make_sortorder|filesort|create_sort_index|Window_funcs_sort::exec # Original testcase, debug, 10.5.5 at 30e7a0a866dce530d8328c6d614e48d39a264f9b
pos->field != __null || pos->item != __null|SIGABRT|Filesort::make_sortorder|filesort|create_sort_index|st_join_table::sort_table # Second testcase above, debug 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
Based on all findings, it would seem that the second testcase would have fitted better with MDEV-22852, is now resolved, but that the original issue, for which a patch was created also, but not pushed yet, still exists.
Roel Van de Paar
added a comment - - edited Unique bug ID's so far
SIGSEGV|sortlength|filesort|create_sort_index|Window_funcs_sort::exec # Original testcase, optimized, 10.5.5 at 30e7a0a866dce530d8328c6d614e48d39a264f9b
SIGSEGV|sortlength|filesort|create_sort_index|st_join_table::sort_table # Second testcase above, optimized 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
SIGSEGV|sortlength|filesort|create_sort_index|st_join_table::sort_table # MDEV-22852 testcase, optimized, 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
pos->field != __null || pos->item != __null|SIGABRT|Filesort::make_sortorder|filesort|create_sort_index|Window_funcs_sort::exec # Original testcase, debug, 10.5.5 at 30e7a0a866dce530d8328c6d614e48d39a264f9b
pos->field != __null || pos->item != __null|SIGABRT|Filesort::make_sortorder|filesort|create_sort_index|st_join_table::sort_table # Second testcase above, debug 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
pos->field != __null || pos->item != __null|SIGABRT|Filesort::make_sortorder|filesort|create_sort_index|st_join_table::sort_table # MDEV-22852 testcase, debug, 10.5.5 at e1013725ce0f3f947e728491eef75d9985e8db2f
Based on all findings, it would seem that the second testcase would have fitted better with MDEV-22852 , is now resolved, but that the original issue, for which a patch was created also, but not pushed yet, still exists.
compute SUM(DISTINCT) // this can only use one-group-after-another algorithm due to DISTINCT
write output into temptable #2.
window function processing starts;
sort by window-func-criteria-1; // WE CRASH HERE
read the output and compute window function;
The crash happens, because the sorting code can't see where it can find the value of SUM(DISTINCT i1).
Sergei Petrunia
added a comment -
SELECT
a,
RANK() OVER ( ORDER BY SUM ( DISTINCT i1))
FROM
t1, t2 WHERE t2.i2 = t1.i1
GROUP BY a;
This query can only be executed as follows:
join t1, t2
put into temp.table
sort by the GROUP BY criteria
read the sorted file
compute SUM(DISTINCT) // this can only use one-group-after-another algorithm due to DISTINCT
write output into temptable #2.
window function processing starts;
sort by window-func-criteria-1; // WE CRASH HERE
read the output and compute window function;
The crash happens, because the sorting code can't see where it can find the value of SUM(DISTINCT i1) .
If I modify the query slightly, it doesn't crash. But in debugger I observe that window function computation is done before GROUP BY operation is done!
Sergei Petrunia
added a comment - - edited If I modify the query slightly, it doesn't crash. But in debugger I observe that window function computation is done before GROUP BY operation is done!
explain format=json
SELECT
a,
COUNT ( DISTINCT i1),
RANK() OVER ( ORDER BY a)
FROM
t1, t2 WHERE t2.i2 = t1.i1
GROUP BY
a;
The result is incorrect:
+------+--------------------+--------------------------+
| a | COUNT(DISTINCT i1) | RANK() OVER (ORDER BY a) |
+------+--------------------+--------------------------+
| 1 | 1 | 3 |
| 2 | 1 | 4 |
| 3 | 1 | 4 |
+------+--------------------+--------------------------+
RANK() should be 1, 2, 3 ...
People
Sergei Petrunia
Alice Sherepa
Votes:
4Vote for this issue
Watchers:
11Start 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":1429,"ttfb":453.1000003814697,"pageVisibility":"visible","entityId":65681,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"cfdc40f4-ad58-4bbc-a265-3c7158c8f202","navigationType":0,"readyForUser":1527.6000003814697,"redirectCount":0,"resourceLoadedEnd":1481.5,"resourceLoadedStart":459.5,"resourceTiming":[{"duration":204.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":459.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":459.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":664.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":205,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":459.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":459.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":664.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":323.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":460,"connectEnd":460,"connectStart":460,"domainLookupEnd":460,"domainLookupStart":460,"fetchStart":460,"redirectEnd":0,"redirectStart":0,"requestStart":460,"responseEnd":783.3000001907349,"responseStart":783.3000001907349,"secureConnectionStart":460},{"duration":433.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":460.19999980926514,"connectEnd":460.19999980926514,"connectStart":460.19999980926514,"domainLookupEnd":460.19999980926514,"domainLookupStart":460.19999980926514,"fetchStart":460.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":460.19999980926514,"responseEnd":893.5,"responseStart":893.5,"secureConnectionStart":460.19999980926514},{"duration":437.20000076293945,"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":460.3999996185303,"connectEnd":460.3999996185303,"connectStart":460.3999996185303,"domainLookupEnd":460.3999996185303,"domainLookupStart":460.3999996185303,"fetchStart":460.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":460.3999996185303,"responseEnd":897.6000003814697,"responseStart":897.6000003814697,"secureConnectionStart":460.3999996185303},{"duration":437.5,"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":460.6000003814697,"connectEnd":460.6000003814697,"connectStart":460.6000003814697,"domainLookupEnd":460.6000003814697,"domainLookupStart":460.6000003814697,"fetchStart":460.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":460.6000003814697,"responseEnd":898.1000003814697,"responseStart":898.1000003814697,"secureConnectionStart":460.6000003814697},{"duration":437.69999980926514,"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":460.80000019073486,"connectEnd":460.80000019073486,"connectStart":460.80000019073486,"domainLookupEnd":460.80000019073486,"domainLookupStart":460.80000019073486,"fetchStart":460.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":460.80000019073486,"responseEnd":898.5,"responseStart":898.5,"secureConnectionStart":460.80000019073486},{"duration":524.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":461,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":461,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":985.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":438,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":461.1000003814697,"connectEnd":461.1000003814697,"connectStart":461.1000003814697,"domainLookupEnd":461.1000003814697,"domainLookupStart":461.1000003814697,"fetchStart":461.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":461.1000003814697,"responseEnd":899.1000003814697,"responseStart":899.1000003814697,"secureConnectionStart":461.1000003814697},{"duration":524.8000001907349,"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":461.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":461.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":986.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":438.30000019073486,"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":461.5,"connectEnd":461.5,"connectStart":461.5,"domainLookupEnd":461.5,"domainLookupStart":461.5,"fetchStart":461.5,"redirectEnd":0,"redirectStart":0,"requestStart":461.5,"responseEnd":899.8000001907349,"responseStart":899.8000001907349,"secureConnectionStart":461.5},{"duration":642.1000003814697,"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":463,"connectEnd":463,"connectStart":463,"domainLookupEnd":463,"domainLookupStart":463,"fetchStart":463,"redirectEnd":0,"redirectStart":0,"requestStart":463,"responseEnd":1105.1000003814697,"responseStart":1105.1000003814697,"secureConnectionStart":463},{"duration":1012.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":468.6000003814697,"connectEnd":468.6000003814697,"connectStart":468.6000003814697,"domainLookupEnd":468.6000003814697,"domainLookupStart":468.6000003814697,"fetchStart":468.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":468.6000003814697,"responseEnd":1481.5,"responseStart":1481.5,"secureConnectionStart":468.6000003814697},{"duration":87.40000057220459,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1020.6999998092651,"connectEnd":1020.6999998092651,"connectStart":1020.6999998092651,"domainLookupEnd":1020.6999998092651,"domainLookupStart":1020.6999998092651,"fetchStart":1020.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1020.6999998092651,"responseEnd":1108.1000003814697,"responseStart":1108.1000003814697,"secureConnectionStart":1020.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":256,"responseStart":453,"responseEnd":459,"domLoading":456,"domInteractive":1705,"domContentLoadedEventStart":1705,"domContentLoadedEventEnd":1766,"domComplete":2356,"loadEventStart":2356,"loadEventEnd":2357,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1659.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1660.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1660.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1666.8999996185303},{"name":"activityTabFullyLoaded","time":1795.1999998092651}],"measures":[],"correlationId":"c0aea33f99b18c","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":127,"dbReadsTimeInMs":21,"dbConnsTimeInMs":32,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Original testcase still crashes latest 10.5.5 (optimized+debug)
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Optimized)
Core was generated by `/test/MD140720-mariadb-10.5.5-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
[Current thread is 1 (Thread 0x14d66bab7700 (LWP 1255655))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1 0x00005632ce06bbd7 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
#2 0x00005632cda3601a in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:330
#3 <signal handler called>
#4 0x00005632cda3368c in sortlength (allow_packing_for_sortkeys=<synthetic pointer>, sort_keys=0x14d6478d2da0, thd=0x14d647812018) at /test/10.5_opt/sql/filesort.cc:2237
#5 filesort (thd=thd@entry=0x14d647812018, table=table@entry=0x14d64794dc30, filesort=filesort@entry=0x14d6478d20c8, tracker=0x14d6478d2350, join=join@entry=0x14d647849bb8, first_table_bit=<optimized out>) at /test/10.5_opt/sql/filesort.cc:250
#6 0x00005632cd889e55 in create_sort_index (thd=thd@entry=0x14d647812018, join=join@entry=0x14d647849bb8, tab=tab@entry=0x14d64784c858, fsort=0x14d6478d20c8) at /test/10.5_opt/sql/sql_select.cc:23875
#7 0x00005632cd9a7187 in Window_funcs_sort::exec (this=0x14d6478d1fc8, join=join@entry=0x14d647849bb8, keep_filesort_result=keep_filesort_result@entry=false) at /test/10.5_opt/sql/sql_window.cc:2998
#8 0x00005632cd9a7a7a in Window_funcs_computation::exec (this=<optimized out>, join=join@entry=0x14d647849bb8, keep_last_filesort_result=<optimized out>) at /test/10.5_opt/sql/sql_window.cc:3131
#9 0x00005632cd895ce3 in AGGR_OP::end_send (this=0x14d64784cfd8) at /test/10.5_opt/sql/sql_select.cc:28896
#10 0x00005632cd895ece in sub_select_postjoin_aggr (join=0x14d647849bb8, join_tab=0x14d64784c858, end_of_records=<optimized out>) at /test/10.5_opt/sql/sql_select.cc:20351
#11 0x00005632cd89d89d in do_select (procedure=<optimized out>, join=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:20177
#12 JOIN::exec_inner (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4450
#13 0x00005632cd89dca7 in JOIN::exec (this=this@entry=0x14d647849bb8) at /test/10.5_opt/sql/sql_select.cc:4231
#14 0x00005632cd89bfd2 in mysql_select (thd=thd@entry=0x14d647812018, tables=0x14d647847e08, fields=@0x14d6478472b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d647847718, last = 0x14d647847d98, elements = 2}, <No data fields>}, conds=0x14d647848eb0, og_num=<optimized out>, order=0x0, group=0x14d647849240, having=0x0, proc_param=0x0, select_options=2147748608, result=0x14d647849b90, unit=0x14d647815e70, select_lex=0x14d647847160) at /test/10.5_opt/sql/sql_select.cc:4655
#15 0x00005632cd89c991 in handle_select (thd=thd@entry=0x14d647812018, lex=lex@entry=0x14d647815da8, result=result@entry=0x14d647849b90, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_opt/sql/sql_select.cc:417
#16 0x00005632cd843351 in execute_sqlcom_select (thd=thd@entry=0x14d647812018, all_tables=0x14d647847e08) at /test/10.5_opt/sql/sql_parse.cc:6209
#17 0x00005632cd83fa21 in mysql_execute_command (thd=thd@entry=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:3931
#18 0x00005632cd84646c in mysql_parse (thd=0x14d647812018, rawbuf=<optimized out>, length=98, parser_state=0x14d66bab6430, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7993
#19 0x00005632cd83b755 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d647812018, packet=packet@entry=0x14d64783a019 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1866
#20 0x00005632cd839a94 in do_command (thd=0x14d647812018) at /test/10.5_opt/sql/sql_parse.cc:1347
#21 0x00005632cd92f191 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14d6688338f8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1411
#22 0x00005632cd92f4f4 in handle_one_connection (arg=arg@entry=0x14d6688338f8) at /test/10.5_opt/sql/sql_connect.cc:1313
#23 0x00005632cdc9fdea in pfs_spawn_thread (arg=0x14d66884f218) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
#24 0x000014d66aa306db in start_thread (arg=0x14d66bab7700) at pthread_create.c:463
#25 0x000014d669e2ea3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Debug:
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)
mysqld: /test/10.5_dbg/sql/filesort.cc:604: Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map): Assertion `pos->field != __null || pos->item != __null' failed.
10.5.5 30e7a0a866dce530d8328c6d614e48d39a264f9b (Debug)
Core was generated by `/test/MD140720-mariadb-10.5.5-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
[Current thread is 1 (Thread 0x145db7bd4700 (LWP 1255802))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1 0x000055fa8020c4d7 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
#2 0x000055fa7f9c69ba in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
#3 <signal handler called>
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5 0x0000145db5e6a8b1 in __GI_abort () at abort.c:79
#6 0x0000145db5e5a42a in __assert_fail_base (fmt=0x145db5fe1a38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55fa8051bcd0 "pos->field != __null || pos->item != __null", file=file@entry=0x55fa8051bab0 "/test/10.5_dbg/sql/filesort.cc", line=line@entry=604, function=function@entry=0x55fa8051c960 <Filesort::make_sortorder(THD*, JOIN*, unsigned long long)::__PRETTY_FUNCTION__> "Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map)") at assert.c:92
#7 0x0000145db5e5a4a2 in __GI___assert_fail (assertion=assertion@entry=0x55fa8051bcd0 "pos->field != __null || pos->item != __null", file=file@entry=0x55fa8051bab0 "/test/10.5_dbg/sql/filesort.cc", line=line@entry=604, function=function@entry=0x55fa8051c960 <Filesort::make_sortorder(THD*, JOIN*, unsigned long long)::__PRETTY_FUNCTION__> "Sort_keys* Filesort::make_sortorder(THD*, JOIN*, table_map)") at assert.c:101
#8 0x000055fa7f9bed2d in Filesort::make_sortorder (this=this@entry=0x145d9397b698, thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, first_table_bit=first_table_bit@entry=1) at /test/10.5_dbg/sql/filesort.cc:604
#9 0x000055fa7f9c2cd7 in filesort (thd=thd@entry=0x145d93815088, table=table@entry=0x145d9396e0a0, filesort=filesort@entry=0x145d9397b698, tracker=0x145d9397b928, join=join@entry=0x145d93876c40, first_table_bit=1) at /test/10.5_dbg/sql/filesort.cc:211
#10 0x000055fa7f7715a8 in create_sort_index (thd=thd@entry=0x145d93815088, join=join@entry=0x145d93876c40, tab=tab@entry=0x145d938798e0, fsort=0x145d9397b698) at /test/10.5_dbg/sql/sql_select.cc:23875
#11 0x000055fa7f912c86 in Window_funcs_sort::exec (this=0x145d9397b590, join=join@entry=0x145d93876c40, keep_filesort_result=<optimized out>) at /test/10.5_dbg/sql/sql_window.cc:2998
#12 0x000055fa7f9133a7 in Window_funcs_computation::exec (this=0x145d9397b570, join=join@entry=0x145d93876c40, keep_last_filesort_result=keep_last_filesort_result@entry=false) at /test/10.5_dbg/sql/sql_window.cc:3131
#13 0x000055fa7f778d2c in AGGR_OP::end_send (this=this@entry=0x145d9387a060) at /test/10.5_dbg/sql/sql_select.cc:28896
#14 0x000055fa7f7791c8 in sub_select_postjoin_aggr (join=0x145d93876c40, join_tab=0x145d938798e0, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20351
#15 0x000055fa7f75ffef in sub_select (join=join@entry=0x145d93876c40, join_tab=join_tab@entry=0x145d93879538, end_of_records=end_of_records@entry=true) at /test/10.5_dbg/sql/sql_select.cc:20586
#16 0x000055fa7f7605e0 in sub_select_cache (join=0x145d93876c40, join_tab=0x145d93879538, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20418
#17 0x000055fa7f75ffef in sub_select (join=0x145d93876c40, join_tab=0x145d93879190, end_of_records=<optimized out>) at /test/10.5_dbg/sql/sql_select.cc:20586
#18 0x000055fa7f79a594 in do_select (procedure=<optimized out>, join=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:20177
#19 JOIN::exec_inner (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4450
#20 0x000055fa7f79a8fd in JOIN::exec (this=this@entry=0x145d93876c40) at /test/10.5_dbg/sql/sql_select.cc:4231
#21 0x000055fa7f798bf9 in mysql_select (thd=thd@entry=0x145d93815088, tables=<optimized out>, fields=@0x145d93874320: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145d93874788, last = 0x145d93874e20, elements = 2}, <No data fields>}, conds=0x145d93875f38, og_num=1, order=<optimized out>, group=0x145d938762c8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x145d93876c18, unit=0x145d938190a0, select_lex=0x145d938741d0) at /test/10.5_dbg/sql/sql_select.cc:4655
#22 0x000055fa7f798f28 in handle_select (thd=thd@entry=0x145d93815088, lex=lex@entry=0x145d93818fd8, result=result@entry=0x145d93876c18, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
#23 0x000055fa7f7217e2 in execute_sqlcom_select (thd=thd@entry=0x145d93815088, all_tables=0x145d93874e90) at /test/10.5_dbg/sql/sql_parse.cc:6209
#24 0x000055fa7f71a8b6 in mysql_execute_command (thd=thd@entry=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:3931
#25 0x000055fa7f727752 in mysql_parse (thd=thd@entry=0x145d93815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145db7bd3350, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7993
#26 0x000055fa7f714204 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145d93815088, packet=packet@entry=0x145d93867089 "", packet_length=packet_length@entry=98, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1866
#27 0x000055fa7f7129de in do_command (thd=0x145d93815088) at /test/10.5_dbg/sql/sql_parse.cc:1347
#28 0x000055fa7f86ec3b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x145d96cc7808, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
#29 0x000055fa7f86f357 in handle_one_connection (arg=arg@entry=0x145d96cc7808) at /test/10.5_dbg/sql/sql_connect.cc:1313
#30 0x000055fa7fcd2ca8 in pfs_spawn_thread (arg=0x145db4846508) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
#31 0x0000145db6b4d6db in start_thread (arg=0x145db7bd4700) at pthread_create.c:463
#32 0x0000145db5f4ba3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95