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

ib_uint64_t btr_read_autoinc(dict_index_t*): Assertion `index->table->persistent_autoinc' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found on 10.11

      Server_bin/10.11L_debug_Og<- GIT_SHOW: HEAD -> main, origin/main, origin/HEAD 3a2f8e27981b76b99d2b87cc3bcec5ef022b2b23

      # 2026-04-10T08:13:53 [1889504] | mariadbd: /data/Server/10.11L/storage/innobase/btr/btr0btr.cc:1178: ib_uint64_t btr_read_autoinc(dict_index_t*): Assertion `index->table->persistent_autoinc' failed.
      

      StackTrace

      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  __GI_abort () at ./stdlib/abort.c:79
      #5  __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry="index->table->persistent_autoinc", file=file@entry="/data/Server/10.11L/storage/innobase/btr/btr0btr.cc", 
          line=line@entry=1178, function=function@entry="ib_uint64_t btr_read_autoinc(dict_index_t*)") at ./assert/assert.c:94
      #6  __assert_fail (assertion="index->table->persistent_autoinc", file="/data/Server/10.11L/storage/innobase/btr/btr0btr.cc", line=1178, function="ib_uint64_t btr_read_autoinc(dict_index_t*)")
          at ./assert/assert.c:103
      #7  btr_read_autoinc (index=index@entry=) at /data/Server/10.11L/storage/innobase/btr/btr0btr.cc:1178
      #8  prepare_inplace_alter_table_dict (ha_alter_info=<optimized out>, altered_table=altered_table@entry=, old_table=<optimized out>, old_opt=<optimized out>, table_name=<optimized out>, flags=<optimized out>, 
          flags2=<optimized out>, fts_doc_id_col=<optimized out>, add_fts_doc_id=<optimized out>, add_fts_doc_id_idx=<optimized out>) at /data/Server/10.11L/storage/innobase/handler/handler0alter.cc:7287
      #9  ha_innobase::prepare_inplace_alter_table (this=, altered_table=<optimized out>, ha_alter_info=<optimized out>) at /data/Server/10.11L/storage/innobase/handler/handler0alter.cc:8753
      #10 handler::ha_prepare_inplace_alter_table (this=, altered_table=altered_table@entry=, ha_alter_info=ha_alter_info@entry=) at /data/Server/10.11L/sql/handler.cc:5994
      #11 mysql_inplace_alter_table (thd=thd@entry=, table_list=, table=table@entry=, altered_table=altered_table@entry=, ha_alter_info=ha_alter_info@entry=, target_mdl_request=target_mdl_request@entry=, 
          ddl_log_state=, trigger_param=, alter_ctx=, partial_alter=false, start_alter_id=0, if_exists=false) at /data/Server/10.11L/sql/sql_table.cc:8255
      #12 mysql_alter_table (thd=thd@entry=, new_db=new_db@entry=, new_name=<optimized out>, create_info=create_info@entry=, table_list=<optimized out>, table_list@entry=, recreate_info=recreate_info@entry=, 
          alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /data/Server/10.11L/sql/sql_table.cc:11812
      #13 Sql_cmd_alter_table::execute (this=<optimized out>, thd=) at /data/Server/10.11L/sql/sql_alter.cc:695
      #14 mysql_execute_command (thd=thd@entry=, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11L/sql/sql_parse.cc:5902
      #15 mysql_parse (thd=thd@entry=, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=) at /data/Server/10.11L/sql/sql_parse.cc:7941
      #16 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=, packet=packet@entry="ALTER TABLE ivc_t7 ENGINE=InnoDB /* E_R Thread21 QNO 1146 CON_ID 263 */ ", packet_length=packet_length@entry=72, 
          blocking=blocking@entry=true) at /data/Server/10.11L/sql/sql_parse.cc:1898
      #17 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/10.11L/sql/sql_parse.cc:1432
      #18 do_handle_one_connection (connect=<optimized out>, connect@entry=, put_in_cache=put_in_cache@entry=true) at /data/Server/10.11L/sql/sql_connect.cc:1503
      #19 handle_one_connection (arg=) at /data/Server/10.11L/sql/sql_connect.cc:1415
      #20 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #21 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
       
      (rr) frame 7
      #7  btr_read_autoinc (index=index@entry=) at /data/Server/10.11L/storage/innobase/btr/btr0btr.cc:1178
      1178      ut_ad(index->table->persistent_autoinc);
      (rr) info args
      index = 
      (rr) info locals
      __PRETTY_FUNCTION__ = "ib_uint64_t btr_read_autoinc(dict_index_t*)"
      mtr = {m_start = 165, m_commit = 165, m_freeing_tree = 165, m_last = , m_last_offset = 42405, m_log_mode = 1, m_modifications = 1, m_made_dirty = 0, m_latch_ex = 0, m_trim_pages = 1, m_crc = 2779096485, trx = , 
        m_user_space = , m_user_space_id = 2779096485, m_memo = {<small_vector_base> = {BeginX = , Size = 2779096485, Capacity = 2779096485}, small = {{object = , type = 3088463576}, {object = , type = 3088463560}, {
              object = , type = 0}, {object = , type = 5472821}, {object = , type = 100848639}, {object = , type = 100848639}, {object = , type = 5472824}, {object = , type = 319962368}, {object = , 
              type = 1401042193}, {object = , type = 1401042448}, {object = , type = 964956243}, {object = , type = 100848639}, {object = , type = 3302123990}, {object = , type = 1360089986}, {object = , 
              type = 812056452}, {object = , type = 812217473}}}, m_log = {m_heap = , m_list = {sentinel_ = {next = , prev = }}, m_first_block = {<ilist_node<void>> = {next = , prev = }, m_buf_end = 114906080089672, 
            m_magic_n = 123702441556752, 
            m_data = "\000\000\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "\001\f\020\224\201h\000\000\220\036h0za\000\000\002\000\000\000\001\000\000\000@J5\250\201h\000\000\020\030\026\250\201h\000\000#\
      026t0za\000\000\276\a\000\000\000\000\000\000\017\000\000\000\000\000\000\000\000\030\026\250\201h\000\000\377\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000X\t$\250\201h\000\000H\026\026\250\201h\000
      \000\202Q\2150za\000\0008\314\v\234\201h\000\000\000\000\000\000\000\000\000\000\340\254\3563za\000\000\000\000\000\000\000\000\000\000\200\263\207\274\201p\000\000TEn\274\201p\000\000\340\254\3563za\000\000\0209\
      026\270\201p\000\000"..., m_used = 0}}, m_commit_lsn = 0, m_freed_space = , m_freed_pages = , m_binlog_page = }
      err = 2779096485
      autoinc = <optimized out>
      (rr) p index
      $1 = (dict_index_t *) 
      

      RQG startup options

      # $RQG_HOME/rqg.pl \
      # --gendata=conf/mariadb/table_stress.zz \
      # --gendata_sql=conf/mariadb/table_stress.sql \
      # --grammar=conf/mariadb/table_stress_innodb_nocopy1.yy \
      # --mysqld=--log-bin \
      # --rpl_mode=mixed \
      # --mysqld=--loose-innodb_lock_schedule_algorithm=fcfs \
      # --mysqld=--loose-idle_write_transaction_timeout=0 \
      # --mysqld=--loose-idle_transaction_timeout=0 \
      # --mysqld=--loose-idle_readonly_transaction_timeout=0 \
      # --mysqld=--connect_timeout=60 \
      # --mysqld=--interactive_timeout=28800 \
      # --mysqld=--slave_net_timeout=60 \
      # --mysqld=--net_read_timeout=30 \
      # --mysqld=--net_write_timeout=60 \
      # --mysqld=--loose-table_lock_wait_timeout=50 \
      # --mysqld=--wait_timeout=28800 \
      # --no_mask \
      # --queries=10000000 \
      # --seed=random \
      # --reporters=None \
      # --reporters=ErrorLog \
      # --reporters=Deadlock \
      # --validators=None \
      # --mysqld=--log_output=none \
      # --mysqld=--log_bin_trust_function_creators=1 \
      # --mysqld=--loose-debug_assert_on_not_freed_memory=0 \
      # --engine=InnoDB \
      # --restart_timeout=240 \
      # --mysqld=--plugin-load-add=file_key_management.so \
      # --mysqld=--loose-file-key-management-filename=$RQG_HOME/conf/mariadb/encryption_keys.txt \
      # --mysqld=--plugin-load-add=provider_lzo.so \
      # --mysqld=--plugin-load-add=provider_bzip2.so \
      # --mysqld=--plugin-load-add=provider_lzma.so \
      # --mysqld=--plugin-load-add=provider_snappy.so \
      # --mysqld=--plugin-load-add=provider_lz4.so \
      # --mysqld=--loose-innodb_compression_level=1 \
      # --duration=300 \
      # --mysqld=--loose-innodb_fatal_semaphore_wait_threshold=300 \
      # --redefine=conf/mariadb/redefine_indexed_vcols.yy \
      # --mysqld=--lock-wait-timeout=15 \
      # --mysqld=--innodb-lock-wait-timeout=10 \
      # --mysqld=--loose-innodb_fast_shutdown=0 \
      # --mysqld=--sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION \
      # --mysqld=--innodb_file_per_table=1 \
      # --mysqld=--loose-innodb_read_only_compressed=OFF \
      # --mysqld=--loose-innodb-sync-debug \
      # --mysqld=--innodb_stats_persistent=on \
      # --mysqld=--innodb_adaptive_hash_index=off \
      # --mysqld=--innodb_random_read_ahead=ON \
      # --mysqld=--innodb_read_ahead_threshold=0 \
      # --mysqld=--log-bin \
      # --mysqld=--sync-binlog=1 \
      # --mysqld=--loose-innodb_evict_tables_on_commit_debug=off \
      # --threads=33 \
      # --rr=rr record --wait \
      # --mysqld=--innodb_undo_log_truncate=OFF \
      # --mysqld=--innodb_undo_tablespaces=0 \
      # --mysqld=--innodb_rollback_on_timeout=ON \
      # --mysqld=--innodb_page_size=4K \
      # --mysqld=--innodb-buffer-pool-size=5M \
      # --vardir_type=fast \
      # --no_mask \
      # --batch \
      # --basedir1=/Server_bin/10.11L_debug_Og \
      # --basedir2=/Server_bin/10.11L_debug_Og \
      # --script_debug=_nix_ \
      # --major_runid=1775810721 \
      # --minor_runid=86
      #--------
      # rqg_rr_add ->"--innodb-use-native-aio=0" "--loose-innodb-write-io-threads=2" "--loose-innodb-read-io-threads=1" "--loose-gdb" "--loose-debug-gdb"<-
      # vardir ->/dev/shm/rqg/1775810721/86<- fs_type=tmpfs
      

      RR trace is present on SDP:-
      /data/results/1775810721/TBR-2399
      _RR_TRACE_DIR=./1/rr rr replay --mark-stdio

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            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.