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

Assertion `m.first->second.valid(trx->undo_no)' failed in trx_undo_report_row_operation

    XMLWordPrintable

Details

    Description

      There are several open trx_undo_report_row_operation issues (MDEV-24859, MDEV-24812) but none of them uses XA, and the assert here is different, so this is likely a separate issue.

      XA START 'a';
      SET SESSION tx_read_only=1;
      CREATE TEMPORARY TABLE t (c INT);
      CREATE TEMPORARY TABLE t2 (c INT);
      XA END 'a';
      SET autocommit=0;
      XA ROLLBACK 'a';
      INSERT INTO t2 VALUES(0);
      INSERT INTO t VALUES(0);
      CREATE TABLE t (a INT KEY);
      INSERT INTO t VALUES(0);
      

      Leads to:

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:1999: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `m.first->second.valid(trx->undo_no)' failed.
      

      10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

      Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1541dc5a6700 (LWP 758082))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055bf7f21655c in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055bf7e9ae4de in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001541df164859 in __GI_abort () at abort.c:79
      #6  0x00001541df164729 in __assert_fail_base (fmt=0x1541df2fa588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55bf7f626640 "m.first->second.valid(trx->undo_no)", file=0x55bf7f625a30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=1999, function=<optimized out>) at assert.c:92
      #7  0x00001541df175f36 in __GI___assert_fail (assertion=assertion@entry=0x55bf7f626640 "m.first->second.valid(trx->undo_no)", file=file@entry=0x55bf7f625a30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=line@entry=1999, function=function@entry=0x55bf7f6265a8 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at assert.c:101
      #8  0x000055bf7efc92b4 in trx_undo_report_row_operation (thr=thr@entry=0x15419802bcf0, index=index@entry=0x1541980299e8, clust_entry=clust_entry@entry=0x154198032588, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x1541dc5a30b0) at /test/10.6_dbg/storage/innobase/include/trx0trx.h:525
      #9  0x000055bf7f025b9f in btr_cur_ins_lock_and_undo (flags=flags@entry=2, cursor=cursor@entry=0x1541dc5a35c0, entry=entry@entry=0x154198032588, thr=thr@entry=0x15419802bcf0, mtr=mtr@entry=0x1541dc5a3b80, inherit=inherit@entry=0x1541dc5a3197) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3274
      #10 0x000055bf7f02c6a1 in btr_cur_optimistic_insert (flags=flags@entry=2, cursor=cursor@entry=0x1541dc5a35c0, offsets=offsets@entry=0x1541dc5a3588, heap=heap@entry=0x1541dc5a3580, entry=entry@entry=0x154198032588, rec=rec@entry=0x1541dc5a3598, big_rec=0x1541dc5a3578, n_ext=<optimized out>, thr=0x15419802bcf0, mtr=0x1541dc5a3b80) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3501
      #11 0x000055bf7ef05968 in row_ins_clust_index_entry_low (flags=flags@entry=2, mode=<optimized out>, mode@entry=2, index=index@entry=0x1541980299e8, n_uniq=n_uniq@entry=0, entry=entry@entry=0x154198032588, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2783
      #12 0x000055bf7ef07504 in row_ins_clust_index_entry (index=index@entry=0x1541980299e8, entry=entry@entry=0x154198032588, thr=thr@entry=0x15419802bcf0, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3255
      #13 0x000055bf7ef0c0b5 in row_ins_index_entry (thr=0x15419802bcf0, entry=0x154198032588, index=0x1541980299e8) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3380
      #14 row_ins_index_entry_step (thr=0x15419802bcf0, node=0x15419802bad0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3549
      #15 row_ins (thr=0x15419802bcf0, node=0x15419802bad0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3695
      #16 row_ins_step (thr=thr@entry=0x15419802bcf0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3837
      #17 0x000055bf7ef30754 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x15419802a918 <incomplete sequence \375>, prebuilt=0x15419802b5d8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1384
      #18 0x000055bf7edba5dd in ha_innobase::write_row (this=0x15419802ad80, record=0x15419802a918 <incomplete sequence \375>) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7361
      #19 0x000055bf7e9c2826 in handler::ha_write_row (this=0x15419802ad80, buf=0x15419802a918 <incomplete sequence \375>) at /test/10.6_dbg/sql/handler.cc:7151
      #20 0x000055bf7e698547 in write_record (thd=thd@entry=0x154198000db8, table=table@entry=0x15419802a488, info=info@entry=0x1541dc5a4c60, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
      #21 0x000055bf7e6a4c0a in mysql_insert (thd=thd@entry=0x154198000db8, table_list=0x154198012790, fields=@0x154198005e30: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55bf7fcb7300 <end_of_list>, last = 0x154198005e30, elements = 0}, <No data fields>}, values_list=@0x154198005e78: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x154198013398, last = 0x154198013398, elements = 1}, <No data fields>}, update_fields=@0x154198005e60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55bf7fcb7300 <end_of_list>, last = 0x154198005e60, elements = 0}, <No data fields>}, update_values=@0x154198005e48: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55bf7fcb7300 <end_of_list>, last = 0x154198005e48, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
      #22 0x000055bf7e6eb7a2 in mysql_execute_command (thd=thd@entry=0x154198000db8) at /test/10.6_dbg/sql/sql_parse.cc:4453
      #23 0x000055bf7e6d621a in mysql_parse (thd=thd@entry=0x154198000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1541dc5a53d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
      #24 0x000055bf7e6e430b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154198000db8, packet=packet@entry=0x15419801aac9 "INSERT INTO t VALUES(0)", packet_length=packet_length@entry=23) at /test/10.6_dbg/sql/sql_class.h:1295
      #25 0x000055bf7e6e763d in do_command (thd=0x154198000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
      #26 0x000055bf7e8431ab in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55bf80e28df8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #27 0x000055bf7e8438af in handle_one_connection (arg=arg@entry=0x55bf80e28df8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #28 0x000055bf7ecf727d in pfs_spawn_thread (arg=0x55bf80d5cef8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #29 0x00001541df672609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x00001541df261293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.