Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18047

Crash in dict_foreign_qualify_index or Assertion `index->magic_n == 76789786' or Assertion `pos < index->n_def' failed in dict_index_get_nth_field

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • None

    Description

      The same test case intermittently fails on either of two assertions below. Run with --repeat=N. It fails for me fairly quickly, but it can vary on different builds and machines.
      Alternatively, it can also fail with MDEV-18016 or with MDEV-16654 (on 10.1), so it might be related.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (
        id int(10) unsigned NOT NULL auto_increment,
        c char(120) NOT NULL default '',
        PRIMARY KEY (id)
      ) ENGINE=InnoDB;
      CREATE TABLE t2 (
        id int(10) unsigned NOT NULL auto_increment,
        pad char(60) NOT NULL default '',
        k int(10) unsigned default '0',
        c char(120) NOT NULL default '',
        PRIMARY KEY (id)
      ) ENGINE=InnoDB;
       
      INSERT INTO t2 (pad,k,c) VALUES ('foo',1,'foo'),('bar',2,'bar');
      INSERT INTO t2 (pad,k,c) SELECT pad, k, c FROM t2;
      INSERT INTO t2 (pad,k,c) SELECT pad, k, c FROM t2;
      INSERT INTO t2 (pad,k,c) SELECT pad, k, c FROM t2;
      INSERT INTO t2 (pad,k,c) SELECT pad, k, c FROM t2;
       
      SET FOREIGN_KEY_CHECKS= OFF ;
      ALTER TABLE t1 ADD CONSTRAINT FOREIGN KEY (c) REFERENCES unknown_table(x);
       
      --connect (con1,localhost,root,,test)
      SET FOREIGN_KEY_CHECKS= OFF ;
      --send
        ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c);
       
      --connection default
      --error 0,ER_CANT_CREATE_TABLE
      CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
       
      # Cleanup
      --connection con1
      --error 0,ER_FK_INCORRECT_OPTION
      --reap
      --disconnect con1
      --connection default
      DROP TABLE IF EXISTS t1, t2;
      

      10.2 0c20b247de0

      mysqld: /data/src/10.2/storage/innobase/include/dict0dict.ic:1065: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `index->magic_n == 76789786' failed.
      190108  3:13:08 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f50e1cf6ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055d6caa23783 in dict_index_get_nth_field (index=0x7f5088044598, pos=0) at /data/src/10.2/storage/innobase/include/dict0dict.ic:1065
      #9  0x000055d6caa237ff in dict_index_get_nth_col (index=0x7f5088044598, pos=0) at /data/src/10.2/storage/innobase/include/dict0dict.ic:1120
      #10 0x000055d6caa3597b in dict_foreign_qualify_index (table=0x7f508800b9f8, col_names=0x0, columns=0x7f507c01c538, n_cols=1, index=0x7f507c01f058, types_idx=0x7f5088044598, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:6934
      #11 0x000055d6caa2ca8e in dict_foreign_find_index (table=0x7f508800b9f8, col_names=0x0, columns=0x7f507c01c538, n_cols=1, types_idx=0x7f5088044598, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:3364
      #12 0x000055d6ca7b3d8a in innobase_update_foreign_try (ctx=0x7f507c013138, trx=0x7f50d7c023a8, table_name=0x7f508806ad5d "t2") at /data/src/10.2/storage/innobase/handler/handler0alter.cc:7585
      #13 0x000055d6ca7b963e in commit_try_norebuild (ha_alter_info=0x7f50d40f3610, ctx=0x7f507c013138, altered_table=0x7f507c019b10, old_table=0x7f508806bc60, trx=0x7f50d7c023a8, table_name=0x7f508806ad5d "t2") at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8036
      #14 0x000055d6ca7b5718 in ha_innobase::commit_inplace_alter_table (this=0x7f508806c868, altered_table=0x7f507c019b10, ha_alter_info=0x7f50d40f3610, commit=true) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8668
      #15 0x000055d6ca469acf in handler::ha_commit_inplace_alter_table (this=0x7f508806c868, altered_table=0x7f507c019b10, ha_alter_info=0x7f50d40f3610, commit=true) at /data/src/10.2/sql/handler.cc:4231
      #16 0x000055d6ca2b7792 in mysql_inplace_alter_table (thd=0x7f507c000b00, table_list=0x7f507c0111a0, table=0x7f508806bc60, altered_table=0x7f507c019b10, ha_alter_info=0x7f50d40f3610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f50d40f3680, alter_ctx=0x7f50d40f4240) at /data/src/10.2/sql/sql_table.cc:7391
      #17 0x000055d6ca2bccd3 in mysql_alter_table (thd=0x7f507c000b00, new_db=0x7f507c0117b0 "test", new_name=0x0, create_info=0x7f50d40f4e50, table_list=0x7f507c0111a0, alter_info=0x7f50d40f4da0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9392
      #18 0x000055d6ca338037 in Sql_cmd_alter_table::execute (this=0x7f507c0119b0, thd=0x7f507c000b00) at /data/src/10.2/sql/sql_alter.cc:329
      #19 0x000055d6ca1ef0f0 in mysql_execute_command (thd=0x7f507c000b00) at /data/src/10.2/sql/sql_parse.cc:6228
      #20 0x000055d6ca1f3f51 in mysql_parse (thd=0x7f507c000b00, rawbuf=0x7f507c011088 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", length=51, parser_state=0x7f50d40f6200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8015
      #21 0x000055d6ca1e188b in dispatch_command (command=COM_QUERY, thd=0x7f507c000b00, packet=0x7f507c0088a1 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", packet_length=51, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1826
      #22 0x000055d6ca1e01e2 in do_command (thd=0x7f507c000b00) at /data/src/10.2/sql/sql_parse.cc:1379
      #23 0x000055d6ca332ccd in do_handle_one_connection (connect=0x55d6cda182f0) at /data/src/10.2/sql/sql_connect.cc:1335
      #24 0x000055d6ca332a5a in handle_one_connection (arg=0x55d6cda182f0) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x000055d6ca75897c in pfs_spawn_thread (arg=0x55d6cda36c00) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #26 0x00007f50e39cd494 in start_thread (arg=0x7f50d40f7700) at pthread_create.c:333
      #27 0x00007f50e1db393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.2 0c20b247de0

      mysqld: /data/src/10.2/storage/innobase/include/dict0dict.ic:1064: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `pos < index->n_def' failed.
      190108  3:11:09 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fde615f3ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055f724e42756 in dict_index_get_nth_field (index=0x7fddfc042778, pos=0) at /data/src/10.2/storage/innobase/include/dict0dict.ic:1064
      #9  0x000055f724e427ff in dict_index_get_nth_col (index=0x7fddfc042778, pos=0) at /data/src/10.2/storage/innobase/include/dict0dict.ic:1120
      #10 0x000055f724e5497b in dict_foreign_qualify_index (table=0x7fddfc43fd28, col_names=0x0, columns=0x7fddf0013848, n_cols=1, index=0x7fddf0016218, types_idx=0x7fddfc042778, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:6934
      #11 0x000055f724e4ba8e in dict_foreign_find_index (table=0x7fddfc43fd28, col_names=0x0, columns=0x7fddf0013848, n_cols=1, types_idx=0x7fddfc042778, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:3364
      #12 0x000055f724bd2d8a in innobase_update_foreign_try (ctx=0x7fddf00299c8, trx=0x7fde6025c3a8, table_name=0x7fddfc43f97d "t2") at /data/src/10.2/storage/innobase/handler/handler0alter.cc:7585
      #13 0x000055f724bd863e in commit_try_norebuild (ha_alter_info=0x7fde60176660, ctx=0x7fddf00299c8, altered_table=0x7fddf0011a40, old_table=0x7fddfc4596a0, trx=0x7fde6025c3a8, table_name=0x7fddfc43f97d "t2") at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8036
      #14 0x000055f724bd4718 in ha_innobase::commit_inplace_alter_table (this=0x7fddfc442188, altered_table=0x7fddf0011a40, ha_alter_info=0x7fde60176660, commit=true) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8668
      #15 0x000055f724888acf in handler::ha_commit_inplace_alter_table (this=0x7fddfc442188, altered_table=0x7fddf0011a40, ha_alter_info=0x7fde60176660, commit=true) at /data/src/10.2/sql/handler.cc:4231
      #16 0x000055f7246d6792 in mysql_inplace_alter_table (thd=0x7fddf0000b00, table_list=0x7fddf0027a30, table=0x7fddfc4596a0, altered_table=0x7fddf0011a40, ha_alter_info=0x7fde60176660, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fde601766d0, alter_ctx=0x7fde60177290) at /data/src/10.2/sql/sql_table.cc:7391
      #17 0x000055f7246dbcd3 in mysql_alter_table (thd=0x7fddf0000b00, new_db=0x7fddf0028040 "test", new_name=0x0, create_info=0x7fde60177ea0, table_list=0x7fddf0027a30, alter_info=0x7fde60177df0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9392
      #18 0x000055f724757037 in Sql_cmd_alter_table::execute (this=0x7fddf0028240, thd=0x7fddf0000b00) at /data/src/10.2/sql/sql_alter.cc:329
      #19 0x000055f72460e0f0 in mysql_execute_command (thd=0x7fddf0000b00) at /data/src/10.2/sql/sql_parse.cc:6228
      #20 0x000055f724612f51 in mysql_parse (thd=0x7fddf0000b00, rawbuf=0x7fddf0027918 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", length=51, parser_state=0x7fde60179250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8015
      #21 0x000055f72460088b in dispatch_command (command=COM_QUERY, thd=0x7fddf0000b00, packet=0x7fddf00088a1 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", packet_length=51, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1826
      #22 0x000055f7245ff1e2 in do_command (thd=0x7fddf0000b00) at /data/src/10.2/sql/sql_parse.cc:1379
      #23 0x000055f724751ccd in do_handle_one_connection (connect=0x55f728051880) at /data/src/10.2/sql/sql_connect.cc:1335
      #24 0x000055f724751a5a in handle_one_connection (arg=0x55f728051880) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x00007fde632ca494 in start_thread (arg=0x7fde6017a700) at pthread_create.c:333
      #26 0x00007fde616b093f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      When neither of the assertion failures occurs, it (also non-deterministically) fails with an error upon CREATE OR REPLACE TABLE t1:

      mysqltest: At line 31: query 'CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB' failed: 1005: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
      

      or upon reap:

      mysqltest: At line 36: query 'reap' failed: 1825: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/t2_ibfk_1'
      

      I'm not sure if it should happen, both connections still have FOREIGN_KEY_CHECKS=OFF.

      Non-debug builds are also affected:

      10.1 non-debug 7158edcba

      #2  <signal handler called>
      #3  0x00007f378cfd5534 in dict_foreign_qualify_index (table=table@entry=0x7f377e1c19e8, col_names=col_names@entry=0x0, columns=columns@entry=0x7f377e4960f8, n_cols=n_cols@entry=1, index=index@entry=0x7f377e496d68, types_idx=types_idx@entry=0x7f377e1c3068, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.1/storage/innobase/dict/dict0dict.cc:7027
      #4  0x00007f378cfd8085 in dict_foreign_qualify_index (err_index=0x0, err_col_no=0x0, error=0x0, check_null=0, check_charsets=true, types_idx=0x7f377e1c3068, index=0x7f377e496d68, n_cols=1, columns=0x7f377e4960f8, col_names=0x0, table=0x7f377e1c19e8) at /data/src/10.1/storage/innobase/dict/dict0dict.cc:3396
      #5  dict_foreign_find_index (table=0x7f377e1c19e8, col_names=<optimized out>, columns=<optimized out>, n_cols=1, types_idx=0x7f377e1c3068, check_charsets=check_charsets@entry=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.1/storage/innobase/dict/dict0dict.cc:3384
      #6  0x00007f378d059571 in innobase_update_foreign_try (ctx=ctx@entry=0x7f377e421020, trx=trx@entry=0x7f377e42ba68, table_name=table_name@entry=0x7f378a27faf5 "t2") at /data/src/10.1/storage/innobase/handler/handler0alter.cc:5029
      #7  0x00007f378d05e841 in commit_try_norebuild (table_name=0x7f378a27faf5 "t2", trx=<optimized out>, old_table=0x7f377e0db808, ctx=<optimized out>, ha_alter_info=<optimized out>) at /data/src/10.1/storage/innobase/handler/handler0alter.cc:5454
      #8  ha_innodb::commit_inplace_alter_table (this=0x7f377e0bd020, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /data/src/10.1/storage/innobase/handler/handler0alter.cc:5974
      #9  0x000055a2e8ff3865 in mysql_inplace_alter_table (target_mdl_request=<optimized out>, alter_ctx=<optimized out>, inplace_supported=<optimized out>, ha_alter_info=<optimized out>, altered_table=<optimized out>, table=<optimized out>, table_list=<optimized out>, thd=<optimized out>) at /data/src/10.1/sql/sql_table.cc:7232
      #10 mysql_alter_table (thd=0x7f378a2e2008, new_db=0x7f377e454008 "\260KE~7\177", new_name=0x7f377e41f138 "", create_info=0x7f379304efc8, table_list=0x7f377e41f138, alter_info=0x7f377e1c3068, order_num=0, order=0x0, ignore=false) at /data/src/10.1/sql/sql_table.cc:9058
      #11 0x000055a2e90361ed in Sql_cmd_alter_table::execute (this=0x55a2e9d73240 <my_charset_utf8_general_ci>, thd=0x7f378a2e2008) at /data/src/10.1/sql/sql_alter.cc:330
      #12 0x000055a2e8f6a92c in mysql_execute_command (thd=0x7f378a2e2008) at /data/src/10.1/sql/sql_parse.cc:5701
      #13 0x000055a2e8f72657 in mysql_parse (thd=0x7f378a2e2008, rawbuf=<optimized out>, length=<optimized out>, parser_state=0x7f379586a620) at /data/src/10.1/sql/sql_parse.cc:7468
      #14 0x000055a2e8f751ff in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f378a2e2008, packet=packet@entry=0x7f378a2e8009 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", packet_length=packet_length@entry=51) at /data/src/10.1/sql/sql_parse.cc:1496
      #15 0x000055a2e8f759c2 in do_command (thd=0x7f378a2e2008) at /data/src/10.1/sql/sql_parse.cc:1124
      #16 0x000055a2e90336ec in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f378a2e2008) at /data/src/10.1/sql/sql_connect.cc:1330
      #17 0x000055a2e90338a7 in handle_one_connection (arg=arg@entry=0x7f378a2e2008) at /data/src/10.1/sql/sql_connect.cc:1242
      #18 0x000055a2e92ae144 in pfs_spawn_thread (arg=0x7f379303fc08) at /data/src/10.1/storage/perfschema/pfs.cc:1861
      #19 0x00007f3795545494 in start_thread (arg=0x7f379586bb00) at pthread_create.c:333
      #20 0x00007f37938fe93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.2 non-debug 0c20b247d

      2019-01-08  3:37:54 140105599043328 [ERROR] Cannot find index c in InnoDB index dictionary.
      2019-01-08  3:37:54 140105599043328 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/t2
      2019-01-08  3:37:54 140105599043328 [ERROR] InnoDB could not find key no 1 with name c from dict cache for table test/t2
      2019-01-08  3:37:54 140105599043328 [ERROR] InnoDB: Table test/t2 contains 2 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MariaDB  Have you mixed up .frm files from different installations? See http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html
      

      10.4 non-debug 2465d3e00b2

      #2  <signal handler called>
      #3  cmp_cols_are_equal (col1=0x7f76ec0821c0, col2=0x0, check_charsets=check_charsets@entry=1) at /data/src/10.4/storage/innobase/rem/rem0cmp.cc:107
      #4  0x000055e8eed5bd44 in dict_foreign_qualify_index (table=0x7f76ec083280, col_names=0x0, columns=0x7f76f001c310, n_cols=1, index=0x7f76f001e0b0, types_idx=0x7f76ec05bf90, check_charsets=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.4/storage/innobase/dict/dict0dict.cc:6795
      #5  0x000055e8eed5bf5f in dict_foreign_find_index (table=0x7f76ec083280, col_names=0x0, columns=0x7f76f001c310, n_cols=1, types_idx=0x7f76ec05bf90, check_charsets=check_charsets@entry=true, check_null=0, error=0x0, err_col_no=0x0, err_index=0x0) at /data/src/10.4/storage/innobase/dict/dict0dict.cc:3292
      #6  0x000055e8eebce36b in innobase_update_foreign_try (ctx=ctx@entry=0x7f76f0013a70, trx=trx@entry=0x7f774540f1e0, table_name=table_name@entry=0x7f76ec0831d5 "t2") at /data/src/10.4/storage/innobase/handler/handler0alter.cc:9364
      #7  0x000055e8eebd3a5d in commit_try_norebuild (table_name=0x7f76ec0831d5 "t2", trx=0x7f774540f1e0, old_table=0x7f76ec07aff8, altered_table=<optimized out>, ctx=0x7f76f0013a70, ha_alter_info=<optimized out>) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10020
      #8  ha_innobase::commit_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10763
      #9  0x000055e8ee6e2d80 in mysql_inplace_alter_table (thd=thd@entry=0x7f76f00009a8, table_list=0x7f76f0011958, table=table@entry=0x7f76ec07aff8, altered_table=altered_table@entry=0x7f76f001a2d8, ha_alter_info=ha_alter_info@entry=0x7f77448f8ea0, inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_NOCOPY_NO_LOCK, alter_ctx=0x7f77448f9b30, target_mdl_request=0x7f77448f8f40) at /data/src/10.4/sql/sql_table.cc:7590
      #10 0x000055e8ee85efc0 in mysql_alter_table (thd=<optimized out>, new_db=<optimized out>, new_name=<optimized out>, create_info=<optimized out>, table_list=0x7f76f0011958, alter_info=0x7f77448fa630, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9690
      #11 0x000055e8ee8aa9ec in Sql_cmd_alter_table::execute (this=0x2, thd=0x7f76f00009a8) at /data/src/10.4/sql/sql_alter.cc:497
      #12 0x000055e8ee7cc397 in mysql_execute_command (thd=0x7f76f00009a8) at /data/src/10.4/sql/sql_parse.cc:6302
      #13 0x000055e8ee7d2a81 in mysql_parse (thd=0x7f76f00009a8, rawbuf=<optimized out>, length=51, parser_state=0x7f77448fc640, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.4/sql/sql_parse.cc:8104
      #14 0x000055e8ee7d53f5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f76f00009a8, packet=packet@entry=0x7f76f0009559 "ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1(c)", packet_length=packet_length@entry=51, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:1851
      #15 0x000055e8ee7d5d80 in do_command (thd=0x7f76f00009a8) at /data/src/10.4/sql/sql_parse.cc:1396
      #16 0x000055e8ee8a7e24 in do_handle_one_connection (connect=connect@entry=0x55e8f24a4e78) at /data/src/10.4/sql/sql_connect.cc:1402
      #17 0x000055e8ee8a7fc4 in handle_one_connection (arg=arg@entry=0x55e8f24a4e78) at /data/src/10.4/sql/sql_connect.cc:1308
      #18 0x000055e8eeba0474 in pfs_spawn_thread (arg=0x55e8f24c2d28) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #19 0x00007f774d0a3494 in start_thread (arg=0x7f77448fd700) at pthread_create.c:333
      #20 0x00007f774b6a493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            There is also MDEV-18084 with one of these assertion failures, but it was (and still is) happening upon upgrade from an old 10.1.

            elenst Elena Stepanova added a comment - There is also MDEV-18084 with one of these assertion failures, but it was (and still is) happening upon upgrade from an old 10.1.

            ASAN version of the problem (same test case as in the description):

            10.2 22737998 ASAN

            ==30863==ERROR: AddressSanitizer: heap-use-after-free on address 0x61800003ad30 at pc 0x55cc7f29e9e8 bp 0x7fcaae56abc0 sp 0x7fcaae56abb8
            READ of size 20 at 0x61800003ad30 thread T28
                #0 0x55cc7f29e9e7 in dict_index_get_nth_field /data/src/10.2/storage/innobase/include/dict0dict.ic:1064
                #1 0x55cc7f29eb58 in dict_index_get_nth_col /data/src/10.2/storage/innobase/include/dict0dict.ic:1120
                #2 0x55cc7f2c1ce6 in dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, unsigned long*, unsigned long*, dict_index_t**) /data/src/10.2/storage/innobase/dict/dict0dict.cc:6934
                #3 0x55cc7f2b0ab6 in dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, unsigned long*, unsigned long*, dict_index_t**) /data/src/10.2/storage/innobase/dict/dict0dict.cc:3364
                #4 0x55cc7ee28afe in innobase_update_foreign_try /data/src/10.2/storage/innobase/handler/handler0alter.cc:7594
                #5 0x55cc7ee34ef6 in commit_try_norebuild(Alter_inplace_info*, ha_innobase_inplace_ctx*, TABLE*, TABLE const*, trx_t*, char const*) (/data/bld/10.2-asan/bin/mysqld+0x1ab1ef6)
                #6 0x55cc7ee2c197 in ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /data/src/10.2/storage/innobase/handler/handler0alter.cc:8678
                #7 0x55cc7e613b71 in handler::ha_commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /data/src/10.2/sql/handler.cc:4279
                #8 0x55cc7e216504 in mysql_inplace_alter_table /data/src/10.2/sql/sql_table.cc:7388
                #9 0x55cc7e222db0 in mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /data/src/10.2/sql/sql_table.cc:9394
                #10 0x55cc7e34f368 in Sql_cmd_alter_table::execute(THD*) /data/src/10.2/sql/sql_alter.cc:329
                #11 0x55cc7e017a15 in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:6231
                #12 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018
                #13 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829
                #14 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379
                #15 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336
                #16 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242
                #17 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862
                #18 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493)
                #19 0x7fcac8d5f93e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe893e)
             
            0x61800003ad30 is located 176 bytes inside of 800-byte region [0x61800003ac80,0x61800003afa0)
            freed by thread T27 here:
                #0 0x7fcacabe3527 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54527)
                #1 0x55cc7eef3720 in mem_heap_block_free(mem_block_info_t*, mem_block_info_t*) /data/src/10.2/storage/innobase/mem/mem0mem.cc:440
                #2 0x55cc7f2dff04 in mem_heap_free /data/src/10.2/storage/innobase/include/mem0mem.ic:527
                #3 0x55cc7f2e6bc5 in dict_mem_index_free(dict_index_t*) /data/src/10.2/storage/innobase/dict/dict0mem.cc:1044
                #4 0x55cc7f2ace0c in dict_index_remove_from_cache_low /data/src/10.2/storage/innobase/dict/dict0dict.cc:2599
                #5 0x55cc7f2aa068 in dict_table_remove_from_cache_low(dict_table_t*, unsigned long) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2057
                #6 0x55cc7f2aab3e in dict_table_remove_from_cache(dict_table_t*) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2114
                #7 0x55cc7f00d343 in row_drop_table_from_cache /data/src/10.2/storage/innobase/row/row0mysql.cc:3198
                #8 0x55cc7f00f3d2 in row_drop_table_for_mysql(char const*, trx_t*, enum_sql_command, bool, bool) /data/src/10.2/storage/innobase/row/row0mysql.cc:3728
                #9 0x55cc7ede905c in ha_innobase::delete_table(char const*, enum_sql_command) (/data/bld/10.2-asan/bin/mysqld+0x1a6605c)
                #10 0x55cc7edbd856 in ha_innobase::delete_table(char const*) /data/src/10.2/storage/innobase/handler/ha_innodb.cc:13264
                #11 0x55cc7e614244 in handler::ha_delete_table(char const*) /data/src/10.2/sql/handler.cc:4374
                #12 0x55cc7e6063ae in ha_delete_table(THD*, handlerton*, char const*, char const*, char const*, bool) /data/src/10.2/sql/handler.cc:2401
                #13 0x55cc7e1f6266 in mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool) /data/src/10.2/sql/sql_table.cc:2463
                #14 0x55cc7e206592 in create_table_impl /data/src/10.2/sql/sql_table.cc:4813
                #15 0x55cc7e20767f in mysql_create_table_no_lock(THD*, char const*, char const*, Table_specification_st*, Alter_info*, bool*, int) /data/src/10.2/sql/sql_table.cc:5019
                #16 0x55cc7e207eae in mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /data/src/10.2/sql/sql_table.cc:5082
                #17 0x55cc7e00891c in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:3994
                #18 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018
                #19 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829
                #20 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379
                #21 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336
                #22 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242
                #23 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862
                #24 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493)
             
            previously allocated by thread T27 here:
                #0 0x7fcacabe373f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5473f)
                #1 0x55cc7eef2d75 in mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned int, unsigned long) /data/src/10.2/storage/innobase/mem/mem0mem.cc:294
                #2 0x55cc7eef34bd in mem_heap_add_block(mem_block_info_t*, unsigned long) /data/src/10.2/storage/innobase/mem/mem0mem.cc:400
                #3 0x55cc7f2dfbff in mem_heap_alloc /data/src/10.2/storage/innobase/include/mem0mem.ic:201
                #4 0x55cc7f2dfa4d in mem_heap_zalloc /data/src/10.2/storage/innobase/include/mem0mem.ic:170
                #5 0x55cc7f2e4d42 in dict_mem_index_create(char const*, char const*, unsigned long, unsigned long, unsigned long) /data/src/10.2/storage/innobase/dict/dict0mem.cc:704
                #6 0x55cc7f2af61a in dict_index_build_internal_non_clust /data/src/10.2/storage/innobase/dict/dict0dict.cc:3109
                #7 0x55cc7f2abc80 in dict_index_add_to_cache_w_vcol(dict_table_t*, dict_index_t*, dict_add_v_col_t const*, unsigned long, unsigned long) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2433
                #8 0x55cc7f29201e in dict_create_index_step(que_thr_t*) /data/src/10.2/storage/innobase/dict/dict0crea.cc:1481
                #9 0x55cc7ef6db13 in que_thr_step /data/src/10.2/storage/innobase/que/que0que.cc:1055
                #10 0x55cc7ef6de3a in que_run_threads_low /data/src/10.2/storage/innobase/que/que0que.cc:1107
                #11 0x55cc7ef6e143 in que_run_threads(que_thr_t*) /data/src/10.2/storage/innobase/que/que0que.cc:1147
                #12 0x55cc7efed497 in row_merge_create_index_graph /data/src/10.2/storage/innobase/row/row0merge.cc:4336
                #13 0x55cc7efedd3f in row_merge_create_index(trx_t*, dict_table_t*, index_def_t const*, dict_add_v_col_t const*) /data/src/10.2/storage/innobase/row/row0merge.cc:4404
                #14 0x55cc7ee193aa in prepare_inplace_alter_table_dict /data/src/10.2/storage/innobase/handler/handler0alter.cc:4861
                #15 0x55cc7ee21cbe in ha_innobase::prepare_inplace_alter_table(TABLE*, Alter_inplace_info*) /data/src/10.2/storage/innobase/handler/handler0alter.cc:6282
                #16 0x55cc7e6139c3 in handler::ha_prepare_inplace_alter_table(TABLE*, Alter_inplace_info*) /data/src/10.2/sql/handler.cc:4259
                #17 0x55cc7e215ff2 in mysql_inplace_alter_table /data/src/10.2/sql/sql_table.cc:7329
                #18 0x55cc7e222db0 in mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /data/src/10.2/sql/sql_table.cc:9394
                #19 0x55cc7e34f368 in Sql_cmd_alter_table::execute(THD*) /data/src/10.2/sql/sql_alter.cc:329
                #20 0x55cc7e017a15 in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:6231
                #21 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018
                #22 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829
                #23 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379
                #24 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336
                #25 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242
                #26 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862
                #27 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493)
             
            Thread T28 created by T0 here:
                #0 0x7fcacabb2bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba)
                #1 0x55cc7ed5eab5 in spawn_thread_v1 /data/src/10.2/storage/perfschema/pfs.cc:1912
                #2 0x55cc7ddf667e in inline_mysql_thread_create /data/src/10.2/include/mysql/psi/mysql_thread.h:1239
                #3 0x55cc7de0b61b in create_thread_to_handle_connection(CONNECT*) /data/src/10.2/sql/mysqld.cc:6466
                #4 0x55cc7de0bd20 in create_new_thread /data/src/10.2/sql/mysqld.cc:6536
                #5 0x55cc7de0cd37 in handle_connections_sockets() /data/src/10.2/sql/mysqld.cc:6811
                #6 0x55cc7de0ab70 in mysqld_main(int, char**) /data/src/10.2/sql/mysqld.cc:6085
                #7 0x55cc7ddf4a1f in main /data/src/10.2/sql/main.cc:25
                #8 0x7fcac8c972b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
             
            Thread T27 created by T0 here:
                #0 0x7fcacabb2bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba)
                #1 0x55cc7ed5eab5 in spawn_thread_v1 /data/src/10.2/storage/perfschema/pfs.cc:1912
                #2 0x55cc7ddf667e in inline_mysql_thread_create /data/src/10.2/include/mysql/psi/mysql_thread.h:1239
                #3 0x55cc7de0b61b in create_thread_to_handle_connection(CONNECT*) /data/src/10.2/sql/mysqld.cc:6466
                #4 0x55cc7de0bd20 in create_new_thread /data/src/10.2/sql/mysqld.cc:6536
                #5 0x55cc7de0cd37 in handle_connections_sockets() /data/src/10.2/sql/mysqld.cc:6811
                #6 0x55cc7de0ab70 in mysqld_main(int, char**) /data/src/10.2/sql/mysqld.cc:6085
                #7 0x55cc7ddf4a1f in main /data/src/10.2/sql/main.cc:25
                #8 0x7fcac8c972b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
             
            SUMMARY: AddressSanitizer: heap-use-after-free /data/src/10.2/storage/innobase/include/dict0dict.ic:1064 dict_index_get_nth_field
            Shadow bytes around the buggy address:
              0x0c307ffff550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              0x0c307ffff560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              0x0c307ffff570: 00 00 00 00 00 00 00 04 fa fa fa fa fa fa fa fa
              0x0c307ffff580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
              0x0c307ffff590: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
            =>0x0c307ffff5a0: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd
              0x0c307ffff5b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
              0x0c307ffff5c0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
              0x0c307ffff5d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
              0x0c307ffff5e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
              0x0c307ffff5f0: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa
            Shadow byte legend (one shadow byte represents 8 application bytes):
              Addressable:           00
              Partially addressable: 01 02 03 04 05 06 07 
              Heap left redzone:       fa
              Heap right redzone:      fb
              Freed heap region:       fd
              Stack left redzone:      f1
              Stack mid redzone:       f2
              Stack right redzone:     f3
              Stack partial redzone:   f4
              Stack after return:      f5
              Stack use after scope:   f8
              Global redzone:          f9
              Global init order:       f6
              Poisoned by user:        f7
              Contiguous container OOB:fc
              ASan internal:           fe
            ==30863==ABORTING
            

            elenst Elena Stepanova added a comment - ASAN version of the problem (same test case as in the description): 10.2 22737998 ASAN ==30863==ERROR: AddressSanitizer: heap-use-after-free on address 0x61800003ad30 at pc 0x55cc7f29e9e8 bp 0x7fcaae56abc0 sp 0x7fcaae56abb8 READ of size 20 at 0x61800003ad30 thread T28 #0 0x55cc7f29e9e7 in dict_index_get_nth_field /data/src/10.2/storage/innobase/include/dict0dict.ic:1064 #1 0x55cc7f29eb58 in dict_index_get_nth_col /data/src/10.2/storage/innobase/include/dict0dict.ic:1120 #2 0x55cc7f2c1ce6 in dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, unsigned long*, unsigned long*, dict_index_t**) /data/src/10.2/storage/innobase/dict/dict0dict.cc:6934 #3 0x55cc7f2b0ab6 in dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, unsigned long*, unsigned long*, dict_index_t**) /data/src/10.2/storage/innobase/dict/dict0dict.cc:3364 #4 0x55cc7ee28afe in innobase_update_foreign_try /data/src/10.2/storage/innobase/handler/handler0alter.cc:7594 #5 0x55cc7ee34ef6 in commit_try_norebuild(Alter_inplace_info*, ha_innobase_inplace_ctx*, TABLE*, TABLE const*, trx_t*, char const*) (/data/bld/10.2-asan/bin/mysqld+0x1ab1ef6) #6 0x55cc7ee2c197 in ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /data/src/10.2/storage/innobase/handler/handler0alter.cc:8678 #7 0x55cc7e613b71 in handler::ha_commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /data/src/10.2/sql/handler.cc:4279 #8 0x55cc7e216504 in mysql_inplace_alter_table /data/src/10.2/sql/sql_table.cc:7388 #9 0x55cc7e222db0 in mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /data/src/10.2/sql/sql_table.cc:9394 #10 0x55cc7e34f368 in Sql_cmd_alter_table::execute(THD*) /data/src/10.2/sql/sql_alter.cc:329 #11 0x55cc7e017a15 in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:6231 #12 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018 #13 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829 #14 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379 #15 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336 #16 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242 #17 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862 #18 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493) #19 0x7fcac8d5f93e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe893e)   0x61800003ad30 is located 176 bytes inside of 800-byte region [0x61800003ac80,0x61800003afa0) freed by thread T27 here: #0 0x7fcacabe3527 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x54527) #1 0x55cc7eef3720 in mem_heap_block_free(mem_block_info_t*, mem_block_info_t*) /data/src/10.2/storage/innobase/mem/mem0mem.cc:440 #2 0x55cc7f2dff04 in mem_heap_free /data/src/10.2/storage/innobase/include/mem0mem.ic:527 #3 0x55cc7f2e6bc5 in dict_mem_index_free(dict_index_t*) /data/src/10.2/storage/innobase/dict/dict0mem.cc:1044 #4 0x55cc7f2ace0c in dict_index_remove_from_cache_low /data/src/10.2/storage/innobase/dict/dict0dict.cc:2599 #5 0x55cc7f2aa068 in dict_table_remove_from_cache_low(dict_table_t*, unsigned long) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2057 #6 0x55cc7f2aab3e in dict_table_remove_from_cache(dict_table_t*) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2114 #7 0x55cc7f00d343 in row_drop_table_from_cache /data/src/10.2/storage/innobase/row/row0mysql.cc:3198 #8 0x55cc7f00f3d2 in row_drop_table_for_mysql(char const*, trx_t*, enum_sql_command, bool, bool) /data/src/10.2/storage/innobase/row/row0mysql.cc:3728 #9 0x55cc7ede905c in ha_innobase::delete_table(char const*, enum_sql_command) (/data/bld/10.2-asan/bin/mysqld+0x1a6605c) #10 0x55cc7edbd856 in ha_innobase::delete_table(char const*) /data/src/10.2/storage/innobase/handler/ha_innodb.cc:13264 #11 0x55cc7e614244 in handler::ha_delete_table(char const*) /data/src/10.2/sql/handler.cc:4374 #12 0x55cc7e6063ae in ha_delete_table(THD*, handlerton*, char const*, char const*, char const*, bool) /data/src/10.2/sql/handler.cc:2401 #13 0x55cc7e1f6266 in mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool) /data/src/10.2/sql/sql_table.cc:2463 #14 0x55cc7e206592 in create_table_impl /data/src/10.2/sql/sql_table.cc:4813 #15 0x55cc7e20767f in mysql_create_table_no_lock(THD*, char const*, char const*, Table_specification_st*, Alter_info*, bool*, int) /data/src/10.2/sql/sql_table.cc:5019 #16 0x55cc7e207eae in mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /data/src/10.2/sql/sql_table.cc:5082 #17 0x55cc7e00891c in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:3994 #18 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018 #19 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829 #20 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379 #21 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336 #22 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242 #23 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862 #24 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493)   previously allocated by thread T27 here: #0 0x7fcacabe373f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5473f) #1 0x55cc7eef2d75 in mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned int, unsigned long) /data/src/10.2/storage/innobase/mem/mem0mem.cc:294 #2 0x55cc7eef34bd in mem_heap_add_block(mem_block_info_t*, unsigned long) /data/src/10.2/storage/innobase/mem/mem0mem.cc:400 #3 0x55cc7f2dfbff in mem_heap_alloc /data/src/10.2/storage/innobase/include/mem0mem.ic:201 #4 0x55cc7f2dfa4d in mem_heap_zalloc /data/src/10.2/storage/innobase/include/mem0mem.ic:170 #5 0x55cc7f2e4d42 in dict_mem_index_create(char const*, char const*, unsigned long, unsigned long, unsigned long) /data/src/10.2/storage/innobase/dict/dict0mem.cc:704 #6 0x55cc7f2af61a in dict_index_build_internal_non_clust /data/src/10.2/storage/innobase/dict/dict0dict.cc:3109 #7 0x55cc7f2abc80 in dict_index_add_to_cache_w_vcol(dict_table_t*, dict_index_t*, dict_add_v_col_t const*, unsigned long, unsigned long) /data/src/10.2/storage/innobase/dict/dict0dict.cc:2433 #8 0x55cc7f29201e in dict_create_index_step(que_thr_t*) /data/src/10.2/storage/innobase/dict/dict0crea.cc:1481 #9 0x55cc7ef6db13 in que_thr_step /data/src/10.2/storage/innobase/que/que0que.cc:1055 #10 0x55cc7ef6de3a in que_run_threads_low /data/src/10.2/storage/innobase/que/que0que.cc:1107 #11 0x55cc7ef6e143 in que_run_threads(que_thr_t*) /data/src/10.2/storage/innobase/que/que0que.cc:1147 #12 0x55cc7efed497 in row_merge_create_index_graph /data/src/10.2/storage/innobase/row/row0merge.cc:4336 #13 0x55cc7efedd3f in row_merge_create_index(trx_t*, dict_table_t*, index_def_t const*, dict_add_v_col_t const*) /data/src/10.2/storage/innobase/row/row0merge.cc:4404 #14 0x55cc7ee193aa in prepare_inplace_alter_table_dict /data/src/10.2/storage/innobase/handler/handler0alter.cc:4861 #15 0x55cc7ee21cbe in ha_innobase::prepare_inplace_alter_table(TABLE*, Alter_inplace_info*) /data/src/10.2/storage/innobase/handler/handler0alter.cc:6282 #16 0x55cc7e6139c3 in handler::ha_prepare_inplace_alter_table(TABLE*, Alter_inplace_info*) /data/src/10.2/sql/handler.cc:4259 #17 0x55cc7e215ff2 in mysql_inplace_alter_table /data/src/10.2/sql/sql_table.cc:7329 #18 0x55cc7e222db0 in mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /data/src/10.2/sql/sql_table.cc:9394 #19 0x55cc7e34f368 in Sql_cmd_alter_table::execute(THD*) /data/src/10.2/sql/sql_alter.cc:329 #20 0x55cc7e017a15 in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:6231 #21 0x55cc7e02254b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:8018 #22 0x55cc7dffcf38 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1829 #23 0x55cc7dff9f57 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1379 #24 0x55cc7e340edf in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336 #25 0x55cc7e3408f4 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1242 #26 0x55cc7ed5e4ed in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1862 #27 0x7fcaca979493 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7493)   Thread T28 created by T0 here: #0 0x7fcacabb2bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba) #1 0x55cc7ed5eab5 in spawn_thread_v1 /data/src/10.2/storage/perfschema/pfs.cc:1912 #2 0x55cc7ddf667e in inline_mysql_thread_create /data/src/10.2/include/mysql/psi/mysql_thread.h:1239 #3 0x55cc7de0b61b in create_thread_to_handle_connection(CONNECT*) /data/src/10.2/sql/mysqld.cc:6466 #4 0x55cc7de0bd20 in create_new_thread /data/src/10.2/sql/mysqld.cc:6536 #5 0x55cc7de0cd37 in handle_connections_sockets() /data/src/10.2/sql/mysqld.cc:6811 #6 0x55cc7de0ab70 in mysqld_main(int, char**) /data/src/10.2/sql/mysqld.cc:6085 #7 0x55cc7ddf4a1f in main /data/src/10.2/sql/main.cc:25 #8 0x7fcac8c972b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)   Thread T27 created by T0 here: #0 0x7fcacabb2bba in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x23bba) #1 0x55cc7ed5eab5 in spawn_thread_v1 /data/src/10.2/storage/perfschema/pfs.cc:1912 #2 0x55cc7ddf667e in inline_mysql_thread_create /data/src/10.2/include/mysql/psi/mysql_thread.h:1239 #3 0x55cc7de0b61b in create_thread_to_handle_connection(CONNECT*) /data/src/10.2/sql/mysqld.cc:6466 #4 0x55cc7de0bd20 in create_new_thread /data/src/10.2/sql/mysqld.cc:6536 #5 0x55cc7de0cd37 in handle_connections_sockets() /data/src/10.2/sql/mysqld.cc:6811 #6 0x55cc7de0ab70 in mysqld_main(int, char**) /data/src/10.2/sql/mysqld.cc:6085 #7 0x55cc7ddf4a1f in main /data/src/10.2/sql/main.cc:25 #8 0x7fcac8c972b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)   SUMMARY: AddressSanitizer: heap-use-after-free /data/src/10.2/storage/innobase/include/dict0dict.ic:1064 dict_index_get_nth_field Shadow bytes around the buggy address: 0x0c307ffff550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c307ffff560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c307ffff570: 00 00 00 00 00 00 00 04 fa fa fa fa fa fa fa fa 0x0c307ffff580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c307ffff590: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x0c307ffff5a0: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd 0x0c307ffff5b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c307ffff5c0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c307ffff5d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c307ffff5e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c307ffff5f0: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Contiguous container OOB:fc ASan internal: fe ==30863==ABORTING

            TSAN report:

            10.5 78a0f0527e0911e82308a001133c78340bdb9af3

            WARNING: ThreadSanitizer: heap-use-after-free (pid=99078)
              Read of size 4 at 0x7b60000918c0 by thread T21:
                #0 dict_index_get_nth_field(dict_index_t const*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/dict0dict.ic:817:2 (mariadbd+0x19a48c7)
                #1 dict_index_get_nth_col(dict_index_t const*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/dict0dict.ic:846:28 (mariadbd+0x19a48c7)
                #2 dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:5017:8 (mariadbd+0x19a48c7)
                #3 dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:2845:10 (mariadbd+0x19a4395)
                #4 innobase_update_foreign_try(ha_innobase_inplace_ctx*, trx_t*, char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:9496:24 (mariadbd+0x1b2c511)
                #5 commit_try_norebuild(Alter_inplace_info*, ha_innobase_inplace_ctx*, TABLE*, TABLE const*, trx_t*, char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:10094:6 (mariadbd+0x1b35b18)
                #6 ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:10890:11 (mariadbd+0x1b2393b)
                #7 handler::ha_commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:4735:11 (mariadbd+0xd60e6f)
                #8 mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:7925:22 (mariadbd+0x13405e0)
                #9 mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:10446:16 (mariadbd+0x13405e0)
                #10 Sql_cmd_alter_table::execute(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_alter.cc:520:11 (mariadbd+0x141c613)
                #11 mysql_execute_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:5912:26 (mariadbd+0x11d22ab)
                #12 mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:7957:18 (mariadbd+0x11ca8a6)
                #13 dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1839:7 (mariadbd+0x11c652d)
                #14 do_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1358:17 (mariadbd+0x11cb511)
                #15 do_handle_one_connection(CONNECT*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1410:11 (mariadbd+0x141001b)
                #16 handle_one_connection /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1312:5 (mariadbd+0x140fd2f)
                #17 pfs_spawn_thread /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2201:3 (mariadbd+0x17906ee)
             
              Previous write of size 8 at 0x7b60000918c0 by thread T12:
                #0 free <null> (mariadbd+0xc78c68)
                #1 ut_allocator<unsigned char, true>::deallocate(unsigned char*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/ut0new.h:421:3 (mariadbd+0x1bf25cf)
                #2 mem_heap_block_free(mem_block_info_t*, mem_block_info_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/mem/mem0mem.cc:417:3 (mariadbd+0x1bf25cf)
                #3 mem_heap_free(mem_block_info_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/mem0mem.ic:417:3 (mariadbd+0x1a8bb7f)
                #4 dict_mem_index_free(dict_index_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0mem.cc:1079:2 (mariadbd+0x1a8bb7f)
                #5 dict_index_remove_from_cache_low(dict_table_t*, dict_index_t*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:2152:2 (mariadbd+0x199edd8)
                #6 dict_sys_t::remove(dict_table_t*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:1877:3 (mariadbd+0x199ab9a)
                #7 row_drop_table_from_cache(char const*, dict_table_t*, trx_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/row/row0mysql.cc:3280:11 (mariadbd+0x1ce0561)
                #8 row_drop_table_for_mysql(char const*, trx_t*, enum_sql_command, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/row/row0mysql.cc:3752:9 (mariadbd+0x1ce0561)
                #9 ha_innobase::delete_table(char const*, enum_sql_command) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/ha_innodb.cc:13427:8 (mariadbd+0x18d7d7f)
                #10 ha_innobase::delete_table(char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/ha_innodb.cc:13552:9 (mariadbd+0x18b9bd9)
                #11 handler::ha_delete_table(char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:4866:10 (mariadbd+0xd56440)
                #12 ha_delete_table(THD*, handlerton*, char const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:2705:7 (mariadbd+0xd56440)
                #13 mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:2501:19 (mariadbd+0x1323c38)
                #14 create_table_impl(THD*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5075:13 (mariadbd+0x132a3a3)
                #15 mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5261:8 (mariadbd+0x132980e)
                #16 mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5353:7 (mariadbd+0x132ad61)
                #17 Sql_cmd_create_table_like::execute(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:11876:12 (mariadbd+0x1343e29)
                #18 mysql_execute_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:5912:26 (mariadbd+0x11d22ab)
                #19 mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:7957:18 (mariadbd+0x11ca8a6)
                #20 dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1839:7 (mariadbd+0x11c652d)
                #21 do_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1358:17 (mariadbd+0x11cb511)
                #22 do_handle_one_connection(CONNECT*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1410:11 (mariadbd+0x141001b)
                #23 handle_one_connection /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1312:5 (mariadbd+0x140fd2f)
                #24 pfs_spawn_thread /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2201:3 (mariadbd+0x17906ee)
             
              Thread T21 (tid=99110, running) created by main thread at:
                #0 pthread_create <null> (mariadbd+0xc79e7b)
                #1 my_thread_create(unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/my_thread.h:34:10 (mariadbd+0x179090a)
                #2 pfs_spawn_thread_v1 /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2252:15 (mariadbd+0x179090a)
                #3 inline_mysql_thread_create(unsigned int, unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../include/mysql/psi/mysql_thread.h:1321:11 (mariadbd+0xd18acb)
                #4 create_thread_to_handle_connection(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6060:19 (mariadbd+0xd18acb)
                #5 create_new_thread(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6119:3 (mariadbd+0xd18d88)
                #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6184:5 (mariadbd+0xd195f5)
                #7 handle_connections_sockets() /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6311:9 (mariadbd+0xd185aa)
                #8 mysqld_main(int, char**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:5719:3 (mariadbd+0xd10b85)
                #9 main /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/main.cc:25:10 (mariadbd+0xd09d7e)
             
              Thread T12 (tid=99096, running) created by main thread at:
                #0 pthread_create <null> (mariadbd+0xc79e7b)
                #1 my_thread_create(unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/my_thread.h:34:10 (mariadbd+0x179090a)
                #2 pfs_spawn_thread_v1 /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2252:15 (mariadbd+0x179090a)
                #3 inline_mysql_thread_create(unsigned int, unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../include/mysql/psi/mysql_thread.h:1321:11 (mariadbd+0xd18acb)
                #4 create_thread_to_handle_connection(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6060:19 (mariadbd+0xd18acb)
                #5 create_new_thread(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6119:3 (mariadbd+0xd18d88)
                #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6184:5 (mariadbd+0xd195f5)
                #7 handle_connections_sockets() /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6311:9 (mariadbd+0xd185aa)
                #8 mysqld_main(int, char**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:5719:3 (mariadbd+0xd10b85)
                #9 main /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/main.cc:25:10 (mariadbd+0xd09d7e)
            
            

            kevg Eugene Kosov (Inactive) added a comment - TSAN report: 10.5 78a0f0527e0911e82308a001133c78340bdb9af3 WARNING: ThreadSanitizer: heap-use-after-free (pid=99078) Read of size 4 at 0x7b60000918c0 by thread T21: #0 dict_index_get_nth_field(dict_index_t const*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/dict0dict.ic:817:2 (mariadbd+0x19a48c7) #1 dict_index_get_nth_col(dict_index_t const*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/dict0dict.ic:846:28 (mariadbd+0x19a48c7) #2 dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:5017:8 (mariadbd+0x19a48c7) #3 dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:2845:10 (mariadbd+0x19a4395) #4 innobase_update_foreign_try(ha_innobase_inplace_ctx*, trx_t*, char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:9496:24 (mariadbd+0x1b2c511) #5 commit_try_norebuild(Alter_inplace_info*, ha_innobase_inplace_ctx*, TABLE*, TABLE const*, trx_t*, char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:10094:6 (mariadbd+0x1b35b18) #6 ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/handler0alter.cc:10890:11 (mariadbd+0x1b2393b) #7 handler::ha_commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:4735:11 (mariadbd+0xd60e6f) #8 mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, enum_alter_inplace_result, MDL_request*, Alter_table_ctx*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:7925:22 (mariadbd+0x13405e0) #9 mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:10446:16 (mariadbd+0x13405e0) #10 Sql_cmd_alter_table::execute(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_alter.cc:520:11 (mariadbd+0x141c613) #11 mysql_execute_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:5912:26 (mariadbd+0x11d22ab) #12 mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:7957:18 (mariadbd+0x11ca8a6) #13 dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1839:7 (mariadbd+0x11c652d) #14 do_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1358:17 (mariadbd+0x11cb511) #15 do_handle_one_connection(CONNECT*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1410:11 (mariadbd+0x141001b) #16 handle_one_connection /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1312:5 (mariadbd+0x140fd2f) #17 pfs_spawn_thread /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2201:3 (mariadbd+0x17906ee)   Previous write of size 8 at 0x7b60000918c0 by thread T12: #0 free <null> (mariadbd+0xc78c68) #1 ut_allocator<unsigned char, true>::deallocate(unsigned char*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/ut0new.h:421:3 (mariadbd+0x1bf25cf) #2 mem_heap_block_free(mem_block_info_t*, mem_block_info_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/mem/mem0mem.cc:417:3 (mariadbd+0x1bf25cf) #3 mem_heap_free(mem_block_info_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/include/mem0mem.ic:417:3 (mariadbd+0x1a8bb7f) #4 dict_mem_index_free(dict_index_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0mem.cc:1079:2 (mariadbd+0x1a8bb7f) #5 dict_index_remove_from_cache_low(dict_table_t*, dict_index_t*, unsigned long) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:2152:2 (mariadbd+0x199edd8) #6 dict_sys_t::remove(dict_table_t*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/dict/dict0dict.cc:1877:3 (mariadbd+0x199ab9a) #7 row_drop_table_from_cache(char const*, dict_table_t*, trx_t*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/row/row0mysql.cc:3280:11 (mariadbd+0x1ce0561) #8 row_drop_table_for_mysql(char const*, trx_t*, enum_sql_command, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/row/row0mysql.cc:3752:9 (mariadbd+0x1ce0561) #9 ha_innobase::delete_table(char const*, enum_sql_command) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/ha_innodb.cc:13427:8 (mariadbd+0x18d7d7f) #10 ha_innobase::delete_table(char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/innobase/handler/ha_innodb.cc:13552:9 (mariadbd+0x18b9bd9) #11 handler::ha_delete_table(char const*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:4866:10 (mariadbd+0xd56440) #12 ha_delete_table(THD*, handlerton*, char const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/handler.cc:2705:7 (mariadbd+0xd56440) #13 mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:2501:19 (mariadbd+0x1323c38) #14 create_table_impl(THD*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5075:13 (mariadbd+0x132a3a3) #15 mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5261:8 (mariadbd+0x132980e) #16 mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:5353:7 (mariadbd+0x132ad61) #17 Sql_cmd_create_table_like::execute(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_table.cc:11876:12 (mariadbd+0x1343e29) #18 mysql_execute_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:5912:26 (mariadbd+0x11d22ab) #19 mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:7957:18 (mariadbd+0x11ca8a6) #20 dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1839:7 (mariadbd+0x11c652d) #21 do_command(THD*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_parse.cc:1358:17 (mariadbd+0x11cb511) #22 do_handle_one_connection(CONNECT*, bool) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1410:11 (mariadbd+0x141001b) #23 handle_one_connection /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/sql_connect.cc:1312:5 (mariadbd+0x140fd2f) #24 pfs_spawn_thread /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2201:3 (mariadbd+0x17906ee)   Thread T21 (tid=99110, running) created by main thread at: #0 pthread_create <null> (mariadbd+0xc79e7b) #1 my_thread_create(unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/my_thread.h:34:10 (mariadbd+0x179090a) #2 pfs_spawn_thread_v1 /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2252:15 (mariadbd+0x179090a) #3 inline_mysql_thread_create(unsigned int, unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../include/mysql/psi/mysql_thread.h:1321:11 (mariadbd+0xd18acb) #4 create_thread_to_handle_connection(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6060:19 (mariadbd+0xd18acb) #5 create_new_thread(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6119:3 (mariadbd+0xd18d88) #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6184:5 (mariadbd+0xd195f5) #7 handle_connections_sockets() /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6311:9 (mariadbd+0xd185aa) #8 mysqld_main(int, char**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:5719:3 (mariadbd+0xd10b85) #9 main /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/main.cc:25:10 (mariadbd+0xd09d7e)   Thread T12 (tid=99096, running) created by main thread at: #0 pthread_create <null> (mariadbd+0xc79e7b) #1 my_thread_create(unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/my_thread.h:34:10 (mariadbd+0x179090a) #2 pfs_spawn_thread_v1 /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../storage/perfschema/pfs.cc:2252:15 (mariadbd+0x179090a) #3 inline_mysql_thread_create(unsigned int, unsigned long*, pthread_attr_t const*, void* (*)(void*), void*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../include/mysql/psi/mysql_thread.h:1321:11 (mariadbd+0xd18acb) #4 create_thread_to_handle_connection(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6060:19 (mariadbd+0xd18acb) #5 create_new_thread(CONNECT*) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6119:3 (mariadbd+0xd18d88) #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6184:5 (mariadbd+0xd195f5) #7 handle_connections_sockets() /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:6311:9 (mariadbd+0xd185aa) #8 mysqld_main(int, char**) /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/mysqld.cc:5719:3 (mariadbd+0xd10b85) #9 main /home/kevg/work/m/bb-10.5-kevgs/build_opt_tsan/../sql/main.cc:25:10 (mariadbd+0xd09d7e)
            alice Alice Sherepa added a comment - - edited

            230201 14:12:01 [ERROR] mysqld got signal 11 ;
            Server version: 10.6.12-MariaDB-log source revision: 0e737f78980fcfe83b05c27215eb3f5ede1ea473
             
            ??:0(__restore_rt)[0x7fee55c2f730]
            strings/ctype-utf8.c:5110(my_strcasecmp_utf8mb3)[0x5652e4bcf0ad]
            dict/dict0dict.cc:4709(dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**))[0x5652e4ab9759]
            dict/dict0dict.cc:2849(dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**))[0x5652e4ab99b5]
            dict/dict0dict.cc:3007(dict_foreign_add_to_cache(dict_foreign_t*, char const**, bool, dict_err_ignore_t))[0x5652e4abe57b]
            dict/dict0load.cc:3033(dict_load_foreign)[0x5652e4ac59ce]
            handler/handler0alter.cc:9914(innobase_update_foreign_cache(ha_innobase_inplace_ctx*, THD*))[0x5652e4992a63]
            handler/handler0alter.cc:11473(ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool))[0x5652e499a319]
            sql/sql_table.cc:7484(mysql_inplace_alter_table)[0x5652e454a424]
            sql/sql_alter.cc:552(Sql_cmd_alter_table::execute(THD*))[0x5652e45ab291]
            sql/sql_parse.cc:6000(mysql_execute_command(THD*, bool))[0x5652e44b2b87]
            sql/sql_parse.cc:8036(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5652e44a33c0]
            sql/sql_parse.cc:1955(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5652e44ae2e0]
            sql/sql_parse.cc:1409(do_command(THD*, bool))[0x5652e44af810]
            sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5652e45a668f]
            sql/sql_connect.cc:1318(handle_one_connection)[0x5652e45a69cd]
            perfschema/pfs.cc:2204(pfs_spawn_thread)[0x5652e48e4765]
            nptl/pthread_create.c:487(start_thread)[0x7fee55c24fa3]
            x86_64/clone.S:97(clone)[0x7fee5582e06f]
            
            

            alice Alice Sherepa added a comment - - edited 230201 14:12:01 [ERROR] mysqld got signal 11 ; Server version: 10.6.12-MariaDB-log source revision: 0e737f78980fcfe83b05c27215eb3f5ede1ea473   ??:0(__restore_rt)[0x7fee55c2f730] strings/ctype-utf8.c:5110(my_strcasecmp_utf8mb3)[0x5652e4bcf0ad] dict/dict0dict.cc:4709(dict_foreign_qualify_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**))[0x5652e4ab9759] dict/dict0dict.cc:2849(dict_foreign_find_index(dict_table_t const*, char const**, char const**, unsigned long, dict_index_t const*, bool, unsigned long, fkerr_t*, unsigned long*, dict_index_t**))[0x5652e4ab99b5] dict/dict0dict.cc:3007(dict_foreign_add_to_cache(dict_foreign_t*, char const**, bool, dict_err_ignore_t))[0x5652e4abe57b] dict/dict0load.cc:3033(dict_load_foreign)[0x5652e4ac59ce] handler/handler0alter.cc:9914(innobase_update_foreign_cache(ha_innobase_inplace_ctx*, THD*))[0x5652e4992a63] handler/handler0alter.cc:11473(ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool))[0x5652e499a319] sql/sql_table.cc:7484(mysql_inplace_alter_table)[0x5652e454a424] sql/sql_alter.cc:552(Sql_cmd_alter_table::execute(THD*))[0x5652e45ab291] sql/sql_parse.cc:6000(mysql_execute_command(THD*, bool))[0x5652e44b2b87] sql/sql_parse.cc:8036(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5652e44a33c0] sql/sql_parse.cc:1955(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5652e44ae2e0] sql/sql_parse.cc:1409(do_command(THD*, bool))[0x5652e44af810] sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5652e45a668f] sql/sql_connect.cc:1318(handle_one_connection)[0x5652e45a69cd] perfschema/pfs.cc:2204(pfs_spawn_thread)[0x5652e48e4765] nptl/pthread_create.c:487(start_thread)[0x7fee55c24fa3] x86_64/clone.S:97(clone)[0x7fee5582e06f]

            People

              vlad.lesin Vladislav Lesin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.