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

bool lock_trx_has_expl_x_lock(const trx_t&, const dict_table_t&, page_id_t, ulint): Assertion `lock_rec_has_expl(LOCK_X | 1024U, g.cell(), id, heap_no, &trx)' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found on debug build
      Leads to :-

      GIT_SHOW: HEAD -> 10.11, origin/10.11 e8026a50197cbfccd70a2072cbc0ae4728a4ab40 2025-08-15T09:47:40+03:00

      # 2025-08-18T19:16:52 [262247] | mariadbd: /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:6841: bool lock_trx_has_expl_x_lock(const trx_t&, const dict_table_t&, page_id_t, ulint): Assertion `lock_rec_has_expl(LOCK_X | 1024U, g.cell(), id, heap_no, &trx)' failed.
      

      Stacktrace

      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140483352745536) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=140483352745536) at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=140483352745536, signo=6) at ./nptl/pthread_kill.c:89
      #3  my_write_core (sig=6) at /data/Server/10.11_new/mysys/stacktrace.c:424
      #4  handle_fatal_signal (sig=6) at /data/Server/10.11_new/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140483352745536) at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=140483352745536) at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=140483352745536, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #9  __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 __GI_abort () at ./stdlib/abort.c:79
      #11 __assert_fail_base (fmt="%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion="lock_rec_has_expl(LOCK_X | 1024U, g.cell(), id, heap_no, &trx)", file="/data/Server/10.11_new/storage/innobase/lock/lock0lock.cc", line=6841, 
          function=<optimized out>) at ./assert/assert.c:92
      #12 __GI___assert_fail (assertion="lock_rec_has_expl(LOCK_X | 1024U, g.cell(), id, heap_no, &trx)", file="/data/Server/10.11_new/storage/innobase/lock/lock0lock.cc", line=6841, 
          function="bool lock_trx_has_expl_x_lock(const trx_t&, const dict_table_t&, page_id_t, ulint)") at ./assert/assert.c:101
      #13 lock_trx_has_expl_x_lock (trx=..., table=..., id=..., heap_no=heap_no@entry=3) at /data/Server/10.11_new/storage/innobase/lock/lock0lock.cc:6841
      #14 row_upd_clust_step (node=node@entry=, thr=thr@entry=) at /data/Server/10.11_new/storage/innobase/include/buf0buf.h:643
      #15 row_upd (node=node@entry=, thr=thr@entry=) at /data/Server/10.11_new/storage/innobase/row/row0upd.cc:2774
      #16 row_upd_step (thr=thr@entry=) at /data/Server/10.11_new/storage/innobase/row/row0upd.cc:2916
      #17 row_update_for_mysql (prebuilt=) at /data/Server/10.11_new/storage/innobase/row/row0mysql.cc:1668
      #18 ha_innobase::update_row (this=, old_row="\357\276\377\377\377\377\377߀", new_row="\357\276\377\367\377\377\377߀") at /data/Server/10.11_new/storage/innobase/handler/ha_innodb.cc:8621
      #19 handler::ha_update_row (this=, old_data="\357\276\377\377\377\377\377߀", new_data="\357\276\377\367\377\377\377߀") at /data/Server/10.11_new/sql/handler.cc:7832
      #20 Write_record::insert_on_duplicate_update (this=, inserted=inserted@entry=, updated=updated@entry=) at /data/Server/10.11_new/sql/sql_insert.cc:2228
      #21 Write_record::write_record (this=this@entry=) at /data/Server/10.11_new/sql/sql_insert.cc:2360
      #22 mysql_insert (thd=thd@entry=, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_UPDATE, ignore=true, result=) at /data/Server/10.11_new/sql/sql_insert.cc:1217
      #23 mysql_execute_command (thd=thd@entry=, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11_new/sql/sql_parse.cc:4628
      #24 mysql_parse (thd=thd@entry=, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=) at /data/Server/10.11_new/sql/sql_parse.cc:8180
      #25 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=, 
          packet=packet@entry="INSERT IGNORE INTO `table100_innodb_dynamic_int_autoinc` ( `col_text_utf8_not_null` ) VALUES ( LOAD_FILE('/home/saahil/RQG_mleich1/data/earth579kb.jpg') ) ON DUPLICATE KEY UPDATE `col_varchar_latin1_k"..., 
          packet_length=packet_length@entry=264, blocking=blocking@entry=true) at /data/Server/10.11_new/sql/sql_parse.cc:1906
      #26 do_command (thd=thd@entry=, blocking=blocking@entry=true) at /data/Server/10.11_new/sql/sql_parse.cc:1419
      #27 do_handle_one_connection (connect=<optimized out>, connect@entry=, put_in_cache=put_in_cache@entry=true) at /data/Server/10.11_new/sql/sql_connect.cc:1386
      #28 handle_one_connection (arg=) at /data/Server/10.11_new/sql/sql_connect.cc:1298
      #29 start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #30 clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Core dump is present on pluto:-
      /data/results/1755544091/TBR-1267

      Attachments

        1. TBR-1267.yy
          0.6 kB
          Saahil Alam
        2. simplify_TBR-1267.cfg
          46 kB
          Saahil Alam

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              saahil Saahil Alam
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.