Bug #90140 mysql-5.7.21 coredump on ut0ut.cc ine942
Submitted: 20 Mar 2018 13:28 Modified: 20 Mar 2018 15:33
Reporter: yghmgl yang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.7.21-debug OS:Any
Assigned to: CPU Architecture:Any

[20 Mar 2018 13:28] yghmgl yang
Description:
(gdb) bt
#0  0x00007f0530f98741 in pthread_kill () from /lib64/libpthread.so.0
#1  0x000000000185a539 in my_write_core (sig=6) at /sda/source/mysql-server/mysys/stacktrace.c:249
#2  0x0000000000ea0712 in handle_fatal_signal (sig=6) at /sda/source/mysql-server/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f052fd9c1d7 in raise () from /lib64/libc.so.6
#5  0x00007f052fd9d8c8 in abort () from /lib64/libc.so.6
#6  0x0000000001b27fc3 in ut_dbg_assertion_failed (expr=0x0, file=0x2190af8 "/sda/source/mysql-server/storage/innobase/ut/ut0ut.cc", line=942)
    at /sda/source/mysql-server/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001b2c6dc in ib::fatal::~fatal (this=0x7f05240cc3a0, __in_chrg=<optimized out>) at /sda/source/mysql-server/storage/innobase/ut/ut0ut.cc:942
#8  0x0000000001bb14e4 in dfield_check_typed (field=0x7f05181b80a8) at /sda/source/mysql-server/storage/innobase/data/data0data.cc:176
#9  0x0000000001bb154b in dtuple_check_typed (tuple=0x7f0418943598) at /sda/source/mysql-server/storage/innobase/data/data0data.cc:199
#10 0x0000000001c5d885 in rec_get_converted_size (index=0x7f041802e0a0, dtuple=0x7f0418943598, n_ext=0) at /sda/source/mysql-server/storage/innobase/include/rem0rec.ic:1632
#11 0x0000000001c5fe19 in rtr_page_split_initialize_nodes (heap=0x7f0418943438, cursor=0x7f05240cca30, offsets=0x7f05240ccb48, tuple=0x7f0418943598, buf_pos=0x7f05240cc6f8)
    at /sda/source/mysql-server/storage/innobase/gis/gis0rtree.cc:114
#12 0x0000000001c621cd in rtr_page_split_and_insert (flags=7, cursor=0x7f05240cca30, offsets=0x7f05240ccb48, heap=0x7f05240ccb40, tuple=0x7f0418943598, n_ext=0,
    mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/gis/gis0rtree.cc:1064
#13 0x0000000001b3f539 in btr_root_raise_and_insert (flags=7, cursor=0x7f05240cca30, offsets=0x7f05240ccb48, heap=0x7f05240ccb40, tuple=0x7f0418943598, n_ext=0,
    mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/btr/btr0btr.cc:1769
#14 0x0000000001b5828c in btr_cur_pessimistic_insert (flags=7, cursor=0x7f05240cca30, offsets=0x7f05240ccb48, heap=0x7f05240ccb40, entry=0x7f0418943598,
    rec=0x7f05240ccb00, big_rec=0x7f05240ccb08, n_ext=0, thr=0x0, mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/btr/btr0cur.cc:3425
#15 0x0000000001c61488 in rtr_adjust_upper_level (sea_cur=0x7f05240cd050, flags=0, block=0x7f05179c4b68, new_block=0x7f05179c5808, mbr=0x7f05240ccc60,
    new_mbr=0x7f05240ccc80, direction=111, mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/gis/gis0rtree.cc:737
#16 0x0000000001c62b3f in rtr_page_split_and_insert (flags=0, cursor=0x7f05240cd050, offsets=0x7f05240ce090, heap=0x7f05240cd010, tuple=0x7f0418011fb0, n_ext=0,
    mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/gis/gis0rtree.cc:1277
#17 0x0000000001b41080 in btr_page_split_and_insert (flags=0, cursor=0x7f05240cd050, offsets=0x7f05240ce090, heap=0x7f05240cd010, tuple=0x7f0418011fb0, n_ext=0,
    mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/btr/btr0btr.cc:2547
