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

Server crash on converting table to utf8mb3

    XMLWordPrintable

Details

    Description

      The following test crashes with --innodb_page_size=4k

      CREATE TABLE t (c TEXT,PRIMARY KEY(c (768))) ENGINE=InnoDB;
      INSERT INTO t VALUES (100);
      ALTER TABLE t CONVERT TO CHARACTER SET utf8mb3;
      SELECT 1 FROM t GROUP BY @b :=@a,@b;
      

      mysqld: ../storage/innobase/dict/dict0dict.cc:2322: dict_index_t *dict_index_build_internal_clust(dict_index_t *): Assertion `!index->has_virtual()' failed.
      210624 20:29:01 [ERROR] 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.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.4.20-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=3
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63650 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fca30001618
      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 = 0x7fca440f8d50 thread_stack 0x49000
      mysys/stacktrace.c:174(my_print_stacktrace)[0x56432441a47b]
      sql/signal_handler.cc:222(handle_fatal_signal)[0x564323994624]
      /usr/lib/libpthread.so.0(+0x13960)[0x7fca5422d960]
      :0(__GI_raise)[0x7fca53e8bef5]
      :0(__GI_abort)[0x7fca53e75862]
      loadmsgcat.c:0(_nl_load_domain.cold)[0x7fca53e75747]
      :0(__GI___assert_fail)[0x7fca53e84646]
      /home/nik/mariadb/bld/sql/mysqld(+0x13dcab4)[0x5643240a3ab4]
      dict/dict0dict.cc:2322(dict_index_build_internal_clust(dict_index_t*))[0x5643240a2a70]
      dict/dict0crea.cc:1249(dict_create_index_step(que_thr_t*))[0x56432408f488]
      que/que0que.cc:1048(que_thr_step(que_thr_t*))[0x564323e0aa94]
      que/que0que.cc:1100(que_run_threads_low(que_thr_t*))[0x564323e099d5]
      que/que0que.cc:1142(que_run_threads(que_thr_t*))[0x564323e096ed]
      row/row0mysql.cc:2560(row_create_index_for_mysql(dict_index_t*, trx_t*, unsigned long const*))[0x564323e8ed07]
      handler/ha_innodb.cc:11371(create_index(trx_t*, TABLE const*, dict_table_t*, unsigned int))[0x564323ca56ec]
      handler/ha_innodb.cc:12454(create_table_info_t::create_table(bool))[0x564323c816ba]
      handler/ha_innodb.cc:12975(ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*, bool, trx_t*))[0x564323ca696f]
      handler/ha_innodb.cc:13026(ha_innobase::create(char const*, TABLE*, HA_CREATE_INFO*))[0x564323c8307f]
      addr2line: DWARF error: could not find variable specification at offset 8445
      sql/handler.cc:4790(handler::ha_create(char const*, TABLE*, HA_CREATE_INFO*))[0x5643239a75ad]
      sql/handler.cc:5255(ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*))[0x5643239a92be]
      sql/sql_table.cc:10308(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))[0x5643236abf91]
      sql/sql_alter.cc:520(Sql_cmd_alter_table::execute(THD*))[0x56432376ebd7]
      sql/sql_parse.cc:6189(mysql_execute_command(THD*))[0x564323591b56]
      sql/sql_parse.cc:7992(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56432357d284]
      sql/sql_parse.cc:1857(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56432357945e]
      sql/sql_parse.cc:1373(do_command(THD*))[0x56432357e2a4]
      sql/sql_connect.cc:1412(do_handle_one_connection(CONNECT*))[0x564323763014]
      sql/sql_connect.cc:1316(handle_one_connection)[0x564323762dca]
      perfschema/pfs.cc:1869(pfs_spawn_thread)[0x564324387a05]
      pthread_create.c:0(start_thread)[0x7fca54223299]
      :0(__GI___clone)[0x7fca53f4e053]
      

      Note that the assertion fails on ALTER TABLE, however the original issue was reported for a different assertion in SELECT in MDEV-18166, and was only reproducible in 10.5+.

      So please commit with it with SELECT. The original task was resolved during the fix of an alternative case.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              nikitamalyavin Nikita Malyavin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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