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

Assertion `page_rec_is_user_rec(rec) || page_rec_is_supremum(rec)' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found during testing MDEV-28730

      --source include/have_innodb.inc
      CREATE TABLE t1 (pk INT KEY,c TEXT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES(1,1),(2,2),(3,3),(4,4),(6,6),(7,7),(8,8),(9,9),(10,10);
      ALTER TABLE t1 ADD FULLTEXT KEY text (c);
      DELETE FROM t1;
      SET GLOBAL INNODB_OPTIMIZE_FULLTEXT_ONLY=1;
      OPTIMIZE TABLE t1;
      

      MDEV-28730 CS 12.2.0 04ec1e92dc91df3ec7cebc0004fbedf54e4eeba6 (Debug, Clang 18.1.3-11) Build 20/11/2025

      mariadbd: /test/main-MDEV-28730_dbg/storage/innobase/lock/lock0lock.cc:6505: dberr_t lock_clust_rec_read_check_and_lock(ulint, const buf_block_t *, const rec_t *, dict_index_t *, const rec_offs *, lock_mode, unsigned int, que_thr_t *): Assertion `page_rec_is_user_rec(rec) || page_rec_is_supremum(rec)' failed.
      

      MDEV-28730 CS 12.2.0 04ec1e92dc91df3ec7cebc0004fbedf54e4eeba6 (Debug, Clang 18.1.3-11) Build 20/11/2025

      Core was generated by `/test/main-MDEV-28730-MD201125-mariadb-12.2.0-linux-x86_64-dbg/bin/mariadbd --n'.
      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 906700)]
      (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  0x000071bd3de4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000071bd3de288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000071bd3de2881b in __assert_fail_base (fmt=0x71bd3dfd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x597d78518e41 "page_rec_is_user_rec(rec) || page_rec_is_supremum(rec)", file=file@entry=0x597d785170a8 "/test/main-MDEV-28730_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=6505, function=function@entry=0x597d78518ec5 "dberr_t lock_clust_rec_read_check_and_lock(ulint, const buf_block_t *, const rec_t *, dict_index_t *, const rec_offs *, lock_mode, unsigned int, que_thr_t *)") at ./assert/assert.c:96
      #6  0x000071bd3de3b517 in __assert_fail (assertion=0x597d78518e41 "page_rec_is_user_rec(rec) || page_rec_is_supremum(rec)", file=0x597d785170a8 "/test/main-MDEV-28730_dbg/storage/innobase/lock/lock0lock.cc", line=6505, function=0x597d78518ec5 "dberr_t lock_clust_rec_read_check_and_lock(ulint, const buf_block_t *, const rec_t *, dict_index_t *, const rec_offs *, lock_mode, unsigned int, que_thr_t *)") at ./assert/assert.c:105
      #7  0x0000597d77bd9bd7 in lock_clust_rec_read_check_and_lock (flags=0, block=0x71bd0800ffc0, rec=0x71bd0856c063 "infimum", index=0x71bc10096688, offsets=0x71bc1002dbe8, mode=LOCK_X, gap_mode=1024, thr=0x71bc1002db48)at /test/main-MDEV-28730_dbg/storage/innobase/lock/lock0lock.cc:6505
      #8  0x0000597d77fc8b51 in QueryExecutor::delete_all (this=0x71bc137f7c90, table=0x71bc10094c28)at /test/main-MDEV-28730_dbg/storage/innobase/row/row0query.cc:187
      #9  0x0000597d77f7a0dc in FTSQueryExecutor::delete_all_common_records (this=0x71bd3c3be290, table_name=0x597d78515ecb "BEING_DELETED")at /test/main-MDEV-28730_dbg/storage/innobase/fts/fts0exec.cc:414
      #10 0x0000597d77f854ae in fts_optimize_purge_deleted_doc_id_snapshot (optim=0x71bc1007cf78)at /test/main-MDEV-28730_dbg/storage/innobase/fts/fts0opt.cc:1621
      #11 0x0000597d77f801bb in fts_optimize_purge_snapshot (optim=0x71bc1007cf78)at /test/main-MDEV-28730_dbg/storage/innobase/fts/fts0opt.cc:1801
      #12 0x0000597d77f7f863 in fts_optimize_table (table=0x71bc10087098)at /test/main-MDEV-28730_dbg/storage/innobase/fts/fts0opt.cc:1975
      #13 0x0000597d77b38082 in ha_innobase::optimize (this=0x71bc100312b8, thd=0x71bc10000d58)at /test/main-MDEV-28730_dbg/storage/innobase/handler/ha_innodb.cc:15168
      #14 0x0000597d7770a1c7 in handler::ha_optimize (this=0x71bc100312b8, thd=0x71bc10000d58, check_opt=0x71bc10006500)at /test/main-MDEV-28730_dbg/sql/handler.cc:5626
      #15 0x0000597d774c13fa in mysql_admin_table (thd=0x71bc10000d58, tables=0x71bc10019fa0, check_opt=0x71bc10006500, operator_name=0x597d78c5c5b8 <msg_optimize>, lock_type=TL_WRITE, org_open_for_modify=true, no_errors_from_open=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x597d7770a0a0 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true)at /test/main-MDEV-28730_dbg/sql/sql_admin.cc:949
      #16 0x0000597d774c44c1 in Sql_cmd_optimize_table::execute (this=0x71bc1001a6e0, thd=0x71bc10000d58)at /test/main-MDEV-28730_dbg/sql/sql_admin.cc:1707
      #17 0x0000597d772c95c1 in mysql_execute_command (thd=0x71bc10000d58, is_called_from_prepared_stmt=false)at /test/main-MDEV-28730_dbg/sql/sql_parse.cc:5861
      #18 0x0000597d772b8894 in mysql_parse (thd=0x71bc10000d58, rawbuf=0x71bc10019ee0 "OPTIMIZE TABLE t1", length=17, parser_state=0x71bd3c3c1a00)at /test/main-MDEV-28730_dbg/sql/sql_parse.cc:7888
      #19 0x0000597d772b5c68 in dispatch_command (command=COM_QUERY, thd=0x71bc10000d58, packet=0x71bc1000b239 "", packet_length=17, blocking=true) at /test/main-MDEV-28730_dbg/sql/sql_parse.cc:1878
      #20 0x0000597d772b9443 in do_command (thd=0x71bc10000d58, blocking=true)at /test/main-MDEV-28730_dbg/sql/sql_parse.cc:1417
      #21 0x0000597d774a76c9 in do_handle_one_connection (connect=0x597db53a9fe8, put_in_cache=true) at /test/main-MDEV-28730_dbg/sql/sql_connect.cc:1503
      #22 0x0000597d774a746e in handle_one_connection (arg=0x597db53bb088)at /test/main-MDEV-28730_dbg/sql/sql_connect.cc:1415
      #23 0x000071bd3de9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #24 0x000071bd3df29c6c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

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