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

Assertion `((&cursor)->page_cur.block) != mtr->at_savepoint(mtr->get_savepoint() - 1) || index->is_spatial() || mtr->memo_contains(index->lock, MTR_MEMO_X_LOCK)' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found on debug build

      Leads to :-

      GIT_SHOW: HEAD -> 11.8, origin/11.8 9a4a30aec003a8efdf9d35d3ac669385286ba4b4 2025-07-07T08:06:33+03:00

      # 2025-07-08T19:52:25 [3765403] | mariadbd: /data/Server/11.8/storage/innobase/btr/btr0btr.cc:2377: dberr_t btr_insert_on_non_leaf_level(ulint, dict_index_t*, ulint, dtuple_t*, mtr_t*): Assertion `((&cursor)->page_cur.block) != mtr->at_savepoint(mtr->get_savepoint() - 1) || index->is_spatial() || mtr->memo_contains(index->lock, MTR_MEMO_X_LOCK)' failed.
      

      Stacktrace

      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140392420353600) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=140392420353600) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=140392420353600, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  __GI_abort () at ./stdlib/abort.c:79
      #5  __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion="((&cursor)->page_cur.block) != mtr->at_savepoint(mtr->get_savepoint() - 1) || index->is_spatial() || mtr->memo_contains(index->lock, MTR_MEMO_X_LOCK)", file="/data/Server/11.8/storage/innobase/btr/btr0btr.cc", 
          line=2377, function=<optimized out>) at ./assert/assert.c:92
      #6  __GI___assert_fail (assertion="((&cursor)->page_cur.block) != mtr->at_savepoint(mtr->get_savepoint() - 1) || index->is_spatial() || mtr->memo_contains(index->lock, MTR_MEMO_X_LOCK)", 
          file="/data/Server/11.8/storage/innobase/btr/btr0btr.cc", line=2377, function="dberr_t btr_insert_on_non_leaf_level(ulint, dict_index_t*, ulint, dtuple_t*, mtr_t*)") at ./assert/assert.c:101
      #7  btr_insert_on_non_leaf_level (flags=23, flags@entry=16, index=index@entry=, level=level@entry=2, tuple=, mtr=mtr@entry=) at /data/Server/11.8/storage/innobase/btr/btr0btr.cc:2377
      #8  btr_cur_pessimistic_delete (err=err@entry=, has_reserved_extents=has_reserved_extents@entry=1, cursor=cursor@entry=, flags=flags@entry=16, rollback=rollback@entry=false, mtr=mtr@entry=)
          at /data/Server/11.8/storage/innobase/btr/btr0cur.cc:4702
      #9  btr_cur_node_ptr_delete (parent=parent@entry=, mtr=mtr@entry=) at /data/Server/11.8/storage/innobase/btr/btr0cur.cc:4781
      #10 btr_compress (cursor=cursor@entry=, adjust=adjust@entry=false, mtr=mtr@entry=) at /data/Server/11.8/storage/innobase/btr/btr0btr.cc:3749
      #11 btr_cur_compress_if_useful (cursor=cursor@entry=, adjust=adjust@entry=false, mtr=mtr@entry=) at /data/Server/11.8/storage/innobase/btr/btr0cur.cc:4310
      #12 btr_cur_pessimistic_update (flags=flags@entry=4, cursor=cursor@entry=, offsets=offsets@entry=, offsets_heap=offsets_heap@entry=, entry_heap=entry_heap@entry=, big_rec=big_rec@entry=, update=, cmpl_info=0, thr=, trx_id=796, 
          mtr=) at /data/Server/11.8/storage/innobase/btr/btr0cur.cc:4035
      #13 row_ins_sec_index_entry_by_modify (flags=flags@entry=0, mode=mode@entry=74, cursor=cursor@entry=, offsets=offsets@entry=, offsets_heap=<optimized out>, heap=heap@entry=, entry=, thr=, mtr=)
          at /data/Server/11.8/storage/innobase/row/row0ins.cc:250
      #14 row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=BTR_INSERT_TREE, index=index@entry=, offsets_heap=<optimized out>, offsets_heap@entry=, heap=heap@entry=, entry=entry@entry=, trx_id=0, thr=)
          at /data/Server/11.8/storage/innobase/row/row0ins.cc:3184
      #15 row_ins_sec_index_entry (index=index@entry=, entry=, thr=thr@entry=, check_foreign=<optimized out>) at /data/Server/11.8/storage/innobase/row/row0ins.cc:3404
      #16 row_upd_sec_index_entry (node=node@entry=, thr=thr@entry=) at /data/Server/11.8/storage/innobase/row/row0upd.cc:2004
      #17 row_upd_sec_step (node=node@entry=, thr=thr@entry=) at /data/Server/11.8/storage/innobase/row/row0upd.cc:2031
      #18 row_upd (node=node@entry=, thr=thr@entry=) at /data/Server/11.8/storage/innobase/row/row0upd.cc:2778
      #19 row_upd_step (thr=thr@entry=) at /data/Server/11.8/storage/innobase/row/row0upd.cc:2893
      #20 row_update_for_mysql (prebuilt=) at /data/Server/11.8/storage/innobase/row/row0mysql.cc:1667
      #21 ha_innobase::update_row (this=, old_row="", new_row="") at /data/Server/11.8/storage/innobase/handler/ha_innodb.cc:8580
      #22 handler::ha_update_row (this=, old_data=old_data@entry="", new_data=new_data@entry="") at /data/Server/11.8/sql/handler.cc:8311
      #23 ha_partition::update_row (this=, old_data="", new_data="") at /data/Server/11.8/sql/ha_partition.cc:4775
      #24 handler::ha_update_row (this=, old_data="", new_data="") at /data/Server/11.8/sql/handler.cc:8311
      #25 Sql_cmd_update::update_single_table (this=, thd=) at /data/Server/11.8/sql/sql_update.cc:1061
      #26 Sql_cmd_update::execute_inner (this=, thd=) at /data/Server/11.8/sql/sql_update.cc:3202
      #27 Sql_cmd_dml::execute (this=, thd=) at /data/Server/11.8/sql/sql_select.cc:34499
      #28 mysql_execute_command (thd=thd@entry=, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/11.8/sql/sql_parse.cc:4428
      #29 mysql_parse (thd=thd@entry=, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=) at /data/Server/11.8/sql/sql_parse.cc:7906
      #30 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=, 
          packet=packet@entry="UPDATE `table100_innodb_key_pk_parts_2_int_autoinc` SET `col_longtext_ucs2_key` = REPEAT( _ASCII 0x05, 124 ) WHERE `col_longtext_utf8` != CONVERT( 'she' USING UTF8 )  /* E_R Thread8 QNO 222 CON_ID 25 "...,
       packet_length=packet_length@entry=203, blocking=blocking@entry=true) at /data/Server/11.8/sql/sql_parse.cc:1902
      #31 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/11.8/sql/sql_parse.cc:1415
      #32 do_handle_one_connection (connect=<optimized out>, connect@entry=, put_in_cache=put_in_cache@entry=true) at /data/Server/11.8/sql/sql_connect.cc:1415
      #33 handle_one_connection (arg=) at /data/Server/11.8/sql/sql_connect.cc:1327
      #34 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #35 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      

      RR trace is present on pluto:
      /data/results/1752001242/TBR-2297

      Attachments

        Issue Links

          Activity

            People

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