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

Assertion `next_mrec == next_mrec_end' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

        --source include/have_innodb.inc
        --source include/have_debug_sync.inc
        --source include/have_sequence.inc
        CREATE TABLE t1 (a INT PRIMARY KEY, b VARBINARY(1024) NOT NULL) ENGINE=InnoDB;
        INSERT INTO t1 VALUES (0,'');
        SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL go WAIT_FOR done';
        --send ALTER TABLE t1 FORCE
        --connect con1,localhost,root
        SET DEBUG_SYNC='now WAIT_FOR go';
        INSERT INTO t1 SELECT seq, REPEAT('x',1003) FROM seq_1_to_1024;
        SET DEBUG_SYNC='now SIGNAL done';
        --disconnect con1
        --connection default
        --reap
        SET DEBUG_SYNC='RESET';
        DROP TABLE t1;
      

      Leads to:

      ES 10.6.29-25 4cdc4f0b741fd1a3cc3fc34c7dc197a5b12c65cc (Debug, Clang 22.1.8-20260621) Build 12/10/2026

      mariadbd: /test/10.6-es_dbg/storage/innobase/row/row0log.cc:2699: dberr_t row_log_table_apply_ops(que_thr_t *, row_merge_dup_t *, ut_stage_alter_t *): Assertion `next_mrec == next_mrec_end' failed.
      

      ES 10.6.29-25 4cdc4f0b741fd1a3cc3fc34c7dc197a5b12c65cc (Debug, Clang 22.1.8-20260621) Build 12/10/2026

      Core was generated by `/test/EMD121026-mariadb-10.6.29-25-linux-x86_64-dbg/bin/mariadbd --defaults-gro'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 3193528)]
      (gdb) bt
      #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  0x00007e48fa24527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007e48fa2288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007e48fa22881b in __assert_fail_base (fmt=0x7e48fa3d1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x60a4525fd9fa "next_mrec == next_mrec_end", file=file@entry=0x60a4525fc7fa "/test/10.6-es_dbg/storage/innobase/row/row0log.cc", line=line@entry=2699, function=function@entry=0x60a4525fd780 "dberr_t row_log_table_apply_ops(que_thr_t *, row_merge_dup_t *, ut_stage_alter_t *)") at ./assert/assert.c:96
      #6  0x00007e48fa23b517 in __assert_fail (assertion=0x60a4525fd9fa "next_mrec == next_mrec_end", file=0x60a4525fc7fa "/test/10.6-es_dbg/storage/innobase/row/row0log.cc", line=2699, function=0x60a4525fd780 "dberr_t row_log_table_apply_ops(que_thr_t *, row_merge_dup_t *, ut_stage_alter_t *)") at ./assert/assert.c:105
      #7  0x000060a4520feec6 in row_log_table_apply_ops (thr=0x7648080b9370, dup=0x7e48f8b38d18, stage=0x764808236da0)at /test/10.6-es_dbg/storage/innobase/row/row0log.cc:2699
      #8  0x000060a4520fd8a5 in row_log_table_apply (thr=0x7648080b9370, old_table=0x76480806a7d0, table=0x7e48f8b3a3c0, stage=0x764808236da0, new_table=0x7648080c12c0)at /test/10.6-es_dbg/storage/innobase/row/row0log.cc:2879
      #9  0x000060a451f73069 in ha_innobase::inplace_alter_table (this=0x7648080b11b8, altered_table=0x7e48f8b3a3c0, ha_alter_info=0x7e48f8b3a098)at /test/10.6-es_dbg/storage/innobase/handler/handler0alter.cc:8961
      #10 0x000060a451900b19 in handler::ha_inplace_alter_table (this=0x7648080b11b8, altered_table=0x7e48f8b3a3c0, ha_alter_info=0x7e48f8b3a098) at /test/10.6-es_dbg/sql/handler.h:4738
      #11 0x000060a4518f5bb7 in mysql_inplace_alter_table (thd=0x764808000d58, table_list=0x764808014678, table=0x764808034908, altered_table=0x7e48f8b3a3c0, ha_alter_info=0x7e48f8b3a098, target_mdl_request=0x7e48f8b3c230, ddl_log_state=0x7e48f8b3a330, trigger_param=0x7e48f8b3bdf8, alter_ctx=0x7e48f8b3b188)at /test/10.6-es_dbg/sql/sql_table.cc:7911
      #12 0x000060a4518ef84b in mysql_alter_table (thd=0x764808000d58, new_db=0x764808005818, new_name=0x764808005ca0, create_info=0x7e48f8b3d2a8, table_list=0x764808014678, recreate_info=0x7e48f8b3c998, alter_info=0x7e48f8b3d138, order_num=0, order=0x0, ignore=false, if_exists=false)at /test/10.6-es_dbg/sql/sql_table.cc:11099
      #13 0x000060a45199b1c6 in Sql_cmd_alter_table::execute (this=0x764808014d88, thd=0x764808000d58) at /test/10.6-es_dbg/sql/sql_alter.cc:685
      #14 0x000060a4517f1c79 in mysql_execute_command (thd=0x764808000d58, is_called_from_prepared_stmt=false)at /test/10.6-es_dbg/sql/sql_parse.cc:6174
      #15 0x000060a4517e1578 in mysql_parse (thd=0x764808000d58, rawbuf=0x7648080145a0 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7e48f8b3ea28) at /test/10.6-es_dbg/sql/sql_parse.cc:8228
      #16 0x000060a4517ded71 in dispatch_command (command=COM_QUERY, thd=0x764808000d58, packet=0x7648081c5969 "ALTER TABLE t1 FORCE", packet_length=20, blocking=true) at /test/10.6-es_dbg/sql/sql_parse.cc:1918
      #17 0x000060a4517e201f in do_command (thd=0x764808000d58, blocking=true)at /test/10.6-es_dbg/sql/sql_parse.cc:1428
      #18 0x000060a4519913be in do_handle_one_connection (connect=0x60a463ee7968, put_in_cache=true) at /test/10.6-es_dbg/sql/sql_connect.cc:1394
      #19 0x000060a4519911a5 in handle_one_connection (arg=0x60a463ec19e8)at /test/10.6-es_dbg/sql/sql_connect.cc:1306
      #20 0x00007e48fa29cb84 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #21 0x00007e48fa329ecc in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.11  dbg  121026  7aecfef1072045404167edaaba4656edf218a7a8  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  10.11  opt  121026  7aecfef1072045404167edaaba4656edf218a7a8  No bug found                  
      CS  11.4   dbg  121026  fd85202eb2f866bac7117b5a4542b76f438e2780  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  11.4   opt  121026  fd85202eb2f866bac7117b5a4542b76f438e2780  No bug found                  
      CS  11.8   dbg  121026  14362356d14b80242d60dceb9b34f988bbcc9945  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  11.8   opt  121026  14362356d14b80242d60dceb9b34f988bbcc9945  No bug found                  
      CS  12.3   dbg  121026  5e1d303aa6acf34c09309a9d64d750f20fc1921d  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  12.3   opt  121026  5e1d303aa6acf34c09309a9d64d750f20fc1921d  No bug found                  
      CS  13.0   dbg  121026  620a4b5624222048fece7fe1789978ae0675cae2  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  13.0   opt  121026  620a4b5624222048fece7fe1789978ae0675cae2  No bug found                  
      CS  13.2   dbg  121026  cf542109f3389838b4b688b78941797f6a95d51f  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      CS  13.2   opt  121026  cf542109f3389838b4b688b78941797f6a95d51f  No bug found                  
      ES  10.6   dbg  121026  4cdc4f0b741fd1a3cc3fc34c7dc197a5b12c65cc  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      ES  10.6   opt  121026  4cdc4f0b741fd1a3cc3fc34c7dc197a5b12c65cc  No bug found                  
      ES  11.4   dbg  121026  f1a52e7bb41922f37759b2d6a7d7dbd6b779dd40  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      ES  11.4   opt  121026  f1a52e7bb41922f37759b2d6a7d7dbd6b779dd40  No bug found                  
      ES  11.8   dbg  121026  2b449b705bc9223b003a05bed300873361e5e970  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      ES  11.8   opt  121026  2b449b705bc9223b003a05bed300873361e5e970  No bug found                  
      ES  12.3   dbg  121026  b09ac90250cf897f23f243954754ed88c57f4f31  next_mrec == next_mrec_end|SIGABRT|row_log_table_apply_ops|row_log_table_apply|ha_innobase::inplace_alter_table|handler::ha_inplace_alter_table
      ES  12.3   opt  121026  b09ac90250cf897f23f243954754ed88c57f4f31  No bug found                  
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1.3h
                1.3h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.