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

Background thread returns uninitialized statistics to Mysql interpreter

Details

    Description

      Background thread return uninitialized statistics to mysql interpreter.
      InnoDB encounter the following stack trace:

      2021-04-21 09:31:33 0x7f60a27fc700  InnoDB: Assertion failure in file /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc line 14309
      InnoDB: Failing assertion: ib_table->stat_initialized
      #6  0x000055879fcac91d in ut_dbg_assertion_failed (expr=0x5587a0373ad7 "ib_table->stat_initialized", file=0x5587a036d410 "/home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc", line=14309) at /home/elenst/src/10.4/storage/innobase/ut/ut0dbg.cc:60
      #7  0x000055879fa30b51 in ha_innobase::info_low (this=0x7f608c00d708, flag=282, is_analyze=false) at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:14309
      #8  0x000055879fa31479 in ha_innobase::info (this=0x7f608c00d708, flag=282) at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:14564
      #9  0x000055879fa1f5f2 in ha_innobase::open (this=0x7f608c00d708, name=0x7f608c00c300 "./test/t5_InnoDB") at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:6403
      #10 0x000055879f794c33 in handler::ha_open (this=0x7f608c00d708, table_arg=0x7f608c00c440, name=0x7f608c00c300 "./test/t5_InnoDB", mode=2, test_if_locked=18, mem_root=0x0, partitions_to_open=0x0) at /home/elenst/src/10.4/sql/handler.cc:2786
      #11 0x000055879f5564a6 in open_table_from_share (thd=0x7f608c000af0, share=0x7f608c00bd68, alias=0x7f608c00b650, db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7f608c00c440, is_create_table=false, partitions_to_open=0x0) at /home/elenst/src/10.4/sql/table.cc:3980
      #12 0x000055879f37e458 in open_table (thd=0x7f608c000af0, table_list=0x7f608c00b608, ot_ctx=0x7f60a27f9eb0) at /home/elenst/src/10.4/sql/sql_base.cc:2099
      #13 0x000055879f3b554c in open_purge_table (thd=0x7f608c000af0, db=0x7f60a27f9f60 "test", dblen=4, tb=0x7f60a27fa100 "t5_InnoDB", tblen=9) at /home/elenst/src/10.4/sql/sql_class.cc:4764
      #14 0x000055879fa3acbf in innodb_acquire_mdl (thd=0x7f608c000af0, table=0x7f6058448790) at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:20628
      #15 0x000055879fa3b06d in innodb_find_table_for_vc (thd=0x7f608c000af0, table=0x7f6058448790) at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:20701
      #16 0x000055879fa3b6c0 in innobase_allocate_row_for_vcol (thd=0x7f608c000af0, index=0x7f6058237d30, heap=0x7f60a27fa610, table=0x7f60a27fa5b8, storage=0x7f60a27fa5f0) at /home/elenst/src/10.4/storage/innobase/handler/ha_innodb.cc:20856
      #17 0x000055879fba9ffe in ib_vcol_row::record (this=0x7f60a27fa5f0, thd=0x7f608c000af0, index=0x7f6058237d30, table=0x7f60a27fa5b8) at /home/elenst/src/10.4/storage/innobase/include/row0mysql.h:887
      #18 0x000055879fc3a410 in row_vers_build_clust_v_col (row=0x7f608c00b0b0, clust_index=0x7f60582513d0, index=0x7f6058237d30, heap=0x7f608c00b000, vcol_info=0x5587a35038c8) at /home/elenst/src/10.4/storage/innobase/row/row0vers.cc:471
      #19 0x000055879fc3b95f in row_vers_old_has_index_entry (also_curr=true, rec=0x7f60bb08f67d "\201}\235", mtr=0x7f60a27faa60, index=0x7f6058237d30, ientry=0x7f608c00aa90, roll_ptr=20266198343425207, trx_id=9433, vcol_info=0x5587a35038c8) at /home/elenst/src/10.4/storage/innobase/row/row0vers.cc:966
      #20 0x000055879fbf64f3 in row_purge_poss_sec (node=0x5587a3503720, index=0x7f6058237d30, entry=0x7f608c00aa90, sec_pcur=0x7f60a27fafb0, sec_mtr=0x7f60a27fb200, is_tree=false) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:325
      #21 0x000055879fbf73e3 in row_purge_remove_sec_if_poss_leaf (node=0x5587a3503720, index=0x7f6058237d30, entry=0x7f608c00aa90) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:583
      #22 0x000055879fbf78f2 in row_purge_remove_sec_if_poss (node=0x5587a3503720, index=0x7f6058237d30, entry=0x7f608c00aa90) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:696
      #23 0x000055879fbf7b02 in row_purge_del_mark (node=0x5587a3503720) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:770
      #24 0x000055879fbf9738 in row_purge_record_func (node=0x5587a3503720, undo_rec=0x7f60940560e8 "", thr=0x5587a3503550, updated_extern=false) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:1197
      #25 0x000055879fbf9a96 in row_purge (node=0x5587a3503720, undo_rec=0x7f60940560e8 "", thr=0x5587a3503550) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:1263
      #26 0x000055879fbf9d09 in row_purge_step (thr=0x5587a3503550) at /home/elenst/src/10.4/storage/innobase/row/row0purge.cc:1322
      #27 0x000055879fb62be1 in que_thr_step (thr=0x5587a3503550) at /home/elenst/src/10.4/storage/innobase/que/que0que.cc:1038
      #28 0x000055879fb62e72 in que_run_threads_low (thr=0x5587a3503550) at /home/elenst/src/10.4/storage/innobase/que/que0que.cc:1100
      #29 0x000055879fb630be in que_run_threads (thr=0x5587a3503550) at /home/elenst/src/10.4/storage/innobase/que/que0que.cc:1140
      #30 0x000055879fc455ae in srv_task_execute (slot=0x5587a0c449b0 <srv_sys+560>) at /home/elenst/src/10.4/storage/innobase/srv/srv0srv.cc:2465
      #31 0x000055879fc457cf in srv_worker_thread (arg=0x0) at /home/elenst/src/10.4/storage/innobase/srv/srv0srv.cc:2513
      #32 0x00007f60e0756dd5 in start_thread () from /lib64/libpthread.so.0
      #33 0x00007f60deb12ead in clone () from /lib64/libc.so.6
      

      InnoDB shouldn't call info() if the table is being opened by background thread.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

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