#18 0x0000000001b582bd in btr_cur_pessimistic_insert (flags=0, cursor=0x7f05240cd050, offsets=0x7f05240ce090, heap=0x7f05240cd010, entry=0x7f0418011fb0,
    rec=0x7f05240ce088, big_rec=0x7f05240ce080, n_ext=0, thr=0x7f0418031288, mtr=0x7f05240cd410) at /sda/source/mysql-server/storage/innobase/btr/btr0cur.cc:3428
#19 0x0000000001a35604 in row_ins_sec_index_entry_low (flags=0, mode=33, index=0x7f041802e0a0, offsets_heap=0x7f0418942a18, heap=0x7f0418942ec8, entry=0x7f0418011fb0,
    trx_id=0, thr=0x7f0418031288, dup_chk_only=false) at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3180
#20 0x0000000001a35f59 in row_ins_sec_index_entry (index=0x7f041802e0a0, entry=0x7f0418011fb0, thr=0x7f0418031288, dup_chk_only=false)
    at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3410
#21 0x0000000001a36101 in row_ins_index_entry (index=0x7f041802e0a0, entry=0x7f0418011fb0, thr=0x7f0418031288)
    at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3459
#22 0x0000000001a3660a in row_ins_index_entry_step (node=0x7f0418030ff0, thr=0x7f0418031288) at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3607
#23 0x0000000001a36979 in row_ins (node=0x7f0418030ff0, thr=0x7f0418031288) at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3749
#24 0x0000000001a36f72 in row_ins_step (thr=0x7f0418031288) at /sda/source/mysql-server/storage/innobase/row/row0ins.cc:3934
#25 0x0000000001a53a39 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7f041802c500 "\376/\001", prebuilt=0x7f0418030a20)
    at /sda/source/mysql-server/storage/innobase/row/row0mysql.cc:1738
#26 0x0000000001a53fa9 in row_insert_for_mysql (mysql_rec=0x7f041802c500 "\376/\001", prebuilt=0x7f0418030a20)
    at /sda/source/mysql-server/storage/innobase/row/row0mysql.cc:1862
#27 0x000000000191013e in ha_innobase::write_row (this=0x7f041802c210, record=0x7f041802c500 "\376/\001")
    at /sda/source/mysql-server/storage/innobase/handler/ha_innodb.cc:7562
#28 0x0000000000f24eab in handler::ha_write_row (this=0x7f041802c210, buf=0x7f041802c500 "\376/\001") at /sda/source/mysql-server/sql/handler.cc:7992
#29 0x00000000017473da in write_record (thd=0x7f0418000b70, table=0x7f0418010430, info=0x7f05240cf1f0, update=0x7f05240cf270)
    at /sda/source/mysql-server/sql/sql_insert.cc:1873
#30 0x00000000017445a2 in Sql_cmd_insert::mysql_insert (this=0x7f041802f340, thd=0x7f0418000b70, table_list=0x7f041802e9a0)
    at /sda/source/mysql-server/sql/sql_insert.cc:769
#31 0x000000000174ae51 in Sql_cmd_insert::execute (this=0x7f041802f340, thd=0x7f0418000b70) at /sda/source/mysql-server/sql/sql_insert.cc:3107
#32 0x0000000001523ae0 in mysql_execute_command (thd=0x7f0418000b70, first_level=true) at /sda/source/mysql-server/sql/sql_parse.cc:3566
#33 0x0000000001529311 in mysql_parse (thd=0x7f0418000b70, parser_state=0x7f05240d0690) at /sda/source/mysql-server/sql/sql_parse.cc:5582
#34 0x000000000151eb9c in dispatch_command (thd=0x7f0418000b70, com_data=0x7f05240d0df0, command=COM_QUERY) at /sda/source/mysql-server/sql/sql_parse.cc:1458
#35 0x000000000151dad0 in do_command (thd=0x7f0418000b70) at /sda/source/mysql-server/sql/sql_parse.cc:999
#36 0x000000000164e2ca in handle_connection (arg=0x971cfb0) at /sda/source/mysql-server/sql/conn_handler/connection_handler_per_thread.cc:300
#37 0x000000000188d08b in pfs_spawn_thread (arg=0x963d990) at /sda/source/mysql-server/storage/perfschema/pfs.cc:2190
#38 0x00007f0530f93dc5 in start_thread () from /lib64/libpthread.so.0
#39 0x00007f052fe5e76d in clone () from /lib64/libc.so.6

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(fid INT KEY,g POLYGON NOT NULL,a int,spatial index (g)) engine=InnoDB;#NOERROR
SET GLOBAL innodb_limit_optimistic_insert_debug=2;#NOERROR
INSERT INTO t1 VALUES(300,ST_PolygonFromText('POLYGON((183670 10,2470 10,20 249380,10 254760,183670 10))'),12),(301,ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))'),2),(302,ST_PolygonFromText('POLYGON((110 10,320 310,2550 8520,1059 2590,110 10))'),2),(303,ST_PolygonFromText('POLYGON((180 160,55620 5610,240 206560,10 285960,180 160))'),2);
[20 Mar 2018 15:33] Miguel Solorzano
Thank you for the bug report.

