Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14e1299fe700 (LWP 3125595))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000014e1408a8859 in __GI_abort () at abort.c:79
#2 0x000014e1408a8729 in __assert_fail_base (fmt=0x14e140a3e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a090fea1b9 "block_size <= 0xFFFFFFFFL", file=0x55a090fea2d8 "/test/10.7_dbg/mysys/my_alloc.c", line=105, function=<optimized out>) at assert.c:92
#3 0x000014e1408b9f36 in __GI___assert_fail (assertion=assertion@entry=0x55a090fea1b9 "block_size <= 0xFFFFFFFFL", file=file@entry=0x55a090fea2d8 "/test/10.7_dbg/mysys/my_alloc.c", line=line@entry=105, function=function@entry=0x55a090fea360 <__PRETTY_FUNCTION__.15853> "calculate_block_sizes") at assert.c:101
#4 0x000055a090b7028c in calculate_block_sizes (mem_root=mem_root@entry=0x14e0e0071ea8, block_size=block_size@entry=70368744177660, pre_alloc_size=pre_alloc_size@entry=0x14e1299fca48) at /test/10.7_dbg/mysys/my_alloc.c:105
#5 0x000055a090b703d3 in init_alloc_root (key=0, mem_root=mem_root@entry=0x14e0e0071ea8, block_size=70368744177660, pre_alloc_size=<optimized out>, pre_alloc_size@entry=0, my_flags=my_flags@entry=65536) at /test/10.7_dbg/mysys/my_alloc.c:162
#7 0x000055a0901d4723 in Unique::Unique (this=0x14e0e0071ac8, comp_func=<optimized out>, comp_func_fixed_arg=<optimized out>, size_arg=<optimized out>, max_in_memory_size_arg=<optimized out>, min_dupl_count_arg=<optimized out>) at /test/10.7_dbg/sql/uniques.cc:93
#8 0x000055a09002a855 in multi_delete::initialize_tables (this=0x14e0e00158c0, join=<optimized out>) at /test/10.7_dbg/sql/sql_delete.cc:1303
#9 0x000055a090119d1a in JOIN::optimize_stage2 (this=this@entry=0x14e0e0015928) at /test/10.7_dbg/sql/sql_select.cc:2527
#10 0x000055a09011de23 in JOIN::optimize_inner (this=this@entry=0x14e0e0015928) at /test/10.7_dbg/sql/sql_select.cc:2479
#11 0x000055a09011e02e in JOIN::optimize (this=this@entry=0x14e0e0015928) at /test/10.7_dbg/sql/sql_select.cc:1809
#12 0x000055a09011e6a7 in mysql_select (thd=thd@entry=0x14e0e0000db8, tables=0x14e0e00144b0, fields=@0x14e0e0005bb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14e0e00157d0, last = 0x14e0e00157d0, elements = 1}, <No data fields>}, conds=conds@entry=0x14e0e0015538, og_num=og_num@entry=0, order=order@entry=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2202244746112, result=0x14e0e00158c0, unit=0x14e0e0005120, select_lex=0x14e0e0005918) at /test/10.7_dbg/sql/sql_select.cc:4977
#13 0x000055a09008feae in mysql_execute_command (thd=thd@entry=0x14e0e0000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4864
#14 0x000055a090079ac3 in mysql_parse (thd=thd@entry=0x14e0e0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e1299fd400) at /test/10.7_dbg/sql/sql_parse.cc:8030
#15 0x000055a0900886c8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e0e0000db8, packet=packet@entry=0x14e0e000b739 "DELETE a1 FROM t AS a1,t AS a2 WHERE a1.a=a2.a", packet_length=packet_length@entry=46, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1357
#16 0x000055a09008bae9 in do_command (thd=0x14e0e0000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
#17 0x000055a090201dd6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55a093cbe2d8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
#18 0x000055a0902023db in handle_one_connection (arg=arg@entry=0x55a093cbe2d8) at /test/10.7_dbg/sql/sql_connect.cc:1312
#19 0x000055a09066ace4 in pfs_spawn_thread (arg=0x55a093be9168) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#20 0x000014e140db7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x000014e1409a5293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Roel Van de Paar
added a comment - Issue remains in 10.7 as of 15-09-21
block_size <= 0xFFFFFFFFL|SIGABRT|calculate_block_sizes|init_alloc_root|init_tree|Unique::Unique
I agree this is likely critical.
Core was generated by `/test/MD150921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14c5400b0700 (LWP 3991191))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000014c540737859 in __GI_abort () at abort.c:79
#2 0x000014c540737729 in __assert_fail_base (fmt=0x14c5408cd588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5593545371d9 "block_size <= 0xFFFFFFFFL", file=0x5593545372f8 "/test/10.7_dbg/mysys/my_alloc.c", line=105, function=<optimized out>) at assert.c:92
#3 0x000014c540748f36 in __GI___assert_fail (assertion=assertion@entry=0x5593545371d9 "block_size <= 0xFFFFFFFFL", file=file@entry=0x5593545372f8 "/test/10.7_dbg/mysys/my_alloc.c", line=line@entry=105, function=function@entry=0x559354537380 <__PRETTY_FUNCTION__.15853> "calculate_block_sizes") at assert.c:101
#4 0x000055935409dadf in calculate_block_sizes (mem_root=mem_root@entry=0x14c4f8071630, block_size=block_size@entry=6250004460, pre_alloc_size=pre_alloc_size@entry=0x14c5400aea48) at /test/10.7_dbg/mysys/my_alloc.c:105
#5 0x000055935409dc26 in init_alloc_root (key=0, mem_root=mem_root@entry=0x14c4f8071630, block_size=6250004460, pre_alloc_size=<optimized out>, pre_alloc_size@entry=0, my_flags=my_flags@entry=65536) at /test/10.7_dbg/mysys/my_alloc.c:162
#7 0x00005593536f89cd in Unique::Unique (this=0x14c4f8071250, comp_func=<optimized out>, comp_func_fixed_arg=<optimized out>, size_arg=<optimized out>, max_in_memory_size_arg=<optimized out>, min_dupl_count_arg=<optimized out>) at /test/10.7_dbg/sql/uniques.cc:93
#8 0x000055935354ea9d in multi_delete::initialize_tables (this=0x14c4f80158b8, join=<optimized out>) at /test/10.7_dbg/sql/sql_delete.cc:1303
#9 0x000055935363e088 in JOIN::optimize_stage2 (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:2527
#10 0x0000559353642191 in JOIN::optimize_inner (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:2479
#11 0x000055935364239c in JOIN::optimize (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:1809
#12 0x0000559353642a15 in mysql_select (thd=thd@entry=0x14c4f8000db8, tables=0x14c4f80144a8, fields=@0x14c4f8005ba8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c4f80157c8, last = 0x14c4f80157c8, elements = 1}, <No data fields>}, conds=conds@entry=0x14c4f8015530, og_num=og_num@entry=0, order=order@entry=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2202244746112, result=0x14c4f80158b8, unit=0x14c4f8005110, select_lex=0x14c4f8005908) at /test/10.7_dbg/sql/sql_select.cc:4977
#13 0x00005593535b40cb in mysql_execute_command (thd=thd@entry=0x14c4f8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4862
#14 0x000055935359dd06 in mysql_parse (thd=thd@entry=0x14c4f8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c5400af400) at /test/10.7_dbg/sql/sql_parse.cc:8029
#15 0x00005593535ac8fe in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c4f8000db8, packet=packet@entry=0x14c4f800b739 "DELETE c FROM t AS c,t AS d WHERE c.a=d.a", packet_length=packet_length@entry=41, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
#16 0x00005593535afd04 in do_command (thd=0x14c4f8000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
#17 0x0000559353725e6c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5593564db4f8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
#18 0x0000559353726471 in handle_one_connection (arg=arg@entry=0x5593564db4f8) at /test/10.7_dbg/sql/sql_connect.cc:1312
#19 0x0000559353b8f326 in pfs_spawn_thread (arg=0x5593563da308) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#20 0x000014c540c46609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x000014c540834293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Roel Van de Paar
added a comment - Simplified the testcase further, and this looks quite serious. In testcase below, one zero less does not cause the same assert.
SET sort_buffer_size=100000000000;
CREATE TABLE t (a INT ) ENGINE=InnoDB;
DELETE c FROM t AS c,t AS d WHERE c.a=d.a;
Leads to:
10.7.0 9d65d2f9d09a6e547c97d5a44c763417433301f5 (Debug)
Core was generated by `/test/MD150921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x14c5400b0700 (LWP 3991191))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000014c540737859 in __GI_abort () at abort.c:79
#2 0x000014c540737729 in __assert_fail_base (fmt=0x14c5408cd588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5593545371d9 "block_size <= 0xFFFFFFFFL", file=0x5593545372f8 "/test/10.7_dbg/mysys/my_alloc.c", line=105, function=<optimized out>) at assert.c:92
#3 0x000014c540748f36 in __GI___assert_fail (assertion=assertion@entry=0x5593545371d9 "block_size <= 0xFFFFFFFFL", file=file@entry=0x5593545372f8 "/test/10.7_dbg/mysys/my_alloc.c", line=line@entry=105, function=function@entry=0x559354537380 <__PRETTY_FUNCTION__.15853> "calculate_block_sizes") at assert.c:101
#4 0x000055935409dadf in calculate_block_sizes (mem_root=mem_root@entry=0x14c4f8071630, block_size=block_size@entry=6250004460, pre_alloc_size=pre_alloc_size@entry=0x14c5400aea48) at /test/10.7_dbg/mysys/my_alloc.c:105
#5 0x000055935409dc26 in init_alloc_root (key=0, mem_root=mem_root@entry=0x14c4f8071630, block_size=6250004460, pre_alloc_size=<optimized out>, pre_alloc_size@entry=0, my_flags=my_flags@entry=65536) at /test/10.7_dbg/mysys/my_alloc.c:162
#6 0x00005593540b3125 in init_tree (tree=tree@entry=0x14c4f80713f8, default_alloc_size=<optimized out>, memory_limit=memory_limit@entry=0, size=<optimized out>, compare=0x55935354e362 <refpos_order_cmp(void*, void const*, void const*)>, free_element=free_element@entry=0x0, custom_arg=0x14c4f8028a20, my_flags=65536) at /test/10.7_dbg/mysys/tree.c:131
#7 0x00005593536f89cd in Unique::Unique (this=0x14c4f8071250, comp_func=<optimized out>, comp_func_fixed_arg=<optimized out>, size_arg=<optimized out>, max_in_memory_size_arg=<optimized out>, min_dupl_count_arg=<optimized out>) at /test/10.7_dbg/sql/uniques.cc:93
#8 0x000055935354ea9d in multi_delete::initialize_tables (this=0x14c4f80158b8, join=<optimized out>) at /test/10.7_dbg/sql/sql_delete.cc:1303
#9 0x000055935363e088 in JOIN::optimize_stage2 (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:2527
#10 0x0000559353642191 in JOIN::optimize_inner (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:2479
#11 0x000055935364239c in JOIN::optimize (this=this@entry=0x14c4f8015920) at /test/10.7_dbg/sql/sql_select.cc:1809
#12 0x0000559353642a15 in mysql_select (thd=thd@entry=0x14c4f8000db8, tables=0x14c4f80144a8, fields=@0x14c4f8005ba8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c4f80157c8, last = 0x14c4f80157c8, elements = 1}, <No data fields>}, conds=conds@entry=0x14c4f8015530, og_num=og_num@entry=0, order=order@entry=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2202244746112, result=0x14c4f80158b8, unit=0x14c4f8005110, select_lex=0x14c4f8005908) at /test/10.7_dbg/sql/sql_select.cc:4977
#13 0x00005593535b40cb in mysql_execute_command (thd=thd@entry=0x14c4f8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4862
#14 0x000055935359dd06 in mysql_parse (thd=thd@entry=0x14c4f8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c5400af400) at /test/10.7_dbg/sql/sql_parse.cc:8029
#15 0x00005593535ac8fe in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c4f8000db8, packet=packet@entry=0x14c4f800b739 "DELETE c FROM t AS c,t AS d WHERE c.a=d.a", packet_length=packet_length@entry=41, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
#16 0x00005593535afd04 in do_command (thd=0x14c4f8000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
#17 0x0000559353725e6c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5593564db4f8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
#18 0x0000559353726471 in handle_one_connection (arg=arg@entry=0x5593564db4f8) at /test/10.7_dbg/sql/sql_connect.cc:1312
#19 0x0000559353b8f326 in pfs_spawn_thread (arg=0x5593563da308) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
#20 0x000014c540c46609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x000014c540834293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Bug confirmed present in:
MariaDB: 10.7.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)
Seems to happen whenever sort buffer is set to a value larger than available memory. Unclear why it happens in 10.7 only, which is a bit concerning imho.
Roel Van de Paar
added a comment - Seems to happen whenever sort buffer is set to a value larger than available memory. Unclear why it happens in 10.7 only, which is a bit concerning imho.
Issue remains in 10.7 as of 15-09-21
block_size <= 0xFFFFFFFFL|SIGABRT|calculate_block_sizes|init_alloc_root|init_tree|Unique::Unique
I agree this is likely critical.