[MDEV-32021] Server crash or assertion failure upon update on Mroonga table with trigger Created: 2023-08-26  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - Mroonga, Triggers
Affects Version/s: 10.4, 10.5, 10.6, 10.10, 10.11, 11.0, 11.1
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-32161 如果将mariadb的存储引擎设置为Mroonga,并且将配置项mroon... Closed
is duplicated by MDEV-32488 server crash when engine set to ha_mr... Closed

 Description   

INSTALL SONAME 'ha_mroonga';
 
CREATE TABLE t (pk INT AUTO_INCREMENT, a INT, b INT, PRIMARY KEY (pk), KEY (a)) ENGINE=Mroonga;
INSERT INTO t (a, b) VALUES (0,1),(2,2);
 
CREATE TRIGGER tr AFTER UPDATE ON t FOR EACH ROW SET @a= 1;
UPDATE t SET b = 3 WHERE a = 0;
 
# Cleanup
DROP TABLE t;
UNINSTALL SONAME 'ha_mroonga';

10.4 900c4d69 non-debug

#2  <signal handler called>
#3  0x000055af2100ac16 in handler::read_range_next (this=0x7f61cc1255c0) at /data/src/10.4/sql/handler.cc:6006
#4  0x000055af20f28ecc in handler::multi_range_read_next (this=0x7f61cc1255c0, range_info=0x7f61de533ed8) at /data/src/10.4/sql/multi_range_read.cc:325
#5  0x000055af211215b3 in QUICK_RANGE_SELECT::get_next (this=0x7f61cc75f600) at /data/src/10.4/sql/opt_range.cc:12345
#6  0x000055af21148939 in rr_quick (info=0x7f61de5340a0) at /data/src/10.4/sql/records.cc:369
#7  0x000055af20eb65b7 in READ_RECORD::read_record (this=0x7f61de5340a0) at /data/src/10.4/sql/records.h:70
#8  mysql_update (thd=thd@entry=0x7f61cc000c58, table_list=<optimized out>, fields=..., values=..., conds=<optimized out>, order_num=<optimized out>, order=<optimized out>, limit=18446744073709551614, ignore=<optimized out>, found_return=<optimized out>, updated_return=<optimized out>) at /data/src/10.4/sql/sql_update.cc:1006
#9  0x000055af20df5ab0 in mysql_execute_command (thd=thd@entry=0x7f61cc000c58) at /data/src/10.4/sql/sql_parse.cc:4449
#10 0x000055af20dfab31 in mysql_parse (thd=0x7f61cc000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.4/sql/sql_parse.cc:8010
#11 0x000055af20dfd1ad in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f61cc000c58, packet=packet@entry=0x7f61cc007d69 "UPDATE t SET b = 3 WHERE a = 0", packet_length=packet_length@entry=30, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:1958
#12 0x000055af20dff52f in do_command (thd=0x7f61cc000c58) at /data/src/10.4/sql/sql_parse.cc:1378
#13 0x000055af20ef8dbe in do_handle_one_connection (connect=connect@entry=0x55af22a63038) at /data/src/10.4/sql/sql_connect.cc:1420
#14 0x000055af20ef8edd in handle_one_connection (arg=arg@entry=0x55af22a63038) at /data/src/10.4/sql/sql_connect.cc:1324
#15 0x000055af2128bffb in pfs_spawn_thread (arg=0x55af229bad08) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#16 0x00007f61e45c8fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#17 0x00007f61e46495bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

10.4 900c4d69 debug

mysqld: /data/src/10.4/sql/handler.h:3183: int handler::ha_index_init(uint, bool): Assertion `inited==NONE' failed.
230826 18:53:08 [ERROR] mysqld got signal 6 ;
 
#9  0x00007f99ea653df2 in __GI___assert_fail (assertion=0x5563b7bbc840 "inited==NONE", file=0x5563b7bbc7c0 "/data/src/10.4/sql/handler.h", line=3183, function=0x5563b7bbc880 "int handler::ha_index_init(uint, bool)") at ./assert/assert.c:101
#10 0x00005563b59c199e in handler::ha_index_init (this=0x62500010b928, idx=0, sorted=true) at /data/src/10.4/sql/handler.h:3183
#11 0x00005563b632f4a1 in handler::get_auto_increment (this=0x62500010b928, offset=1, increment=1, nb_desired_values=1, first_value=0x62500010b990, nb_reserved_values=0x7f99e286e7f0) at /data/src/10.4/sql/handler.cc:3629
#12 0x00007f99e13cb0be in ha_mroonga::storage_get_auto_increment (this=0x62500010b928, offset=1, increment=1, nb_desired_values=1, first_value=0x62500010b990, nb_reserved_values=0x7f99e286e7f0) at /data/src/10.4/storage/mroonga/ha_mroonga.cpp:16108
#13 0x00007f99e1332c60 in ha_mroonga::storage_info (this=0x62500010b928, flag=64) at /data/src/10.4/storage/mroonga/ha_mroonga.cpp:5299
#14 0x00007f99e134c1b1 in ha_mroonga::storage_update_row (this=0x62500010b928, old_data=0x61900008c0c8 "\371\001", new_data=0x61900008c0b8 "\371\001") at /data/src/10.4/storage/mroonga/ha_mroonga.cpp:6827
#15 0x00007f99e1350650 in ha_mroonga::update_row (this=0x62500010b928, old_data=0x61900008c0c8 "\371\001", new_data=0x61900008c0b8 "\371\001") at /data/src/10.4/storage/mroonga/ha_mroonga.cpp:7042
#16 0x00005563b63493b7 in handler::ha_update_row (this=0x62500010b928, old_data=0x61900008c0c8 "\371\001", new_data=0x61900008c0b8 "\371\001") at /data/src/10.4/sql/handler.cc:6905
#17 0x00005563b5e460b3 in mysql_update (thd=0x62b00005b208, table_list=0x62b000062338, fields=..., values=..., conds=0x62b000062e28, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7f99e2872e80, updated_return=0x7f99e2872ea0) at /data/src/10.4/sql/sql_update.cc:1087
#18 0x00005563b5b77ab4 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:4449
#19 0x00005563b5b90a77 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "UPDATE t SET b = 3 WHERE a = 0", length=30, parser_state=0x7f99e2874860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8010
#20 0x00005563b5b66d42 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "UPDATE t SET b = 3 WHERE a = 0", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#21 0x00005563b5b638b1 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
#22 0x00005563b5f62e10 in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
#23 0x00005563b5f62727 in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
#24 0x00005563b6bd2e20 in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#25 0x00007f99ea6a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#26 0x00007f99ea7285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81


Generated at Thu Feb 08 10:28:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.