2018-03-20T15:28:42.806020Z 0 [Note] /home/miguel/dbs/5.7/bin/mysqld: ready for connections.
Version: '5.7.23-debug'  socket: '/tmp/mysql57.sock'  port: 3357  Source distribution
2018-03-20T15:29:02.057066Z 2 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2018-03-20T15:30:18.917002Z 4 [ERROR] [FATAL] InnoDB: Data field type 0, len 1084484608
2018-03-20 12:30:18 0x7fa704255700  InnoDB: Assertion failure in thread 140355305821952 in file ut0ut.cc line 942
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
15:30:18 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68260 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fa6a8000dd0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fa704254e20 thread_stack 0x40000
/home/miguel/dbs/5.7/bin/mysqld(my_print_stacktrace+0x35)[0x18ab144]
/home/miguel/dbs/5.7/bin/mysqld(handle_fatal_signal+0x3e4)[0xefe41b]
/lib64/libpthread.so.0(+0x12af0)[0x7fa70d397af0]
/lib64/libc.so.6(gsignal+0xcb)[0x7fa70bea266b]
/lib64/libc.so.6(abort+0x141)[0x7fa70bea4381]
/home/miguel/dbs/5.7/bin/mysqld[0x1b2ca63]
/home/miguel/dbs/5.7/bin/mysqld(_ZN2ib5fatalD1Ev+0x62)[0x1b313e6]
/home/miguel/dbs/5.7/bin/mysqld(_Z18dfield_check_typedPK8dfield_t+0xff)[0x1bbd20d]
/home/miguel/dbs/5.7/bin/mysqld(_Z18dtuple_check_typedPK8dtuple_t+0x4e)[0x1bbd289]
/home/miguel/dbs/5.7/bin/mysqld[0x1c7063d]
/home/miguel/dbs/5.7/bin/mysqld[0x1c72de5]
/home/miguel/dbs/5.7/bin/mysqld(_Z25rtr_page_split_and_insertmP9btr_cur_tPPmPP16mem_block_info_tPK8dtuple_tmP5mtr_t+0x363)[0x1c7524b]
/home/miguel/dbs/5.7/bin/mysqld(_Z25btr_root_raise_and_insertmP9btr_cur_tPPmPP16mem_block_info_tPK8dtuple_tmP5mtr_t+0x7b8)[0x1b44eb6]
/home/miguel/dbs/5.7/bin/mysqld(_Z26btr_cur_pessimistic_insertmP9btr_cur_tPPmPP16mem_block_info_tP8dtuple_tPPhPP9big_rec_tmP9que_thr_tP5mtr_t+0x3f7)[0x1b5eed5]
/home/miguel/dbs/5.7/bin/mysqld[0x1c74468]
/home/miguel/dbs/5.7/bin/mysqld(_Z25rtr_page_split_and_insertmP9btr_cur_tPPmPP16mem_block_info_tPK8dtuple_tmP5mtr_t+0xce4)[0x1c75bcc]
/home/miguel/dbs/5.7/bin/mysqld(_Z25btr_page_split_and_insertmP9btr_cur_tPPmPP16mem_block_info_tPK8dtuple_tmP5mtr_t+0xa9)[0x1b46aa8]
/home/miguel/dbs/5.7/bin/mysqld(_Z26btr_cur_pessimistic_insertmP9btr_cur_tPPmPP16mem_block_info_tP8dtuple_tPPhPP9big_rec_tmP9que_thr_tP5mtr_t+0x434)[0x1b5ef12]
/home/miguel/dbs/5.7/bin/mysqld(_Z27row_ins_sec_index_entry_lowmmP12dict_index_tP16mem_block_info_tS2_P8dtuple_tmP9que_thr_tb+0xfcd)[0x1a3141e]
/home/miguel/dbs/5.7/bin/mysqld(_Z23row_ins_sec_index_entryP12dict_index_tP8dtuple_tP9que_thr_tb+0x1b9)[0x1a31dd1]
/home/miguel/dbs/5.7/bin/mysqld[0x1a31f7e]
/home/miguel/dbs/5.7/bin/mysqld[0x1a324bc]
/home/miguel/dbs/5.7/bin/mysqld[0x1a32855]
/home/miguel/dbs/5.7/bin/mysqld(_Z12row_ins_stepP9que_thr_t+0x2c8)[0x1a32e7e]
/home/miguel/dbs/5.7/bin/mysqld[0x1a509d2]
/home/miguel/dbs/5.7/bin/mysqld(_Z20row_insert_for_mysqlPKhP14row_prebuilt_t+0x4c)[0x1a50f57]
/home/miguel/dbs/5.7/bin/mysqld(_ZN11ha_innobase9write_rowEPh+0x6e0)[0x18fcc82]
/home/miguel/dbs/5.7/bin/mysqld(_ZN7handler12ha_write_rowEPh+0x23a)[0xf83e20]
/home/miguel/dbs/5.7/bin/mysqld(_Z12write_recordP3THDP5TABLEP9COPY_INFOS4_+0xe71)[0x1796bc5]
/home/miguel/dbs/5.7/bin/mysqld(_ZN14Sql_cmd_insert12mysql_insertEP3THDP10TABLE_LIST+0xdea)[0x1793de0]
/home/miguel/dbs/5.7/bin/mysqld(_ZN14Sql_cmd_insert7executeEP3THD+0x194)[0x179a5e0]
/home/miguel/dbs/5.7/bin/mysqld(_Z21mysql_execute_commandP3THDb+0x2ac5)[0x15797c0]
/home/miguel/dbs/5.7/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x602)[0x157f1ff]
/home/miguel/dbs/5.7/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0xcb8)[0x157484e]
/home/miguel/dbs/5.7/bin/mysqld(_Z10do_commandP3THD+0x4ba)[0x157369e]
/home/miguel/dbs/5.7/bin/mysqld(handle_connection+0x1ee)[0x16a21c0]
/home/miguel/dbs/5.7/bin/mysqld(pfs_spawn_thread+0x173)[0x1d356ee]
/lib64/libpthread.so.0(+0x761b)[0x7fa70d38c61b]
/lib64/libc.so.6(clone+0x3f)[0x7fa70bf8298f]

Trying to get some variables.
[20 Mar 2018 15:35] Miguel Solorzano
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.23-debug Source distribution

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.7 > DROP DATABASE test;CREATE DATABASE test;USE test;
Query OK, 3 rows affected (0.70 sec)

Query OK, 1 row affected (0.00 sec)

Database changed
mysql 5.7 > CREATE TABLE t1(fid INT KEY,g POLYGON NOT NULL,a int,spatial index (g)) engine=InnoDB;#NOERROR
Query OK, 0 rows affected (0.35 sec)

mysql 5.7 > SET GLOBAL innodb_limit_optimistic_insert_debug=2;#NOERROR
Query OK, 0 rows affected (0.00 sec)

mysql 5.7 > INSERT INTO t1 VALUES(300,ST_PolygonFromText('POLYGON((183670 10,2470 10,20 249380,10 254760,183670 10))'),12),(301,ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))'),2),(302,ST_PolygonFromText('POLYGON((110 10,320 310,2550 8520,1059 2590,110 10))'),2),(303,ST_PolygonFromText('POLYGON((180 160,55620 5610,240 206560,10 285960,180 160))'),2);
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql 5.7 >