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

InnoDB: Failing assertion: !cursor->index->is_committed()

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      MariaDB crashed on !cursor->index->is_committed() assertion during the insert operation.
      Running 10.4.33 for a long time with no changes in schema related to the table in question as well as there were no significant traffic pattern changes either. This server is used as a writable primary.

      There is a resolved issue with exactly the same stack trace exists (https://jira.mariadb.org/browse/MDEV-22076), but there are different circumstances and it is marked as resolved in prior versions.

      So far this was a one-time occurrence which we were not able to reproduce.
      Is there anything that we can use to reason about this issue was addressed in later versions and upgrading will help?

      Table structure:

      CREATE TABLE `table_in_question` (
        `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
        `a` varchar(128) NOT NULL,
        `b` varchar(128) NOT NULL,
        `c` varchar(128) NOT NULL,
        `d` int(11) NOT NULL,
        `e` varchar(128) DEFAULT NULL,
        `f` varchar(1024) DEFAULT NULL,
        PRIMARY KEY (`id`),
        UNIQUE KEY `unique_key` (`c`,`b`),
        KEY `sec1` (`a`),
        KEY `sec2` (`b`),
        KEY `sec3` (`c`,`a`),
        KEY `sec4` (`e`),
        CONSTRAINT `fk1` FOREIGN KEY (`c`) REFERENCES `c_table` (`c`)
      ) ENGINE=InnoDB AUTO_INCREMENT=1234 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPRESSED 
      

      Assertion found in the error.log:

      InnoDB: Assertion failure in file src/storage/innobase/row/row0ins.cc line 219
      InnoDB: Failing assertion: !cursor->index->is_committed()
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
      InnoDB: about forcing recovery.
      [ERROR] mysqld got signal 6 ;
       
      Server version: 10.4.33-MariaDB-log source revision:
      

      Full stack trace recovered from the core dump:

      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00007f0dca17d148 in __GI_abort () at abort.c:79
      #2  0x0000561695d8456c in ut_dbg_assertion_failed (expr=expr@entry=0x561696780998 "!cursor->index->is_committed()", file=file@entry=0x561696780828 "src/storage/innobase/row/row0ins.cc", line=line@entry=219)
          at src/storage/innobase/ut/ut0dbg.cc:60
      #3  0x000056169635af10 in row_ins_sec_index_entry_by_modify (mtr=0x7e755def2630, thr=0x7e7ad9e36858, entry=<optimized out>, heap=0x7e79e4fa8a00, offsets_heap=<optimized out>, offsets=0x7e755def1520, cursor=0x7e755def15d0, 
          mode=2, flags=0) at src/storage/innobase/row/row0ins.cc:219
      #4  row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x7e7adbd04568, offsets_heap=<optimized out>, offsets_heap@entry=0x7e78fdd16500, heap=heap@entry=0x7e79e4fa8a00, 
          entry=entry@entry=0x7e7ac6dd5a28, trx_id=<optimized out>, thr=<optimized out>) at src/storage/innobase/row/row0ins.cc:3157
      #5  0x00005616963608a8 in row_ins_sec_index_entry (index=index@entry=0x7e7adbd04568, entry=0x7e7ac6dd5a28, thr=thr@entry=0x7e7ad9e36858, check_foreign=check_foreign@entry=true) at src/storage/innobase/row/row0ins.cc:3369
      #6  0x0000561696360e05 in row_ins_index_entry (thr=0x7e7ad9e36858, entry=<optimized out>, index=<optimized out>) at src/storage/innobase/row/row0ins.cc:3417
      #7  row_ins_index_entry_step (thr=0x7e7ad9e36858, node=<optimized out>) at src/storage/innobase/row/row0ins.cc:3584
      #8  row_ins (thr=<optimized out>, node=<optimized out>) at src/storage/innobase/row/row0ins.cc:3721
      #9  row_ins_step (thr=thr@entry=0x7e7ad9e36858) at src/storage/innobase/row/row0ins.cc:3864
      #10 0x0000561696373264 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7e7aeac5b620 "\374\205\253\067\033", prebuilt=0x7e7ae4956468, ins_mode=ins_mode@entry=ROW_INS_NORMAL)
          at src/storage/innobase/row/row0mysql.cc:1395
      #11 0x00005616962b79a1 in ha_innobase::write_row (this=0x7e7add593820, record=0x7e7aeac5b620 "\374\205\253\067\033") at src/storage/innobase/handler/ha_innodb.cc:8171
      #12 0x000056169603d6c7 in handler::ha_write_row (this=0x7e7add593820, buf=0x7e7aeac5b620 "\374\205\253\067\033") at src/sql/handler.cc:6860
      #13 0x0000561695e2a3ff in write_record (thd=thd@entry=0x7e7a0a718648, table=table@entry=0x7e7aeac5a808, info=info@entry=0x7e755def3560) at src/sql/sql_insert.cc:2094
      #14 0x0000561695e30d0f in mysql_insert (thd=thd@entry=0x7e7a0a718648, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>)
          at src/sql/sql_insert.cc:1087
      #15 0x0000561695e5ba96 in mysql_execute_command (thd=thd@entry=0x7e7a0a718648) at src/sql/sql_parse.cc:4617
      #16 0x0000561695e603b3 in mysql_parse (thd=thd@entry=0x7e7a0a718648, rawbuf=<optimized out>, length=613, parser_state=parser_state@entry=0x7e755def5900, is_com_multi=is_com_multi@entry=false, 
          is_next_command=is_next_command@entry=false) at src/sql/sql_parse.cc:8062
      #17 0x0000561695e61b21 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7e7a0a718648, 
          packet=packet@entry=0x7e78dbc78b09 "INSERT INTO table_in_question (id, a, b, c, d, e, f) VALUES (1234,'A','B','C"..., packet_length=packet_length@entry=613, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at src/sql/sql_parse.cc:1857
      #18 0x0000561695e62d8d in do_command (thd=thd@entry=0x7e7a0a718648) at src/sql/sql_parse.cc:1378
      #19 0x0000561696009162 in threadpool_process_request (thd=0x7e7a0a718648) at src/sql/threadpool_common.cc:376
      #20 tp_callback (c=0x7e7ae18e5ee0) at src/sql/threadpool_common.cc:197
      #21 0x0000561696194d8f in worker_main (param=param@entry=0x7e992b3ebb48) at src/sql/threadpool_generic.cc:1610
      #22 0x0000561696286e1e in pfs_spawn_thread (arg=0x7e7a14edcc08) at src/storage/perfschema/pfs.cc:1869
      #23 0x00007f0dca4fc44b in start_thread (arg=0x7e755def7700) at pthread_create.c:465
      #24 0x00007f0dca23752f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              kobozeva Alexey Kobozev
              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.