Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4.6, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
Description
Started MariaDB 10.4.6 debug cluster and run following on one of the nodes:
MariaDB [test]> SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }"); |
ERROR 2013 (HY000): Lost connection to MySQL server during query |
mysqld: /home/shako/Galera_Tests/MariaDB/sql/spatial.cc:395: static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*): Assertio |
n `je->state == JST_KEY' failed.
|
190610 12:57:03 [ERROR] mysqld got signal 6 ; |
|
sql/spatial.cc:397(Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*))[0x55b4350f19ff] |
sql/item_geofunc.cc:157(Item_func_geometry_from_json::val_str(String*))[0x55b434ff5afc]
|
sql/sql_type.cc:6737(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x55b434e24177] |
sql/sql_type.h:4629(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x55b434e2fb40] |
/home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(+0x6caaaa)[0x55b434b00aaa]
|
/home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0xcb)[0x55b434afb7ad]
|
/home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0xe2)[0x55b434ba8d7a]
|
sql/item.h:1036(Item::send(Protocol*, st_value*))[0x55b434c6786e]
|
sql/protocol.cc:1024(Protocol::send_result_set_row(List<Item>*))[0x55b434c67186]
|
sql/sql_class.cc:3002(select_send::send_data(List<Item>&))[0x55b434c6882d]
|
sql/sql_select.cc:4257(JOIN::exec_inner())[0x55b434c58e15]
|
sql/sql_select.cc:4173(JOIN::exec())[0x55b434c22745]
|
sql/sql_select.cc:4606(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*))[0x55b434c179b5] |
sql/sql_select.cc:412(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55b434c264d9] |
sql/sql_parse.cc:6612(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55b434c25b4f]
|
sql/sql_parse.cc:3884(mysql_execute_command(THD*))[0x55b434c11a46]
|
sql/sql_parse.cc:8164(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b434c1035d] |
sql/sql_parse.cc:7987(wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b434d887ff] |
sql/sql_parse.cc:1813(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b434d88563] |
nptl/pthread_create.c:463(start_thread)[0x7ff0044686db]
|
Attachments
Issue Links
- relates to
-
MDEV-25461 Assertion `je->state == JST_KEY' failed in Geometry::create_from_json
-
- Closed
-
Activity
A shorter testcase:
SELECT ST_GEOMFROMGEOJSON("{\"type\":[]}",1);
|
Leads to:
10.5.3 e8351934b68d6d3ee273292eaa2ece203bb2b846 |
mysqld: /data/10.5_dbg/sql/spatial.cc:513: static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*): Assertion `je->state == JST_KEY' failed.
|
10.5.3 e8351934b68d6d3ee273292eaa2ece203bb2b846 |
Core was generated by `/data/MD020420-mariadb-10.5.3-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 0x7fe029164700 (LWP 10812))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x00005647fd9bbbf6 in my_write_core (sig=sig@entry=6) at /data/10.5_dbg/mysys/stacktrace.c:518
|
#2 0x00005647fd1612b7 in handle_fatal_signal (sig=6) at /data/10.5_dbg/sql/signal_handler.cc:325
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007fe0278a8801 in __GI_abort () at abort.c:79
|
#6 0x00007fe02789839a in __assert_fail_base (fmt=0x7fe027a1f7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5647fdd0429d "je->state == JST_KEY", file=file@entry=0x5647fdd04201 "/data/10.5_dbg/sql/spatial.cc", line=line@entry=513, function=function@entry=0x5647fdd046a0 <Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*)::__PRETTY_FUNCTION__> "static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*)") at assert.c:92
|
#7 0x00007fe027898412 in __GI___assert_fail (assertion=assertion@entry=0x5647fdd0429d "je->state == JST_KEY", file=file@entry=0x5647fdd04201 "/data/10.5_dbg/sql/spatial.cc", line=line@entry=513, function=function@entry=0x5647fdd046a0 <Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*)::__PRETTY_FUNCTION__> "static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*)") at assert.c:101
|
#8 0x00005647fd31914f in Geometry::create_from_json (buffer=buffer@entry=0x7fe029162000, je=je@entry=0x7fe029161f10, er_on_3D=er_on_3D@entry=true, res=res@entry=0x7fe029162130) at /data/10.5_dbg/sql/spatial.cc:513
|
#9 0x00005647fd20ec0c in Item_func_geometry_from_json::val_str (this=0x7fdff9c748e8, str=0x7fe029162130) at /data/10.5_dbg/sql/item_geofunc.cc:159
|
#10 0x00005647fd09d250 in Type_handler::Item_send_str (this=<optimized out>, item=0x7fdff9c748e8, protocol=0x7fdff9c15650, buf=<optimized out>) at /data/10.5_dbg/sql/sql_type.cc:7137
|
#11 0x00005647fcff267d in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /data/10.5_dbg/sql/sql_type.h:5180
|
#12 0x00005647fcdc907f in Item::send (this=0x7fdff9c748e8, protocol=0x7fdff9c15650, buffer=0x7fe029162100) at /data/10.5_dbg/sql/item.h:1054
|
#13 0x00005647fcdc6def in Protocol::send_result_set_row (this=this@entry=0x7fdff9c15650, row_items=row_items@entry=0x7fdff9c74410) at /data/10.5_dbg/sql/protocol.cc:1082
|
#14 0x00005647fce592ce in select_send::send_data (this=0x7fdff9c752c0, items=...) at /data/10.5_dbg/sql/sql_class.cc:3006
|
#15 0x00005647fcf354a9 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=..., this=<optimized out>) at /data/10.5_dbg/sql/sql_class.h:5235
|
#16 JOIN::exec_inner (this=this@entry=0x7fdff9c752e8) at /data/10.5_dbg/sql/sql_select.cc:4331
|
#17 0x00005647fcf36289 in JOIN::exec (this=this@entry=0x7fdff9c752e8) at /data/10.5_dbg/sql/sql_select.cc:4244
|
#18 0x00005647fcf3459e in mysql_select (thd=thd@entry=0x7fdff9c15088, tables=<optimized out>, fields=..., conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fdff9c752c0, unit=0x7fdff9c19090, select_lex=0x7fdff9c742c0) at /data/10.5_dbg/sql/sql_select.cc:4668
|
#19 0x00005647fcf348cd in handle_select (thd=thd@entry=0x7fdff9c15088, lex=lex@entry=0x7fdff9c18fc8, result=result@entry=0x7fdff9c752c0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/10.5_dbg/sql/sql_select.cc:417
|
#20 0x00005647fcebeea0 in execute_sqlcom_select (thd=thd@entry=0x7fdff9c15088, all_tables=0x0) at /data/10.5_dbg/sql/sql_parse.cc:6168
|
#21 0x00005647fceb78f3 in mysql_execute_command (thd=thd@entry=0x7fdff9c15088) at /data/10.5_dbg/sql/sql_parse.cc:3901
|
#22 0x00005647fcec4ed7 in mysql_parse (thd=thd@entry=0x7fdff9c15088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fe029163450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/10.5_dbg/sql/sql_parse.cc:7953
|
#23 0x00005647fceb0c1f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fdff9c15088, packet=packet@entry=0x7fdff9c67089 "", packet_length=packet_length@entry=44, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/10.5_dbg/sql/sql_parse.cc:1839
|
#24 0x00005647fceaf475 in do_command (thd=0x7fdff9c15088) at /data/10.5_dbg/sql/sql_parse.cc:1358
|
#25 0x00005647fd00a391 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7fe0000433a8, put_in_cache=put_in_cache@entry=true) at /data/10.5_dbg/sql/sql_connect.cc:1422
|
#26 0x00005647fd00a6c0 in handle_one_connection (arg=arg@entry=0x7fe0000433a8) at /data/10.5_dbg/sql/sql_connect.cc:1319
|
#27 0x00005647fd46aa40 in pfs_spawn_thread (arg=0x7fe026c45888) at /data/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#28 0x00007fe02858b6db in start_thread (arg=0x7fe029164700) at pthread_create.c:463
|
#29 0x00007fe02798988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.3 (dbg)
Bug confirmed not present in:
MariaDB: 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.3 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)
One more testcase;
SELECT ST_GEOMFROMGEOJSON("{\"\":\"\",\"coordinates\":[0]}");
|
And one more, leading to a slightly different stack/codepath:
SELECT ST_ASTEXT(ST_GEOMFROMGEOJSON("{ \"type\": \"GEOMETRYcLECTION\",\"coordinates\": [0.0,0.0]}"));
|
10.5.3 364e7a9ae6b5fbf69494cec30733b5ad28738cbb |
Core was generated by `/test/MD110420-mariadb-10.5.3-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 0x7fc33ca9f700 (LWP 25287))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
|
#1 0x000055b00a11d21e in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
|
#2 0x000055b0098c308f in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007fc33b1e3801 in __GI_abort () at abort.c:79
|
#6 0x00007fc33b1d339a in __assert_fail_base (fmt=0x7fc33b35a7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55b00a46471d "je->state == JST_KEY", file=file@entry=0x55b00a464681 "/test/10.5_dbg/sql/spatial.cc", line=line@entry=513, function=function@entry=0x55b00a464b20 <Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*)::__PRETTY_FUNCTION__> "static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*)") at assert.c:92
|
#7 0x00007fc33b1d3412 in __GI___assert_fail (assertion=assertion@entry=0x55b00a46471d "je->state == JST_KEY", file=file@entry=0x55b00a464681 "/test/10.5_dbg/sql/spatial.cc", line=line@entry=513, function=function@entry=0x55b00a464b20 <Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*)::__PRETTY_FUNCTION__> "static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*)") at assert.c:101
|
#8 0x000055b009a7adc1 in Geometry::create_from_json (buffer=buffer@entry=0x7fc33ca9cf40, je=je@entry=0x7fc33ca9ce50, er_on_3D=er_on_3D@entry=false, res=res@entry=0x7fc33ca9cfb0) at /test/10.5_dbg/sql/spatial.cc:513
|
#9 0x000055b009970af8 in Item_func_geometry_from_json::val_str (this=0x7fc30e874938, str=0x7fc33ca9cfb0) at /test/10.5_dbg/sql/item_geofunc.cc:159
|
#10 0x000055b009971eeb in Item_func_as_wkt::val_str_ascii (this=0x7fc30e874aa0, str=0x7fc33ca9d130) at /test/10.5_dbg/sql/item_geofunc.cc:201
|
#11 0x000055b009994574 in Item_func::val_str_from_val_str_ascii (this=0x7fc30e874aa0, str=0x7fc33ca9d130, ascii_buffer=0x7fc30e874b68) at /test/10.5_dbg/sql/item_strfunc.cc:98
|
#12 0x000055b009940f88 in Item_str_ascii_func::val_str (this=<optimized out>, str=<optimized out>) at /test/10.5_dbg/sql/item_strfunc.h:88
|
#13 0x000055b0097fe96c in Type_handler::Item_send_str (this=<optimized out>, item=0x7fc30e874aa0, protocol=0x7fc30e815650, buf=<optimized out>) at /test/10.5_dbg/sql/sql_type.cc:7137
|
#14 0x000055b009753a0f 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:5180
|
#15 0x000055b00952b23f in Item::send (this=0x7fc30e874aa0, protocol=0x7fc30e815650, buffer=0x7fc33ca9d100) at /test/10.5_dbg/sql/item.h:1054
|
#16 0x000055b009528faf in Protocol::send_result_set_row (this=this@entry=0x7fc30e815650, row_items=row_items@entry=0x7fc30e874480) at /test/10.5_dbg/sql/protocol.cc:1082
|
#17 0x000055b0095bafa8 in select_send::send_data (this=0x7fc30e8754b0, items=...) at /test/10.5_dbg/sql/sql_class.cc:3006
|
#18 0x000055b009696e8b in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=..., this=<optimized out>) at /test/10.5_dbg/sql/sql_class.h:5236
|
#19 JOIN::exec_inner (this=this@entry=0x7fc30e8754d8) at /test/10.5_dbg/sql/sql_select.cc:4331
|
#20 0x000055b009697c6b in JOIN::exec (this=this@entry=0x7fc30e8754d8) at /test/10.5_dbg/sql/sql_select.cc:4244
|
#21 0x000055b009695f80 in mysql_select (thd=thd@entry=0x7fc30e815088, tables=<optimized out>, fields=..., conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fc30e8754b0, unit=0x7fc30e819090, select_lex=0x7fc30e874330) at /test/10.5_dbg/sql/sql_select.cc:4668
|
#22 0x000055b0096962af in handle_select (thd=thd@entry=0x7fc30e815088, lex=lex@entry=0x7fc30e818fc8, result=result@entry=0x7fc30e8754b0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
|
#23 0x000055b00962099a in execute_sqlcom_select (thd=thd@entry=0x7fc30e815088, all_tables=0x0) at /test/10.5_dbg/sql/sql_parse.cc:6168
|
#24 0x000055b0096193ed in mysql_execute_command (thd=thd@entry=0x7fc30e815088) at /test/10.5_dbg/sql/sql_parse.cc:3901
|
#25 0x000055b0096269d1 in mysql_parse (thd=thd@entry=0x7fc30e815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fc33ca9e450, 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:7953
|
#26 0x000055b009612719 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fc30e815088, packet=packet@entry=0x7fc30e867089 "", packet_length=packet_length@entry=100, 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:1839
|
#27 0x000055b009610f6f in do_command (thd=0x7fc30e815088) at /test/10.5_dbg/sql/sql_parse.cc:1358
|
#28 0x000055b00976ba53 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7fc3130433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
|
#29 0x000055b00976bd82 in handle_one_connection (arg=arg@entry=0x7fc3130433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
|
#30 0x000055b009bcc080 in pfs_spawn_thread (arg=0x7fc33a445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
|
#31 0x00007fc33bec66db in start_thread (arg=0x7fc33ca9f700) at pthread_create.c:463
|
#32 0x00007fc33b2c488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Testcase summary so far, inc new one. May be good to add all these to MTR?
SELECT ST_GEOMFROMGEOJSON("{\"type\":[]}",1);
|
SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
|
SELECT ST_ASTEXT(ST_GEOMFROMGEOJSON("{ \"type\": [ \"Point\" ],\"coordinates\": [10,15] }",1,0));
|
SELECT ST_GEOMFROMGEOJSON("{ \"type\": [ \"Point\" ], \"coordinates\": [10, 10] }");
|
SELECT ST_GEOMFROMGEOJSON("{\"\":\"\",\"coordinates\":[0]}");
|
SELECT ST_ASTEXT(ST_GEOMFROMGEOJSON("{ \"type\": \"GEOMETRYcLECTION\",\"coordinates\": [0.0,0.0]}"));
|
SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"FeatureCollection\", \"coordinates\": [10, 10] }");
|
SELECT st_astext (st_geomfromgeojson ("{ \"type1234567890\": \"POINT\", \"coORdinates\": [102, 11]}"));
|
This testcase:
# mysqld options required for replay: --log-bin
|
SET SQL_MODE='';
|
SET @@enforce_storage_engine=MyISAM;
|
CREATE TABLE t1 (a INT) ENGINE=RocksDB SELECT 42 a;
|
SET GLOBAL wsrep_forced_binlog_format=STATEMENT;
|
REPLACE DELAYED t1 VALUES (5);
|
SELECT ST_ASTEXT (ST_GEOMFROMGEOJSON ("{ \"type1234567890\": \"POINT\", \"coordinates\": [102, 11]}"));
|
Can lead (not fully consistent it seems) to the following assert which is related to this ticket:
10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 |
mysqld: /test/10.6_dbg/sql/sql_insert.cc:3491: bool Delayed_insert::handle_inserts(): Assertion `!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()' failed.
|
10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 |
Core was generated by `/test/MD211020-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --max_a'.
|
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 0x150b181f8700 (LWP 651031))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000150b2ccb3859 in __GI_abort () at abort.c:79
|
#2 0x0000150b2ccb3729 in __assert_fail_base (fmt=0x150b2ce49588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x564dbc1ea011 "je->state == JST_KEY", file=0x564dbc1e9f59 "/test/10.6_dbg/sql/spatial.cc", line=513, function=<optimized out>) at assert.c:92
|
#3 0x0000150b2ccc4f36 in __GI___assert_fail (assertion=assertion@entry=0x564dbc1ea011 "je->state == JST_KEY", file=file@entry=0x564dbc1e9f59 "/test/10.6_dbg/sql/spatial.cc", line=line@entry=513, function=function@entry=0x564dbc1ea450 "static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*)") at assert.c:101
|
#4 0x0000564dbb7fb108 in Geometry::create_from_json (buffer=buffer@entry=0x150b181f6140, je=je@entry=0x150b181f6050, er_on_3D=er_on_3D@entry=false, res=res@entry=0x150b181f61b0) at /test/10.6_dbg/sql/spatial.cc:513
|
#5 0x0000564dbb6d7492 in Item_func_geometry_from_json::val_str (this=0x150ad47990d0, str=0x150b181f61b0) at /test/10.6_dbg/sql/item_geofunc.cc:159
|
#6 0x0000564dbb6d878b in Item_func_as_wkt::val_str_ascii (this=0x150ad47992e0, str=0x150ad47993a8) at /test/10.6_dbg/sql/item_geofunc.cc:201
|
#7 0x0000564dbb7024f3 in Item_func::val_str_from_val_str_ascii (this=0x150ad47992e0, str=0x150b181f6340, ascii_buffer=0x150ad47993a8) at /test/10.6_dbg/sql/item_strfunc.cc:107
|
#8 0x0000564dbb6a06a8 in Item_str_ascii_func::val_str (this=<optimized out>, str=<optimized out>) at /test/10.6_dbg/sql/item_strfunc.h:88
|
#9 0x0000564dbb542854 in Type_handler::Item_send_str (this=<optimized out>, item=0x150ad47992e0, protocol=0x150ad4001380, buf=<optimized out>) at /test/10.6_dbg/sql/sql_type.cc:7343
|
#10 0x0000564dbb48c41f in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/10.6_dbg/sql/sql_type.h:5336
|
#11 0x0000564dbb24531a in Item::send (this=0x150ad47992e0, protocol=0x150ad4001380, buffer=0x150b181f6310) at /test/10.6_dbg/sql/item.h:1060
|
#12 0x0000564dbb24281c in Protocol::send_result_set_row (this=this@entry=0x150ad4001380, row_items=row_items@entry=0x150ad4798a60) at /test/10.6_dbg/sql/protocol.cc:1080
|
#13 0x0000564dbb2dbefd in select_send::send_data (this=0x150ad4799d90, items=@0x150ad4798a60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150ad47993c8, last = 0x150ad47993c8, elements = 1}, <No data fields>}) at /test/10.6_dbg/sql/sql_class.cc:3024
|
#14 0x0000564dbb3cd84c in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5309
|
#15 JOIN::exec_inner (this=this@entry=0x150ad4799db8) at /test/10.6_dbg/sql/sql_select.cc:4333
|
#16 0x0000564dbb3ce733 in JOIN::exec (this=this@entry=0x150ad4799db8) at /test/10.6_dbg/sql/sql_select.cc:4246
|
#17 0x0000564dbb3cc944 in mysql_select (thd=thd@entry=0x150ad4000db8, tables=0x0, fields=@0x150ad4798a60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150ad47993c8, last = 0x150ad47993c8, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2224974848, result=0x150ad4799d90, unit=0x150ad4004f40, select_lex=0x150ad4798910) at /test/10.6_dbg/sql/sql_select.cc:4673
|
#18 0x0000564dbb3ccc72 in handle_select (thd=thd@entry=0x150ad4000db8, lex=lex@entry=0x150ad4004e78, result=result@entry=0x150ad4799d90, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:417
|
#19 0x0000564dbb34038e in execute_sqlcom_select (thd=thd@entry=0x150ad4000db8, all_tables=0x0) at /test/10.6_dbg/sql/sql_parse.cc:6062
|
#20 0x0000564dbb34caea in mysql_execute_command (thd=thd@entry=0x150ad4000db8) at /test/10.6_dbg/sql/sql_parse.cc:3784
|
#21 0x0000564dbb338fd2 in mysql_parse (thd=thd@entry=0x150ad4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150b181f73d0) at /test/10.6_dbg/sql/sql_parse.cc:7833
|
#22 0x0000564dbb3470c7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150ad4000db8, packet=packet@entry=0x150ad4dc7769 "", packet_length=packet_length@entry=102) at /test/10.6_dbg/sql/sql_class.h:1253
|
#23 0x0000564dbb34a3d2 in do_command (thd=0x150ad4000db8) at /test/10.6_dbg/sql/sql_parse.cc:1343
|
#24 0x0000564dbb4a4994 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x564dbf44d5c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
|
#25 0x0000564dbb4a509b in handle_one_connection (arg=arg@entry=0x564dbf44d5c8) at /test/10.6_dbg/sql/sql_connect.cc:1312
|
#26 0x0000564dbb958abb in pfs_spawn_thread (arg=0x564dbf370728) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
|
#27 0x0000150b2d1c1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#28 0x0000150b2cdb0293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
If it is not clear why this is caused from the stack, or if the testcase does not repeat after a number of tries, I can do more testing in this area. Note to self: ~/KEEP/812107/30.
This one seems much more reliable to reproduce the same assert:
# mysqld options required for replay: --log-bin
|
CREATE TABLE t1 (ROWID INT, f1 INT, f2 INT, KEY i1 (f1, f2), KEY i2 (f2)) ENGINE=MyISAM;
|
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
|
INSERT DELAYED INTO t1 VALUES ('24','1','1');
|
SELECT ST_GEOMFROMGEOJSON ("{ \"type\": \"Feature\", \"GEOMETRY\": [10, 20] }");
|
Leads to:
10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug) |
mysqld: /test/10.6_dbg/sql/sql_insert.cc:3491: bool Delayed_insert::handle_inserts(): Assertion `!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()' failed.
|
10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug) |
Core was generated by `/test/MD211020-mariadb-10.6.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 0x150b640b4700 (LWP 2706510))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000150b655b2859 in __GI_abort () at abort.c:79
|
#2 0x0000150b655b2729 in __assert_fail_base (fmt=0x150b65748588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ced7671d98 "!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()", file=0x55ced7671648 "/test/10.6_dbg/sql/sql_insert.cc", line=3491, function=<optimized out>) at assert.c:92
|
#3 0x0000150b655c3f36 in __GI___assert_fail (assertion=assertion@entry=0x55ced7671d98 "!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()", file=file@entry=0x55ced7671648 "/test/10.6_dbg/sql/sql_insert.cc", line=line@entry=3491, function=function@entry=0x55ced7671de0 "bool Delayed_insert::handle_inserts()") at assert.c:101
|
#4 0x000055ced6945dc5 in Delayed_insert::handle_inserts (this=this@entry=0x150b0c0242f8) at /test/10.6_dbg/sql/log.h:324
|
#5 0x000055ced6947fa7 in handle_delayed_insert (arg=arg@entry=0x150b0c0242f8) at /test/10.6_dbg/sql/sql_insert.cc:3284
|
#6 0x000055ced6fa0abb in pfs_spawn_thread (arg=0x150b0c02eb48) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
|
#7 0x0000150b65ac0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#8 0x0000150b656af293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.2.35 (dbg), 10.3.26 (dbg), 10.4.16 (dbg), 10.5.7 (dbg), 10.6.0 (dbg)
Bug confirmed not present in:
MariaDB: 10.1.48 (dbg), 10.1.48 (opt), 10.2.35 (opt), 10.3.26 (opt), 10.4.16 (opt), 10.5.7 (opt), 10.6.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)
The last two testcase generate various different stacks accross versions:
!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()|SIGABRT|Geometry::create_from_json|Item_func_geometry_from_json::val_str|Item_func_as_wkt::val_str_ascii|Item_func::val_str_from_val_str_ascii
|
!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()|SIGABRT|Geometry::create_from_json|Item_func_geometry_from_json::val_str|Type_handler::Item_send_str|Type_handler_string_result::Item_send
|
!(mysql_bin_log.is_open() && !thd.is_current_stmt_binlog_format_row())|SIGABRT|Geometry::create_from_json|Item_func_geometry_from_json::val_str|Item::send|Protocol::send_result_set_row
|
!(mysql_bin_log.is_open() && !thd.is_current_stmt_binlog_format_row())|SIGABRT|Geometry::create_from_json|Item_func_geometry_from_json::val_str|Type_handler::Item_send_str|Type_handler_string_result::Item_send
|
This bug is also seen regularly in testing
Thanks! Repeatable as described on 10.2-10.4:
10.2 cbac8f935182ecc5bb907de3a
/10.2/sql/spatial.cc:395: static Geometry* Geometry::create_from_json(Geometry_buffer*, json_engine_t*, bool, String*): Assertion `je->state == JST_KEY' failed.
190611 10:25:08 [ERROR] mysqld got signal 6 ;
sql/spatial.cc:397(Geometry::create_from_json(Geometry_buffer*, st_json_engine_t*, bool, String*))[0x55aa280ce97a]
sql/item_geofunc.cc:166(Item_func_geometry_from_json::val_str(String*))[0x55aa27e876a9]
sql/item.cc:6890(Item::send(Protocol*, String*))[0x55aa27d81415]
sql/protocol.cc:979(Protocol::send_result_set_row(List<Item>*))[0x55aa27594fe0]
sql/sql_class.cc:2723(select_send::send_data(List<Item>&))[0x55aa276af69c]
sql/sql_select.cc:3499(JOIN::exec_inner())[0x55aa278015e5]
sql/sql_select.cc:3421(JOIN::exec())[0x55aa27800462]
sql/sql_select.cc:3822(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*))[0x55aa278037af]
sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55aa277e2ea3]
sql/sql_parse.cc:6493(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55aa2776a93f]
sql/sql_parse.cc:3534(mysql_execute_command(THD*))[0x55aa27757d34]
sql/sql_parse.cc:8027(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55aa277730a3]
sql/sql_parse.cc:1835(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55aa2774e72d]
sql/sql_parse.cc:1387(do_command(THD*))[0x55aa2774b8aa]
sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x55aa27a75e04]
sql/sql_connect.cc:1242(handle_one_connection)[0x55aa27a7580c]
perfschema/pfs.cc:1864(pfs_spawn_thread)[0x55aa28c26d96]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f26cf3556ba]
x86_64/clone.S:111(clone)[0x7f26ce7ea41d]
Query (0x62b000000410): SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }")
on non-debug:
MariaDB [test]> SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
+-------------------------------------------------------------------------+
| ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }") |
+-------------------------------------------------------------------------+
| NULL |
+-------------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)
Warning (Code 4037): Unexpected end of JSON text in argument 1 to function 'st_geomfromgeojson'