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

void trx_purge_add_undo_to_history(const trx_t*, trx_undo_t*&, mtr_t*): Assertion `rseg_header' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found on debug build of 10.11

      origin/10.11 080d92a6217a757300b629360cacf625f3c7ea60

      # 2025-12-11T17:34:22 [1987511] | 2025-12-11 17:34:18 36 [ERROR] InnoDB: Failed to read page 248 from file './ibdata1': Page read from tablespace is corrupted.
      # 2025-12-11T17:34:22 [1987511] | 2025-12-11 17:34:18 36 [ERROR] InnoDB: File './ibdata1' is corrupted
      # 2025-12-11T17:34:22 [1987511] | mariadbd: /data/Server/10.11G/storage/innobase/trx/trx0purge.cc:186: void trx_purge_add_undo_to_history(const trx_t*, trx_undo_t*&, mtr_t*): Assertion `rseg_header' failed.
      

      Stacktrace

      Thread 3 received signal SIGABRT, Aborted.
      [Switching to Thread 1989951.1991045]
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      warning: 44     ./nptl/pthread_kill.c: No such file or directory
      (rr) 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  0x000079b61b04526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x000079b61b0288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000079b61b02881b in __assert_fail_base (fmt=0x79b61b1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5aac94070daa "rseg_header", 
          file=file@entry=0x5aac93fca940 "/data/Server/10.11G/storage/innobase/trx/trx0purge.cc", line=line@entry=186, 
          function=function@entry=0x5aac93fcaa20 "void trx_purge_add_undo_to_history(const trx_t*, trx_undo_t*&, mtr_t*)") at ./assert/assert.c:94
      #6  0x000079b61b03b507 in __assert_fail (assertion=0x5aac94070daa "rseg_header", file=0x5aac93fca940 "/data/Server/10.11G/storage/innobase/trx/trx0purge.cc", line=186, 
          function=0x5aac93fcaa20 "void trx_purge_add_undo_to_history(const trx_t*, trx_undo_t*&, mtr_t*)") at ./assert/assert.c:103
      #7  0x00005aac93c530d8 in trx_purge_add_undo_to_history (trx=trx@entry=0x79b619011480, undo=@0x79b619011e00: 0x79b5d4009060, mtr=mtr@entry=0x79b6194b8ae0)
          at /data/Server/10.11G/storage/innobase/trx/trx0purge.cc:186
      #8  0x00005aac93c77784 in trx_t::write_serialisation_history (this=this@entry=0x79b619011480, mtr=mtr@entry=0x79b6194b8ae0) at /data/Server/10.11G/storage/innobase/trx/trx0trx.cc:1169
      #9  0x00005aac93c716b8 in trx_t::commit_low (this=this@entry=0x79b619011480, mtr=0x79b6194b8ae0) at /data/Server/10.11G/storage/innobase/trx/trx0trx.cc:1578
      #10 0x00005aac93c723c7 in trx_t::commit_persist (this=this@entry=0x79b619011480) at /data/Server/10.11G/storage/innobase/trx/trx0trx.cc:1606
      #11 0x00005aac93c72424 in trx_t::commit (this=this@entry=0x79b619011480) at /data/Server/10.11G/storage/innobase/trx/trx0trx.cc:1615
      #12 0x00005aac93c72701 in trx_commit_for_mysql (trx=trx@entry=0x79b619011480) at /data/Server/10.11G/storage/innobase/trx/trx0trx.cc:1730
      #13 0x00005aac93aa9c1f in innobase_commit_low (trx=trx@entry=0x79b619011480) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:4292
      #14 0x00005aac93aa9c9e in innobase_commit_ordered_2 (trx=trx@entry=0x79b619011480, thd=thd@entry=0x79b5d8039c18) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:4386
      #15 0x00005aac93aa9da7 in innobase_commit_ordered (hton=<optimized out>, thd=0x79b5d8039c18, all=true) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:4432
      #16 0x00005aac9396bded in TC_LOG::run_commit_ordered (this=this@entry=0x5aac949cb800 <mysql_bin_log>, thd=0x79b5d8039c18, all=true) at /data/Server/10.11G/sql/log.cc:9831
      #17 0x00005aac9397420c in MYSQL_BIN_LOG::trx_group_commit_leader (this=this@entry=0x5aac949cb800 <mysql_bin_log>, leader=leader@entry=0x79b6194b9260) at /data/Server/10.11G/sql/log.cc:8995
      #18 0x00005aac939745b6 in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=this@entry=0x5aac949cb800 <mysql_bin_log>, entry=entry@entry=0x79b6194b9260) at /data/Server/10.11G/sql/log.cc:8563
      #19 0x00005aac939748ba in MYSQL_BIN_LOG::write_transaction_to_binlog (this=this@entry=0x5aac949cb800 <mysql_bin_log>, thd=thd@entry=0x79b5e0000f98, cache_mngr=cache_mngr@entry=0x79b5e008d278, 
          end_ev=end_ev@entry=0x79b6194b93e0, all=all@entry=true, using_stmt_cache=using_stmt_cache@entry=true, using_trx_cache=true, is_ro_1pc=false) at /data/Server/10.11G/sql/log.cc:8160
      #20 0x00005aac939749c0 in binlog_flush_cache (thd=thd@entry=0x79b5e0000f98, cache_mngr=cache_mngr@entry=0x79b5e008d278, end_ev=end_ev@entry=0x79b6194b93e0, all=all@entry=true, using_stmt=using_stmt@entry=true, 
          using_trx=using_trx@entry=true, is_ro_1pc=false) at /data/Server/10.11G/sql/log.cc:2016
      #21 0x00005aac93975f5b in binlog_commit_flush_xid_caches (thd=thd@entry=0x79b5e0000f98, cache_mngr=cache_mngr@entry=0x79b5e008d278, all=all@entry=true, xid=xid@entry=9801) at /data/Server/10.11G/sql/log.cc:2166
      #22 0x00005aac93976099 in MYSQL_BIN_LOG::log_and_order (this=<optimized out>, thd=0x79b5e0000f98, xid=9801, all=true, need_prepare_ordered=<optimized out>, need_commit_ordered=<optimized out>)
          at /data/Server/10.11G/sql/log.cc:10771
      #23 0x00005aac9388d0cf in ha_commit_trans (thd=thd@entry=0x79b5e0000f98, all=all@entry=true) at /data/Server/10.11G/sql/handler.cc:1992
      #24 0x00005aac9374f578 in trans_commit (thd=thd@entry=0x79b5e0000f98) at /data/Server/10.11G/sql/transaction.cc:274
      #25 0x00005aac93616f4d in mysql_execute_command (thd=thd@entry=0x79b5e0000f98, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11G/sql/sql_parse.cc:5834
      #26 0x00005aac936189a7 in mysql_parse (thd=thd@entry=0x79b5e0000f98, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x79b6194ba3f0) at /data/Server/10.11G/sql/sql_parse.cc:8229
      #27 0x00005aac9361a013 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x79b5e0000f98, packet=packet@entry=0x79b5e000c5c9 " COMMIT  /* E_R Thread1 QNO 65 CON_ID 19 */ ", 
          packet_length=packet_length@entry=44, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:1921
      #28 0x00005aac9361b4b1 in do_command (thd=thd@entry=0x79b5e0000f98, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:1434
      #29 0x00005aac9373e88d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5aac966faee8, put_in_cache=put_in_cache@entry=true) at /data/Server/10.11G/sql/sql_connect.cc:1475
      #30 0x00005aac9373ea9e in handle_one_connection (arg=0x5aac966faee8) at /data/Server/10.11G/sql/sql_connect.cc:1387
      #31 0x000079b61b09ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #32 0x000079b61b129a34 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      

      RR trace is present on SDP:-
      /data/results/1765486206/TBR-2352

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.