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

Assert in trx_purge_add_update_undo_to_history during shutdown

    XMLWordPrintable

Details

    Description

      ML13.test
      ----------------
      --source include/have_innodb.inc
       
      --disable_abort_on_error
      CREATE TABLE t1 (col3 INT, col4 VARCHAR(10)) ENGINE = InnoDB ;
      ALTER TABLE t1 ADD FULLTEXT KEY ftidx ( col4 ) ;
      INSERT INTO t1 (col3,col4) VALUES (1,'1'), (1,'1')  ;
      ALTER TABLE t1 DROP KEY ftidx ;
      # Get the assert on shutdown
      --error ER_DUP_ENTRY
      ALTER TABLE t1 ADD UNIQUE KEY uidx ( col3 ), ADD FULLTEXT KEY ftidx ( col4 ) ;
       
      ./mtr --mem ML13
      Logging: /home/mleich/Server/10.2/mysql-test/mysql-test-run.pl  --mem ML13
      ...
      MariaDB Version 10.2.31-MariaDB-debug
      ...
      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      CREATE TABLE t1 (col3 INT, col4 VARCHAR(10)) ENGINE = InnoDB ;
      ALTER TABLE t1 ADD FULLTEXT KEY ftidx ( col4 ) ;
      Warnings:
      Warning 124     InnoDB rebuilding table to add column FTS_DOC_ID
      INSERT INTO t1 (col3,col4) VALUES (1,'1'), (1,'1')  ;
      ALTER TABLE t1 DROP KEY ftidx ;
      ALTER TABLE t1 ADD UNIQUE KEY uidx ( col3 ), ADD FULLTEXT KEY ftidx ( col4 ) ;
      ERROR 23000: Duplicate entry '1' for key 'uidx'
      ***Warnings generated in error logs during shutdown after running tests: main.ML13
       
      mysqld: storage/innobase/trx/trx0purge.cc:292: void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*): Assertion `srv_undo_sources || trx->undo_no == 0 || ((srv_is_being_started || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_sys->state == PURGE_STATE_DISABLED) || ((trx->in_mysql_trx_list || trx->internal) && srv_fast_shutdown)' failed.
      Attempting backtrace. You can use the following information to find out
       
      mysql-test-run: *** ERROR: Test suite aborted
       
      Content of var/log/mysqld.1.err (shortened)
      -------------------------------------------
      CURRENT_TEST: main.ML13
      2020-01-24 19:07:44 140468614063936 [Note] /home/mleich/Server/10.2/bld_debug/sql/mysqld (mysqld 10.2.31-MariaDB-debug-log) starting as process 2290 ...
      ...
      2020-01-24 19:07:44 140468614063936 [Note] /home/mleich/Server/10.2/bld_debug/sql/mysqld: ready for connections.
      Version: '10.2.31-MariaDB-debug-log'  socket: '/home/mleich/Server/10.2/bld_debug/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      2020-01-24 19:07:45 140468479891200 [Note] /home/mleich/Server/10.2/bld_debug/sql/mysqld (initiated by: root[root] @ localhost [127.0.0.1]): Normal shutdown
      2020-01-24 19:07:45 140468096587520 [Note] InnoDB: FTS optimize thread exiting.
      2020-01-24 19:07:45 140468479891200 [Note] Event Scheduler: Purging the queue. 0 events
      mysqld: /home/mleich/Server/10.2/storage/innobase/trx/trx0purge.cc:292: void trx_purge_add_update_undo_to_history(trx_t*, ib_page_t*, mtr_t*): Assertion `srv_undo_sources || trx->undo_no == 0 || ((srv_is_being_started || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND && purge_sys->state == PURGE_STATE_DISABLED) || ((trx->in_mysql_trx_list || trx->internal) && srv_fast_shutdown)' failed.
      200124 19:07:45 [ERROR] mysqld got signal 6 ;
      ...
      Server version: 10.2.31-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=0
      ....
      Thread pointer: 0x0
      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 = 0x0 thread_stack 0x49000
      /home/mleich/Server/10.2/bld_debug/sql/mysqld(my_print_stacktrace+0x38)[0x560a4482fabe]
      mysys/stacktrace.c:267(my_print_stacktrace)[0x560a44084a7c]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x13150)[0x7fc164438150]
      linux/raise.c:51(__GI_raise)[0x7fc1637890bb]
      stdlib/abort.c:92(__GI_abort)[0x7fc16378af5d]
      assert/assert.c:92(__assert_fail_base)[0x7fc163780f17]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2efc2)[0x7fc163780fc2]
      trx/trx0purge.cc:303(trx_purge_add_update_undo_to_history(trx_t*, unsigned char*, mtr_t*))[0x560a44469f53]
      trx/trx0undo.cc:1750(trx_undo_update_cleanup(trx_t*, unsigned char*, mtr_t*))[0x560a444a1281]
      trx/trx0trx.cc:1421(trx_write_serialisation_history(trx_t*, mtr_t*))[0x560a4449099a]
      trx/trx0trx.cc:1881(trx_commit_low(trx_t*, mtr_t*))[0x560a44492242]
      trx/trx0trx.cc:1939(trx_commit(trx_t*))[0x560a444923d4]
      trx/trx0trx.cc:2163(trx_commit_for_mysql(trx_t*))[0x560a44492c81]
      dict/dict0dict.cc:445(dict_table_try_drop_aborted(dict_table_t*, unsigned long, int))[0x560a44544b51]
      dict/dict0dict.cc:535(dict_table_close(dict_table_t*, unsigned long, unsigned long))[0x560a44544ea2]
      row/row0mysql.cc:1039(row_prebuilt_free(row_prebuilt_t*, unsigned long))[0x560a443d61bd]
      handler/ha_innodb.cc:6663(ha_innobase::close())[0x560a442953e8]
      sql/handler.cc:2650(handler::ha_close())[0x560a4408b9a7]
      sql/table.cc:3490(closefrm(TABLE*))[0x560a43f0e4b6]
      sql/table_cache.cc:223(intern_close_table(TABLE*))[0x560a43ffcb1b]
      sql/table_cache.cc:334(tc_purge(bool))[0x560a43ffcf3f]
      sql/sql_base.cc:376(close_cached_tables(THD*, TABLE_LIST*, bool, unsigned long))[0x560a43d8f746]
      sql/table_cache.cc:648(tdc_start_shutdown())[0x560a43ffdfbc]
      sql/mysqld.cc:2225(clean_up(bool))[0x560a43d204df]
      sql/mysqld.cc:2100(unireg_end())[0x560a43d1ffdf]
      sql/mysqld.cc:2026(kill_server(void*))[0x560a43d1fed9]
      sql/mysqld.cc:2051(kill_server_thread)[0x560a43d1ff1b]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x560a447830ab]
      nptl/pthread_create.c:465(start_thread)[0x7fc16442c7fc]
      x86_64/clone.S:97(clone)[0x7fc163866b5f]
      <snip>
      

      Attachments

        1. ML13.test
          0.4 kB
          Matthias Leich

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            mleich Matthias Leich
            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.