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

Assertion `lock_sys.is_holder()' failed in void lock_sys_t::hash_table::assert_locked(page_id_t) const

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.0
    • 12.0
    • Galera
    • None

    Description

      This issue exists in bb-12.0-MDEV-36077-galera branch. RQG grammar and cnf files are attached to reproduce the issue
      test case

      perl gendata.pl --dsn=dbi:mysql:host=127.0.0.1:port=12612:user=root:database=test --spec=conf/galera/galera_stress.zz
      perl gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=12612:user=root:database=test --grammar=conf/galera/galera_stress.yy --threads=32 --duration=10300 --queries=100000000 &
      perl gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=10001:user=root:database=test --grammar=conf/galera/galera_stress.yy --threads=32 --duration=10300 --queries=100000000 &
      

      Leads to

      MDEV-36077 CS 12.0.0 a55101675a704a44a891682b9a727f68040cf2f9 (Debug) Build 09/04/2025

      mysqld: /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc:208: void lock_sys_t::hash_table::assert_locked(page_id_t) const: Assertion `lock_sys.is_holder()' failed.
      

      MDEV-36077 CS 12.0.0 a55101675a704a44a891682b9a727f68040cf2f9 (Debug) Build 09/04/2025

      Core was generated by `/test/mtest/MDEV-36077/GAL_MS090425-mariadb-12.0.0-linux-x86_64-dbg/bin/mysqld'.
      Program terminated with signal SIGABRT, Aborted.
      #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=6) at ./nptl/pthread_kill.c:89
      #3  0x0000584621792d95 in my_write_core (sig=6) at /test/mtest/MDEV-36077/12.0_dbg/mysys/stacktrace.c:424
      #4  0x0000584620e70ee3 in handle_fatal_signal (sig=6) at /test/mtest/MDEV-36077/12.0_dbg/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      #9  0x00000c0f42a4527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00000c0f42a288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00000c0f42a2881b in __assert_fail_base (fmt=0xc0f42bd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x584621c07129 "lock_sys.is_holder()", 
          file=file@entry=0x584621c07a90 "/test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=208, 
          function=function@entry=0x584621c07c00 "void lock_sys_t::hash_table::assert_locked(page_id_t) const") at ./assert/assert.c:96
      #12 0x00000c0f42a3b517 in __assert_fail (assertion=0x584621c07129 "lock_sys.is_holder()", file=0x584621c07a90 "/test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc", line=208, 
          function=0x584621c07c00 "void lock_sys_t::hash_table::assert_locked(page_id_t) const") at ./assert/assert.c:105
      #13 0x0000584621301cc0 in lock_sys_t::hash_table::assert_locked (this=0x584622eb8ca0 <lock_sys+96>, id=...) at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc:208
      #14 0x0000584621316c39 in lock_rec_print (file=0xc0f42c044e0 <_IO_2_1_stderr_>, lock=0x58464efd1a48, mtr=...) at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc:5221
      #15 0x00005846213039dc in wsrep_is_BF_lock_timeout (trx=...) at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc:685
      #16 0x000058462130a347 in lock_wait (thr=0xc0dbc090f98) at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/lock/lock0lock.cc:2407
      #17 0x000058462147a007 in row_mysql_handle_errors (new_err=0xc0f3cffc878, trx=0xc0f2d401780, thr=0xc0dbc090f98, savept=0x0) at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/row/row0mysql.cc:694
      #18 0x00005846214c4094 in row_search_mvcc (buf=0xc0dbc08d350 "\341\001", mode=PAGE_CUR_GE, prebuilt=0xc0dbc090928, match_mode=1, direction=0)
          at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/row/row0sel.cc:5872
      #19 0x000058462125a733 in ha_innobase::index_read (this=0xc0dbc08caf0, buf=0xc0dbc08d350 "\341\001", key_ptr=0xc0dbc08e928 "I=", key_len=4, find_flag=HA_READ_KEY_EXACT)
          at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/handler/ha_innodb.cc:9029
      #20 0x000058462125b851 in ha_innobase::rnd_pos (this=0xc0dbc08caf0, buf=0xc0dbc08d350 "\341\001", pos=0xc0dbc08e928 "I=") at /test/mtest/MDEV-36077/12.0_dbg/storage/innobase/handler/ha_innodb.cc:9514
      #21 0x0000584620e7c202 in handler::ha_rnd_pos (this=0xc0dbc08caf0, buf=0xc0dbc08d350 "\341\001", pos=0xc0dbc08e928 "I=") at /test/mtest/MDEV-36077/12.0_dbg/sql/handler.cc:3787
      #22 0x0000584620d9bfd8 in handler::rnd_pos_by_record (this=0xc0dbc08caf0, record=0xc0dbc08d350 "\341\001") at /test/mtest/MDEV-36077/12.0_dbg/sql/handler.h:4384
      #23 0x00005846211c478e in ha_partition::rnd_pos_by_record (this=0xc0dbc08b988, record=0xc0dbc08d350 "\341\001") at /test/mtest/MDEV-36077/12.0_dbg/sql/ha_partition.cc:5587
      #24 0x0000584620d0ee74 in handler::ha_rnd_pos_by_record (this=0xc0dbc08b988, buf=0xc0dbc08d350 "\341\001") at /test/mtest/MDEV-36077/12.0_dbg/sql/sql_class.h:8026
      #25 0x0000584621035927 in Rows_log_event::find_row (this=0xc0f14038018, rgi=0xc0f14027ad0) at /test/mtest/MDEV-36077/12.0_dbg/sql/log_event_server.cc:7700
      #26 0x0000584621036e9b in Update_rows_log_event::do_exec_row (this=0xc0f14038018, rgi=0xc0f14027ad0) at /test/mtest/MDEV-36077/12.0_dbg/sql/log_event_server.cc:8147
      #27 0x000058462102e1f1 in Rows_log_event::do_apply_event (this=0xc0f14038018, rgi=0xc0f14027ad0) at /test/mtest/MDEV-36077/12.0_dbg/sql/log_event_server.cc:5243
      #28 0x0000584621017f80 in Log_event::apply_event (this=0xc0f14038018, rgi=0xc0f14027ad0) at /test/mtest/MDEV-36077/12.0_dbg/sql/log_event.cc:3984
      #29 0x00005846212184f6 in apply_events (thd=0xc0f14000d58, rli=0xc0f1401a2c0, events_buf=0xc0f35f7d510, buf_len=0, savepoint=..., set_savepoint=true) at /test/mtest/MDEV-36077/12.0_dbg/sql/wsrep_applier.cc:254
      #30 0x00005846212187bc in wsrep_apply_events (thd=0xc0f14000d58, rli=0xc0f1401a2c0, data=..., err=..., include_msg=true) at /test/mtest/MDEV-36077/12.0_dbg/sql/wsrep_applier.cc:307
      #31 0x00005846211df66d in Wsrep_applier_service::apply_write_set (this=0xc0f3cffeb50, ws_meta=..., data=..., err=...) at /test/mtest/MDEV-36077/12.0_dbg/sql/wsrep_high_priority_service.cc:594
      #32 0x000058462187b57d in apply_write_set (server_state=..., high_priority_service=..., ws_handle=..., ws_meta=..., data=...) at /test/mtest/MDEV-36077/12.0_dbg/wsrep-lib/src/server_state.cpp:332
      #33 0x000058462187f974 in wsrep::server_state::on_apply (this=0x58464e5624f0, high_priority_service=..., ws_handle=..., ws_meta=..., data=...)
          at /test/mtest/MDEV-36077/12.0_dbg/wsrep-lib/src/server_state.cpp:1128
      #34 0x00005846218a9065 in wsrep::high_priority_service::apply (this=0xc0f3cffeb50, ws_handle=..., ws_meta=..., data=...) at /test/mtest/MDEV-36077/12.0_dbg/wsrep-lib/include/wsrep/high_priority_service.hpp:47
      #35 0x00005846218a58aa in (anonymous namespace)::apply_cb (ctx=0xc0f3cffeb50, wsh=0xc0f3cffdda0, flags=65, buf=0xc0f3cffddb0, meta=0xc0f3cffe070, exit_loop=0xc0f3cffe02f)
          at /test/mtest/MDEV-36077/12.0_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:508
      #36 0x00000c0f3d078ce2 in galera::TrxHandleSlave::apply (this=this@entry=0xc0e54079140, recv_ctx=recv_ctx@entry=0xc0f3cffeb50, 
          apply_cb=0x5846218a566e <(anonymous namespace)::apply_cb(void*, wsrep_ws_handle_t const*, uint32_t, wsrep_buf_t const*, wsrep_trx_meta_t const*, wsrep_bool_t*)>, meta=..., 
          exit_loop=exit_loop@entry=@0xc0f3cffe02f: false) at /test/mtest/MDEV-36077/12.0_galera/galera/src/trx_handle.cpp:396
      #37 0x00000c0f3d08ba58 in galera::ReplicatorSMM::apply_trx (this=this@entry=0x58464ef39750, recv_ctx=recv_ctx@entry=0xc0f3cffeb50, ts=...) at /test/mtest/MDEV-36077/12.0_galera/galera/src/replicator_smm.cpp:517
      #38 0x00000c0f3d08fda3 in galera::ReplicatorSMM::process_trx (this=0x58464ef39750, recv_ctx=0xc0f3cffeb50, ts_ptr=...) at /test/mtest/MDEV-36077/12.0_galera/galera/src/replicator_smm.cpp:2153
      #39 0x00000c0f3d0c6161 in galera::GcsActionSource::process_writeset (this=0x58464ef32000, recv_ctx=0xc0f3cffeb50, act=..., exit_loop=@0xc0f3cffe75f: false)
          at /test/mtest/MDEV-36077/12.0_galera/galera/src/gcs_action_source.cpp:62
      #40 0x00000c0f3d0c72be in galera::GcsActionSource::process (this=0x58464ef32000, recv_ctx=0xc0f3cffeb50, exit_loop=@0xc0f3cffe75f: false)
          at /test/mtest/MDEV-36077/12.0_galera/galera/src/gcs_action_source.cpp:186
      --Type <RET> for more, q to quit, c to continue without paging--
      #41 0x00000c0f3d0904f0 in galera::ReplicatorSMM::async_recv (this=0x58464ef39750, recv_ctx=0xc0f3cffeb50) at /test/mtest/MDEV-36077/12.0_galera/galera/src/replicator_smm.cpp:404
      #42 0x00000c0f3d06646f in galera_recv (gh=<optimized out>, recv_ctx=<optimized out>) at /test/mtest/MDEV-36077/12.0_galera/galera/src/wsrep_provider.cpp:265
      #43 0x00005846218a6fd8 in wsrep::wsrep_provider_v26::run_applier (this=0x58464e5856e0, applier_ctx=0xc0f3cffeb50) at /test/mtest/MDEV-36077/12.0_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:870
      #44 0x000058462121961e in wsrep_replication_process (thd=0xc0f14000d58, arg=0x58464ef72570) at /test/mtest/MDEV-36077/12.0_dbg/sql/wsrep_thd.cc:56
      #45 0x00005846211fc6d0 in start_wsrep_THD (arg=0x58464ef72570) at /test/mtest/MDEV-36077/12.0_dbg/sql/wsrep_mysqld.cc:3894
      #46 0x00000c0f42a9caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #47 0x00000c0f42b29c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        1. galera_stress.yy
          3 kB
        2. galera_stress.zz
          1 kB
        3. multi_update.yy
          43 kB
        4. multi_update.zz
          1 kB
        5. n1.cnf
          1 kB
        6. n2.cnf
          1 kB
        7. n3.cnf
          1 kB

        Activity

          People

            sysprg Julius Goryavsky
            ramesh Ramesh Sivaraman
            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.