Core was generated by `/test/MD130524-mariadb-10.5.25-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
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 0x1482a008f700 (LWP 2028144))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00001482a9f89859 in __GI_abort () at abort.c:79
#2 0x00001482a9f89729 in __assert_fail_base (fmt=0x1482aa11f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56336ef8b868 "strlen(Ptr) == str_length", file=0x56336ef8a1d8 "/test/10.5_dbg/sql/sql_string.h", line=359, function=<optimized out>) at assert.c:92
#3 0x00001482a9f9afd6 in __GI___assert_fail (assertion=assertion@entry=0x56336ef8b868 "strlen(Ptr) == str_length", file=file@entry=0x56336ef8a1d8 "/test/10.5_dbg/sql/sql_string.h", line=line@entry=359, function=function@entry=0x56336ef8b8e0 "void Static_binary_string::chop()") at assert.c:101
#4 0x000056336e4328da in Static_binary_string::chop (this=0x1482a008d308) at /test/10.5_dbg/sql/sql_string.h:359
#5 Item_func_json_extract::read_json (this=0x1482500135f0, str=0x1482a008d300, type=type@entry=0x1482a008d210, out_val=out_val@entry=0x1482a008d218, value_len=value_len@entry=0x1482a008d214) at /test/10.5_dbg/sql/item_jsonfunc.cc:1034
#6 0x000056336e4329b7 in Item_func_json_extract::val_str (this=<optimized out>, str=<optimized out>) at /test/10.5_dbg/sql/item_jsonfunc.cc:1064
#7 0x000056336e474ff8 in Type_handler::Item_send_str (this=<optimized out>, item=0x1482500135f0, protocol=0x148250001348, buf=<optimized out>) at /test/10.5_dbg/sql/sql_type.cc:7565
#8 0x000056336e3b0ce1 in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.5_dbg/sql/sql_type.h:5494
#9 0x000056336e187dae in Item::send (this=0x1482500135f0, protocol=0x148250001348, buffer=0x1482a008d2d0) at /test/10.5_dbg/sql/item.h:1082
#10 0x000056336e185420 in Protocol::send_result_set_row (this=this@entry=0x148250001348, row_items=row_items@entry=0x148250012fe0) at /test/10.5_dbg/sql/protocol.cc:1086
#11 0x000056336e214ad3 in select_send::send_data (this=0x148250014060, items=@0x148250012fe0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1482500136f0, last = 0x1482500136f0, elements = 1}, <No data fields>}) at /test/10.5_dbg/sql/sql_class.cc:3160
#12 0x000056336e2f7dd9 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/10.5_dbg/sql/sql_class.h:5564
#13 JOIN::exec_inner (this=this@entry=0x148250014088) at /test/10.5_dbg/sql/sql_select.cc:4513
#14 0x000056336e2f8b40 in JOIN::exec (this=this@entry=0x148250014088) at /test/10.5_dbg/sql/sql_select.cc:4425
#15 0x000056336e2f6986 in mysql_select (thd=thd@entry=0x148250000d48, tables=0x0, fields=@0x148250012fe0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1482500136f0, last = 0x1482500136f0, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x148250014060, unit=0x148250004ef8, select_lex=0x148250012e78) at /test/10.5_dbg/sql/sql_select.cc:4902
#16 0x000056336e2f7489 in handle_select (thd=thd@entry=0x148250000d48, lex=lex@entry=0x148250004e30, result=result@entry=0x148250014060, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:449
#17 0x000056336e26fc69 in execute_sqlcom_select (thd=thd@entry=0x148250000d48, all_tables=0x0) at /test/10.5_dbg/sql/sql_parse.cc:6424
#18 0x000056336e27ccd6 in mysql_execute_command (thd=thd@entry=0x148250000d48) at /test/10.5_dbg/sql/sql_parse.cc:4029
#19 0x000056336e26952a in mysql_parse (thd=thd@entry=0x148250000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1482a008e2c0, 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:8203
#20 0x000056336e277ce7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148250000d48, packet=packet@entry=0x14825000aa19 "", packet_length=packet_length@entry=44, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1328
#21 0x000056336e27aa20 in do_command (thd=0x148250000d48) at /test/10.5_dbg/sql/sql_parse.cc:1375
#22 0x000056336e3c6b9e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x563371911548, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1415
#23 0x000056336e3c723c in handle_one_connection (arg=arg@entry=0x563371911548) at /test/10.5_dbg/sql/sql_connect.cc:1317
#24 0x000056336e843f0d in pfs_spawn_thread (arg=0x563370dd9778) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
#25 0x00001482aa49a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#26 0x00001482aa086133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Roel Van de Paar
added a comment - A related but different stack with
SET character_set_database=ucs2;
SET CHARACTER SET cp1251_koi8;
SELECT JSON_EXTRACT( '{ "\\"a\\"": 1}' , '$."\\"a\\""' );
strlen(Ptr) == str_length|SIGABRT|Binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Type_handler::Item_send_str
All UniqueID's seen previously/with testcases above:
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item_func_conv_charset::Item_func_conv_charset
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Arg_comparator::compare_json_str_basic
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item_char_typecast::val_str_generic
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item::val_json
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Type_handler::Item_send_str
Rather than reduce these, once the current fix is pushed, we will watch for re-occurrences of these and earlier stacks. Also note some corruptions were observed:
strlen(Ptr) == str_length|SIGABRT|Backtrace stopped: Cannot access memory at address|
Roel Van de Paar
added a comment - - edited There are some additional high-frequency UiqueID's/stacks observed:
strlen(Ptr) == str_length|SIGABRT|Binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Arg_comparator::compare_json_str_basic
strlen(Ptr) == str_length|SIGABRT|Binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item::val_json
strlen(Ptr) == str_length|SIGABRT|Binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item::val_str_from_item
Rather than reduce these, once the current fix is pushed, we will watch for re-occurrences of these and earlier stacks. Also note some corruptions were observed:
strlen(Ptr) == str_length|SIGABRT|Backtrace stopped: Cannot access memory at address|
A related but different stack with
strlen(Ptr) == str_length|SIGABRT|Binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Type_handler::Item_send_str
All UniqueID's seen previously/with testcases above:
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item_func_conv_charset::Item_func_conv_charset
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Arg_comparator::compare_json_str_basic
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item_char_typecast::val_str_generic
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Item::val_json
strlen(Ptr) == str_length|SIGABRT|Static_binary_string::chop|Item_func_json_extract::read_json|Item_func_json_extract::val_str|Type_handler::Item_send_str