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

Unexpected error, crash, MSAN errors, assertion failures upon CHECK

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • 12.0
    • Admin statements
    • None

    Description

      Upd: See more meaningful test cases in the comments.

      --source include/have_innodb.inc
       
      CREATE TABLE t (a TIME, b INET6, KEY(a)) ENGINE=InnoDB;
      INSERT INTO t VALUES ('00:00:00','::');
      SET FOREIGN_KEY_CHECKS = OFF;
      ALTER TABLE t ADD FOREIGN KEY (b) REFERENCES t (a);
      SET FOREIGN_KEY_CHECKS = ON;
      CHECK TABLE t EXTENDED;
       
      DROP TABLE t;
      

      bb-11.8-check-table b29b30e75ec5ff60970a7d80c96adbc830318a5a

      mariadbd: /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/key.cc:165: void key_copy(uchar*, const uchar*, const KEY*, const KEY*, uint, bool): Assertion `to_key_part->length >= key_part->length' failed.
      250122 22:23:21 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f71f5c53eb2 in __GI___assert_fail (assertion=0x558caafff700 "to_key_part->length >= key_part->length", file=0x558caafff620 "/data/bld/preview-11.8-bb-11.8-check-table-asan/sql/key.cc", line=165, function=0x558caafff680 "void key_copy(uchar*, const uchar*, const KEY*, const KEY*, uint, bool)") at ./assert/assert.c:101
      #10 0x0000558ca9301417 in key_copy (to_key=0x6290000fbeb9 "", from_record=0x6190000ceec8 "\371\200", from_key_info=0x6190000cf470, to_key_info=0x6190000d02b8, key_length=3, with_zerofill=false) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/key.cc:165
      #11 0x0000558ca8fe86dd in handler::check_record_reference (this=0x61d0003098b8, this_key=0x6190000cf470, ref_key=0x6190000d02b8, fk_parts=1, key_buf=0x6290000fbeb8 "", prefix_length=4, this_record=0x6190000ceec8 "\371\200", ref_record=0x6190000cfdc8 "\377\200") at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:7962
      #12 0x0000558ca8b48ffd in check_key_referential_integrity (table=0x6190000ce998, ref_table=0x6190000cf898, this_key=0x6190000cf470, ref_key=0x6190000d02b8, fk_parts=1, key_buf=0x6290000fbeb8 "", fk_name=...) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1754
      #13 0x0000558ca8b498fd in check_foreign_key_relation (thd=0x62c0001e0218, this_table=0x6190000ce998, ref_table=0x6190000cf898, fk=..., key_buf=0x6290000fbeb8 "") at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1861
      #14 0x0000558ca8b4a350 in check_foreign_key_relations (thd=0x62c0001e0218, table=0x6190000ce998) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1921
      #15 0x0000558ca8fd1d5e in handler::ha_check (this=0x61d000307ab8, thd=0x62c0001e0218, check_opt=0x62c0001e5a88) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:5398
      #16 0x0000558ca8b41cc0 in mysql_admin_table (thd=0x62c0001e0218, tables=0x6290000fa330, check_opt=0x62c0001e5a88, operator_name=0x558cac074ba0 <msg_check>, lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, no_errors_from_open=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x558ca8fd187c <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x558ca89ec1f5 <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=false) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:942
      #17 0x0000558ca8b47f08 in Sql_cmd_check_table::execute (this=0x6290000faa60, thd=0x62c0001e0218) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1660
      #18 0x0000558ca8631131 in mysql_execute_command (thd=0x62c0001e0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:5872
      #19 0x0000558ca863e150 in mysql_parse (thd=0x62c0001e0218, rawbuf=0x6290000fa238 "CHECK TABLE t EXTENDED", length=22, parser_state=0x7f71e6469a30) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:7901
      #20 0x0000558ca8615291 in dispatch_command (command=COM_QUERY, thd=0x62c0001e0218, packet=0x629000280219 "", packet_length=22, blocking=true) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1903
      #21 0x0000558ca8611f99 in do_command (thd=0x62c0001e0218, blocking=true) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1416
      #22 0x0000558ca8b04a89 in do_handle_one_connection (connect=0x608000004c38, put_in_cache=true) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1415
      #23 0x0000558ca8b045e8 in handle_one_connection (arg=0x608000004bb8) at /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1327
      #24 0x0000558ca97b04f8 in pfs_spawn_thread (arg=0x617000008218) at /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2198
      #25 0x00007f71f5ca81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #26 0x00007f71f5d2885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              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.