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

dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t*, ulint, dict_index_t*, que_thr_t*): Assertion `((0x7 | 8U) & mode) == LOCK_S || ((0x7 | 8U) & mode) == LOCK_X' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Assertion found on debug build on 10.11

      origin/10.11 080d92a6217a757300b629360cacf625f3c7ea60

      # 2025-12-08T07:40:02 [3938692] | mariadbd: /data/Server/10.11G/storage/innobase/lock/lock0lock.cc:1761: dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t*, ulint, dict_index_t*, que_thr_t*): Assertion `((0x7 | 8U) & mode) == LOCK_S || ((0x7 | 8U) & mode) == LOCK_X' failed.
      

      StackTrace

      # 2025-12-08T07:41:03 [3938692] | #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      # 2025-12-08T07:41:03 [3938692] | #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
      # 2025-12-08T07:41:03 [3938692] | #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
      # 2025-12-08T07:41:03 [3938692] | #3  0x0000765af824526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      # 2025-12-08T07:41:03 [3938692] | #4  0x0000765af82288ff in __GI_abort () at ./stdlib/abort.c:79
      # 2025-12-08T07:41:03 [3938692] | #5  0x0000765af822881b in __assert_fail_base (fmt=0x765af83d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x572157747030 "((0x7 | 8U) & mode) == LOCK_S || ((0x7 | 8U) & mode) == LOCK_X", file=file@entry=0x572157743720 "/data/Server/10.11G/storage/innobase/lock/lock0lock.cc", line=line@entry=1761, function=function@entry=0x572157746fd0 "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t*, ulint, dict_index_t*, que_thr_t*)") at ./assert/assert.c:94
      # 2025-12-08T07:41:03 [3938692] | #6  0x0000765af823b507 in __assert_fail (assertion=0x572157747030 "((0x7 | 8U) & mode) == LOCK_S || ((0x7 | 8U) & mode) == LOCK_X", file=0x572157743720 "/data/Server/10.11G/storage/innobase/lock/lock0lock.cc", line=1761, function=0x572157746fd0 "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t*, ulint, dict_index_t*, que_thr_t*)") at ./assert/assert.c:103
      # 2025-12-08T07:41:03 [3938692] | #7  0x00005721572f1a8c in lock_rec_lock (impl=impl@entry=false, mode=mode@entry=5, block=block@entry=0x765aef005b00, heap_no=heap_no@entry=1, index=index@entry=0x57215aa61240, thr=thr@entry=0x57215aa64a90) at /data/Server/10.11G/storage/innobase/lock/lock0lock.cc:1761
      # 2025-12-08T07:41:03 [3938692] | #8  0x00005721572f6690 in lock_clust_rec_read_check_and_lock (flags=flags@entry=0, block=block@entry=0x765aef005b00, rec=rec@entry=0x765aef0d3070 "supremum", index=index@entry=0x57215aa61240, offsets=offsets@entry=0x765af84b2ce0, mode=mode@entry=LOCK_NONE, gap_mode=0, thr=0x57215aa64a90) at /data/Server/10.11G/storage/innobase/lock/lock0lock.cc:6325
      # 2025-12-08T07:41:03 [3938692] | #9  0x00005721573e655d in sel_set_rec_lock (pcur=pcur@entry=0x57215aa644c8, rec=0x765aef0d3070 "supremum", index=index@entry=0x57215aa61240, offsets=0x765af84b2ce0, mode=5, type=type@entry=0, thr=0x57215aa64a90, mtr=0x765af84b30c0) at /data/Server/10.11G/storage/innobase/row/row0sel.cc:1356
      # 2025-12-08T07:41:03 [3938692] | #10 0x00005721573ea92e in row_search_mvcc (buf=buf@entry=0x57215aa63000 '\245' <repeats 128 times>, "\3300\246Z!W", mode=<optimized out>, prebuilt=0x57215aa64300, match_mode=<optimized out>, direction=direction@entry=0) at /data/Server/10.11G/storage/innobase/row/row0sel.cc:4947
      # 2025-12-08T07:41:03 [3938692] | #11 0x00005721572767d4 in ha_innobase::index_read (this=this@entry=0x57215aa622b8, buf=0x57215aa63000 '\245' <repeats 128 times>, "\3300\246Z!W", key_ptr=key_ptr@entry=0x0, key_len=key_len@entry=0, find_flag=find_flag@entry=HA_READ_AFTER_KEY) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:9020
      # 2025-12-08T07:41:03 [3938692] | #12 0x0000572157276a43 in ha_innobase::index_first (this=this@entry=0x57215aa622b8, buf=<optimized out>) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:9368
      # 2025-12-08T07:41:03 [3938692] | #13 0x0000572157276a6a in ha_innobase::rnd_next (this=0x57215aa622b8, buf=<optimized out>) at /data/Server/10.11G/storage/innobase/handler/ha_innodb.cc:9460
      # 2025-12-08T07:41:03 [3938692] | #14 0x0000572157229160 in ha_sequence::rnd_next (this=0x57215aa62ab8, buf=0x57215aa63000 '\245' <repeats 128 times>, "\3300\246Z!W") at /data/Server/10.11G/sql/ha_sequence.h:116
      # 2025-12-08T07:41:03 [3938692] | #15 0x00005721570461cb in handler::ha_rnd_next (this=this@entry=0x57215aa62ab8, buf=buf@entry=0x57215aa63000 '\245' <repeats 128 times>, "\3300\246Z!W") at /data/Server/10.11G/sql/handler.cc:3582
      # 2025-12-08T07:41:03 [3938692] | #16 0x0000572157047512 in handler::read_first_row (this=0x57215aa62ab8, buf=0x57215aa63000 '\245' <repeats 128 times>, "\3300\246Z!W", primary_key=<optimized out>) at /data/Server/10.11G/sql/handler.cc:3829
      # 2025-12-08T07:41:03 [3938692] | #17 0x0000572156e4c2c3 in handler::ha_read_first_row (this=0x57215aa62ab8, buf=<optimized out>, primary_key=primary_key@entry=64) at /data/Server/10.11G/sql/sql_class.h:7732
      # 2025-12-08T07:41:03 [3938692] | #18 0x0000572156fb2c7d in SEQUENCE::read_stored_values (this=this@entry=0x57215a992bf8, table=0x57215aa60188) at /data/Server/10.11G/sql/sql_sequence.cc:571
      # 2025-12-08T07:41:03 [3938692] | #19 0x0000572156fb2e4c in SEQUENCE::read_initial_values (this=0x57215a992bf8, table=<optimized out>) at /data/Server/10.11G/sql/sql_sequence.cc:506
      # 2025-12-08T07:41:03 [3938692] | #20 0x0000572157228cb1 in ha_sequence::open (this=0x57215aa62ab8, name=<optimized out>, mode=2, flags=18) at /data/Server/10.11G/sql/ha_sequence.cc:122
      # 2025-12-08T07:41:03 [3938692] | #21 0x0000572157045d71 in handler::ha_open (this=0x57215aa62ab8, table_arg=table_arg@entry=0x57215aa60188, name=0x57215a992bd0 "./test/seq5", mode=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /data/Server/10.11G/sql/handler.cc:3500
      # 2025-12-08T07:41:03 [3938692] | #22 0x0000572156ecdd93 in open_table_from_share (thd=thd@entry=0x57215a9049a8, share=share@entry=0x57215a9925a0, alias=alias@entry=0x57215aa1ce90, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=<optimized out>, is_create_table=<optimized out>, partitions_to_open=<optimized out>) at /data/Server/10.11G/sql/table.cc:4497
      # 2025-12-08T07:41:03 [3938692] | #23 0x0000572156d685ef in open_table (thd=thd@entry=0x57215a9049a8, table_list=table_list@entry=0x57215aa1ce40, ot_ctx=ot_ctx@entry=0x765af84b3c90) at /data/Server/10.11G/sql/sql_base.cc:2290
      # 2025-12-08T07:41:03 [3938692] | #24 0x0000572156d69c9a in open_and_process_table (thd=thd@entry=0x57215a9049a8, tables=tables@entry=0x57215aa1ce40, counter=counter@entry=0x765af84b3d24, flags=flags@entry=1090, prelocking_strategy=prelocking_strategy@entry=0x765af84b3d28, has_prelocking_list=has_prelocking_list@entry=false, ot_ctx=0x765af84b3c90) at /data/Server/10.11G/sql/sql_base.cc:4237
      # 2025-12-08T07:41:03 [3938692] | #25 0x0000572156d6b8bc in open_tables (thd=thd@entry=0x57215a9049a8, options=..., start=start@entry=0x765af84b3d18, counter=counter@entry=0x765af84b3d24, flags=<optimized out>, prelocking_strategy=prelocking_strategy@entry=0x765af84b3d28) at /data/Server/10.11G/sql/sql_base.cc:4722
      # 2025-12-08T07:41:03 [3938692] | #26 0x0000572156d6c176 in open_tables (prelocking_strategy=0x765af84b3d28, flags=<optimized out>, counter=0x765af84b3d24, tables=0x765af84b3d18, thd=0x57215a9049a8) at /data/Server/10.11G/sql/sql_base.h:271
      # 2025-12-08T07:41:03 [3938692] | #27 open_normal_and_derived_tables (thd=thd@entry=0x57215a9049a8, tables=<optimized out>, tables@entry=0x57215aa1ce40, flags=<optimized out>, dt_phases=dt_phases@entry=3) at /data/Server/10.11G/sql/sql_base.cc:5832
      # 2025-12-08T07:41:03 [3938692] | #28 0x0000572156d6c2b0 in open_tables_only_view_structure (thd=thd@entry=0x57215a9049a8, table_list=table_list@entry=0x57215aa1ce40, can_deadlock=can_deadlock@entry=false) at /data/Server/10.11G/sql/sql_base.cc:5883
      # 2025-12-08T07:41:03 [3938692] | #29 0x0000572156e61462 in fill_schema_table_by_open (thd=thd@entry=0x57215a9049a8, mem_root=mem_root@entry=0x765af84b5cc0, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x57215a9287a0, schema_table=schema_table@entry=0x57215807f3c0 <schema_tables+192>, orig_db_name=orig_db_name@entry=0x57215a91cfd0, orig_table_name=0x57215a91d190, open_tables_state_backup=0x765af84b5d00, can_deadlock=false) at /data/Server/10.11G/sql/sql_show.cc:4779
      # 2025-12-08T07:41:03 [3938692] | #30 0x0000572156e73d8f in get_all_tables (thd=0x57215a9049a8, tables=<optimized out>, cond=<optimized out>) at /data/Server/10.11G/sql/sql_show.cc:5441
      # 2025-12-08T07:41:03 [3938692] | #31 0x0000572156e70039 in get_schema_tables_result (join=join@entry=0x57215a919b30, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /data/Server/10.11G/sql/sql_show.cc:9252
      # 2025-12-08T07:41:03 [3938692] | #32 0x0000572156e4984e in JOIN::exec_inner (this=this@entry=0x57215a919b30) at /data/Server/10.11G/sql/sql_select.cc:4984
      # 2025-12-08T07:41:03 [3938692] | #33 0x0000572156e49a54 in JOIN::exec (this=this@entry=0x57215a919b30) at /data/Server/10.11G/sql/sql_select.cc:4811
      # 2025-12-08T07:41:03 [3938692] | #34 0x0000572156e488d8 in mysql_select (thd=thd@entry=0x57215a9049a8, tables=0x57215a918760, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x57215a919b08, unit=0x57215a908c78, select_lex=0x57215a918090) at /data/Server/10.11G/sql/sql_select.cc:5285
      # 2025-12-08T07:41:03 [3938692] | #35 0x0000572156e48c50 in handle_select (thd=thd@entry=0x57215a9049a8, lex=lex@entry=0x57215a908ba0, result=result@entry=0x57215a919b08, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/Server/10.11G/sql/sql_select.cc:601
      # 2025-12-08T07:41:03 [3938692] | #36 0x0000572156dcbca5 in execute_sqlcom_select (thd=thd@entry=0x57215a9049a8, all_tables=0x57215a918760) at /data/Server/10.11G/sql/sql_parse.cc:6469
      # 2025-12-08T07:41:03 [3938692] | #37 0x0000572156dd548c in mysql_execute_command (thd=thd@entry=0x57215a9049a8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.11G/sql/sql_parse.cc:4023
      # 2025-12-08T07:41:03 [3938692] | #38 0x0000572156ddb9a7 in mysql_parse (thd=thd@entry=0x57215a9049a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x765af84b73f0) at /data/Server/10.11G/sql/sql_parse.cc:8229
      # 2025-12-08T07:41:03 [3938692] | #39 0x0000572156ddd013 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x57215a9049a8, packet=packet@entry=0x57215a90d649 "SELECT * FROM `information_schema` . `CHECK_CONSTRAINTS` /* E_R checkDatabaseIntegrity QNO 18 CON_ID 6 */ ", packet_length=packet_length@entry=106, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:1921
      # 2025-12-08T07:41:03 [3938692] | #40 0x0000572156dde4b1 in do_command (thd=thd@entry=0x57215a9049a8, blocking=blocking@entry=true) at /data/Server/10.11G/sql/sql_parse.cc:1434
      # 2025-12-08T07:41:03 [3938692] | #41 0x0000572156f0188d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x57215a8b2a08, put_in_cache=put_in_cache@entry=true) at /data/Server/10.11G/sql/sql_connect.cc:1475
      # 2025-12-08T07:41:03 [3938692] | #42 0x0000572156f01a9e in handle_one_connection (arg=0x57215a8b2a08) at /data/Server/10.11G/sql/sql_connect.cc:1387
      # 2025-12-08T07:41:03 [3938692] | #43 0x0000765af829ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      # 2025-12-08T07:41:03 [3938692] | #44 0x0000765af8329a34 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
      

      RR trace is present on SDP:-
      /data/results/1765181036/TBR-1166

      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.