Details
-
Bug
-
Status: In Testing (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.8, 12.0
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t (a INT,v VECTOR (1) NOT NULL,VECTOR INDEX (v)) ENGINE=INNODB; |
LOCK TABLE t WRITE; |
INSERT INTO t VALUES (1,0x30303030); |
INSERT INTO t VALUES (1,0x31313131); |
Leads to
CS 11.8.1 059d06ae0736a836acee0b5c644ebf9290343e96 (Debug) Build 19/02/2025 |
mariadbd: /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:1931: dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *): Assertion `(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)' failed.
|
CS 11.8.1 059d06ae0736a836acee0b5c644ebf9290343e96 (Debug) Build 19/02/2025 |
Core was generated by `/test/MD190225-mariadb-11.8.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
|
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 (Thread 0x1467980606c0 (LWP 281394))]
|
(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 0x000014679e04527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
|
#4 0x000014679e0288ff in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014679e02881b in __assert_fail_base (fmt=0x14679e1d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x558b56f30869 "(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)", file=file@entry=0x558b56f2b92d "/test/11.8_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=1931, function=function@entry=0x558b56f3076b "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *)")at ./assert/assert.c:96
|
#6 0x000014679e03b517 in __assert_fail (assertion=0x558b56f30869 "(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)", file=0x558b56f2b92d "/test/11.8_dbg/storage/innobase/lock/lock0lock.cc", line=1931, function=0x558b56f3076b "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *)") at ./assert/assert.c:105
|
#7 0x0000558b566d0983 in lock_rec_lock (impl=false, mode=3, block=0x14678b802d00, heap_no=1, index=0x14673c032818, thr=0x14673c07fc00)at /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:1930
|
#8 0x0000558b566d1e48 in lock_sec_rec_read_check_and_lock (flags=0, block=0x14678b802d00, rec=0x14678b8f8070 "supremum", index=0x14673c032818, offsets=0x14679805baa0, mode=LOCK_X, gap_mode=0, thr=0x14673c07fc00)at /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:6480
|
#9 0x0000558b568665bd in sel_set_rec_lock (pcur=0x14673c07f798, rec=0x14678b8f8070 "supremum", index=0x14673c032818, offsets=0x14679805baa0, mode=3, type=0, thr=0x14673c07fc00, mtr=0x14679805c3e8) at /test/11.8_dbg/storage/innobase/row/row0sel.cc:1369
|
#10 0x0000558b56860344 in row_search_mvcc (buf=0x14673c07dde0 "\376", mode=PAGE_CUR_L, prebuilt=0x14673c07f5c8, match_mode=0, direction=0)at /test/11.8_dbg/storage/innobase/row/row0sel.cc:4946
|
#11 0x0000558b5661f3dd in ha_innobase::index_read (this=0x14673c07d588, buf=0x14673c07dde0 "\376", key_ptr=0x0, key_len=0, find_flag=HA_READ_BEFORE_KEY)at /test/11.8_dbg/storage/innobase/handler/ha_innodb.cc:9020
|
#12 0x0000558b5661ff49 in ha_innobase::index_last (this=0x14673c07d588, buf=0x14673c07dde0 "\376")at /test/11.8_dbg/storage/innobase/handler/ha_innodb.cc:9390
|
#13 0x0000558b56243673 in handler::ha_index_last (this=0x14673c07d588, buf=0x14673c07dde0 "\376") at /test/11.8_dbg/sql/handler.cc:3980
|
#14 0x0000558b564226c6 in MHNSW_Share::acquire (ctx=0x14679805cb00, table=0x14673c0305f8, for_update=true)at /test/11.8_dbg/sql/vector_mhnsw.cc:725
|
#15 0x0000558b5642442b in mhnsw_insert (table=0x14673c0305f8, keyinfo=0x14673c0283c0) at /test/11.8_dbg/sql/vector_mhnsw.cc:1202
|
#16 0x0000558b55d7272c in TABLE::hlindexes_on_insert (this=0x14673c0305f8)at /test/11.8_dbg/sql/sql_base.cc:9950
|
#17 0x0000558b5624f9a4 in handler::ha_write_row (this=0x14673c027968, buf=0x14673c0281c0 "\376\001") at /test/11.8_dbg/sql/handler.cc:8203
|
#18 0x0000558b55dc73a7 in write_record (thd=0x14673c000d58, table=0x14673c0305f8, info=0x14679805d0d0, sink=0x0)at /test/11.8_dbg/sql/sql_insert.cc:2332
|
#19 0x0000558b55dc389d in mysql_insert (thd=0x14673c000d58, table_list=0x14673c019e18, fields=@0x14673c005fe0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x558b579ef6f0 <end_of_list>, last = 0x14673c005fe0, elements = 0}, <No data fields>}, values_list=@0x14673c006028: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14673c01ab78, last = 0x14673c01ab78, elements = 1}, <No data fields>}, update_fields=@0x14673c006010: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x558b579ef6f0 <end_of_list>, last = 0x14673c006010, elements = 0}, <No data fields>}, update_values=@0x14673c005ff8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x558b579ef6f0 <end_of_list>, last = 0x14673c005ff8, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0)at /test/11.8_dbg/sql/sql_insert.cc:1159
|
#20 0x0000558b55e22a82 in mysql_execute_command (thd=0x14673c000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:4484
|
#21 0x0000558b55e18784 in mysql_parse (thd=0x14673c000d58, rawbuf=0x14673c019d20 "INSERT INTO t VALUES (1,0x31313131)", length=35, parser_state=0x14679805ea20) at /test/11.8_dbg/sql/sql_parse.cc:7915
|
#22 0x0000558b55e15b54 in dispatch_command (command=COM_QUERY, thd=0x14673c000d58, packet=0x14673c00b099 "INSERT INTO t VALUES (1,0x31313131)", packet_length=35, blocking=true) at /test/11.8_dbg/sql/sql_parse.cc:1902
|
#23 0x0000558b55e19333 in do_command (thd=0x14673c000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1415
|
#24 0x0000558b560029c9 in do_handle_one_connection (connect=0x558b713b4f48, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415
|
#25 0x0000558b5600276e in handle_one_connection (arg=0x558b713ce158)at /test/11.8_dbg/sql/sql_connect.cc:1327
|
#26 0x000014679e09caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
|
#27 0x000014679e129c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
|
Bug confirmed present in:
MariaDB: 11.8.1 (dbg), 12.0.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 11.8.1 (opt), 12.0.0 (opt)
I also ran into this with the following somewhat different testcase (DELETE instead of 2nd INSERT):
--source include/have_innodb.inc
CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025
mariadbd: /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:1931: dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *): Assertion `(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)' failed.
CS 11.8.1 33e0796e7a154e02a5e53c55cefc5d6feb4f5e6d (Debug) Build 15/02/2025
Core was generated by `/test/MD150225-mariadb-11.8.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
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 1433922)]
(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 0x0000154da264526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
#4 0x0000154da26288ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x0000154da262881b in __assert_fail_base (fmt=0x154da27d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55a5cbd248d6 "(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)", file=file@entry=0x55a5cbd1f99a "/test/11.8_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=1931, function=function@entry=0x55a5cbd247d8 "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *)")at ./assert/assert.c:94
#6 0x0000154da263b507 in __assert_fail (assertion=0x55a5cbd248d6 "(0x7 & mode) != LOCK_X || lock_table_has(trx, index->table, LOCK_IX)", file=0x55a5cbd1f99a "/test/11.8_dbg/storage/innobase/lock/lock0lock.cc", line=1931, function=0x55a5cbd247d8 "dberr_t lock_rec_lock(bool, unsigned int, const buf_block_t *, ulint, dict_index_t *, que_thr_t *)") at ./assert/assert.c:103
#7 0x000055a5cb4c3b43 in lock_rec_lock (impl=false, mode=3, block=0x154d8f801a40, heap_no=1, index=0x154d381231d8, thr=0x154d38329c70)at /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:1930
#8 0x000055a5cb4c5008 in lock_sec_rec_read_check_and_lock (flags=0, block=0x154d8f801a40, rec=0x154d8f894070 "supremum", index=0x154d381231d8, offsets=0x154d97f19b80, mode=LOCK_X, gap_mode=0, thr=0x154d38329c70)at /test/11.8_dbg/storage/innobase/lock/lock0lock.cc:6480
#9 0x000055a5cb65886d in sel_set_rec_lock (pcur=0x154d38329808, rec=0x154d8f894070 "supremum", index=0x154d381231d8, offsets=0x154d97f19b80, mode=3, type=0, thr=0x154d38329c70, mtr=0x154d97f1a4c8) at /test/11.8_dbg/storage/innobase/row/row0sel.cc:1369
#10 0x000055a5cb6525f4 in row_search_mvcc (buf=0x154d38327e50 "\376", mode=PAGE_CUR_L, prebuilt=0x154d38329638, match_mode=0, direction=0)at /test/11.8_dbg/storage/innobase/row/row0sel.cc:4946
#11 0x000055a5cb41242d in ha_innobase::index_read (this=0x154d383275f8, buf=0x154d38327e50 "\376", key_ptr=0x0, key_len=0, find_flag=HA_READ_BEFORE_KEY)at /test/11.8_dbg/storage/innobase/handler/ha_innodb.cc:9020
#12 0x000055a5cb412f99 in ha_innobase::index_last (this=0x154d383275f8, buf=0x154d38327e50 "\376")at /test/11.8_dbg/storage/innobase/handler/ha_innodb.cc:9390
#13 0x000055a5cb0366c3 in handler::ha_index_last (this=0x154d383275f8, buf=0x154d38327e50 "\376") at /test/11.8_dbg/sql/handler.cc:3980
#14 0x000055a5cb215716 in MHNSW_Share::acquire (ctx=0x154d97f1aa78, table=0x154d38136f98, for_update=true)at /test/11.8_dbg/sql/vector_mhnsw.cc:725
#15 0x000055a5cb21a6d1 in mhnsw_invalidate (table=0x154d38136f98, rec=0x154d38300000 "\0042222", '\245' <repeats 11 times>, "\300", keyinfo=0x154d38300258) at /test/11.8_dbg/sql/vector_mhnsw.cc:1440
#16 0x000055a5cab65afc in TABLE::hlindexes_on_delete (this=0x154d38136f98, buf=0x154d38300000 "\0042222", '\245' <repeats 11 times>, "\300")at /test/11.8_dbg/sql/sql_base.cc:9975
#17 0x000055a5cb043578 in handler::ha_delete_row (this=0x154d382ff7a8, buf=0x154d38300000 "\0042222", '\245' <repeats 11 times>, "\300")at /test/11.8_dbg/sql/handler.cc:8334
#18 0x000055a5caba8886 in TABLE::delete_row (this=0x154d38136f98)at /test/11.8_dbg/sql/sql_delete.cc:296
#19 0x000055a5caba378e in Sql_cmd_delete::delete_from_single_table (this=0x154d3801ace8, thd=0x154d38000d58)at /test/11.8_dbg/sql/sql_delete.cc:901
#20 0x000055a5caba7cfe in Sql_cmd_delete::execute_inner (this=0x154d3801ace8, thd=0x154d38000d58) at /test/11.8_dbg/sql/sql_delete.cc:2079
#21 0x000055a5caccfb06 in Sql_cmd_dml::execute (this=0x154d3801ace8, thd=0x154d38000d58) at /test/11.8_dbg/sql/sql_select.cc:34407
#22 0x000055a5cac154bd in mysql_execute_command (thd=0x154d38000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:4428
#23 0x000055a5cac0b7d4 in mysql_parse (thd=0x154d38000d58, rawbuf=0x154d38019dc0 "DELETE FROM t", length=13, parser_state=0x154d97f1ca20) at /test/11.8_dbg/sql/sql_parse.cc:7915
#24 0x000055a5cac08ba4 in dispatch_command (command=COM_QUERY, thd=0x154d38000d58, packet=0x154d3800b139 "DELETE FROM t;", packet_length=14, blocking=true) at /test/11.8_dbg/sql/sql_parse.cc:1902
#25 0x000055a5cac0c383 in do_command (thd=0x154d38000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1415
#26 0x000055a5cadf5a19 in do_handle_one_connection (connect=0x55a5cf35a088, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415
#27 0x000055a5cadf57be in handle_one_connection (arg=0x55a5cf33f1c8)at /test/11.8_dbg/sql/sql_connect.cc:1327
#28 0x0000154da269ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
#29 0x0000154da2729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78