[MDEV-28130] MariaDB SEGV issue at tree_search_next Created: 2022-03-19  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.9.0, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Jingzhou Fu Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Linux jie-2 5.4.143-1-pve #1 SMP PVE 5.4.143-1 (Tue, 28 Sep 2021 09:10:37 +0200) x86_64 x86_64 x86_64 GNU/Linux


Issue Links:
Relates
relates to MDEV-22695 Server crashes in heap_rnext upon DEL... Confirmed

 Description   

PoC:

CREATE TABLE v(t1 INT, pk INT, KEY(t1), KEY pk using btree (pk), KEY v using btree(t1, pk)) engine=memory;
HANDLER v OPEN;
HANDLER v READ t1=(2) limit 3;
HANDLER v READ pk PREV;
HANDLER v READ pk PREV;

report:

Thread pointer: 0x62b00015e218
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f9e1a217680 thread_stack 0x5fc00
??:0(__interceptor_backtrace)[0x7cbadb]
mysys/stacktrace.c:212(my_print_stacktrace)[0x2a86d37]
sql/signal_handler.cc:0(handle_fatal_signal)[0x15af5d9]
sigaction.c:0(__restore_rt)[0x7f9e417f43c0]
mysys/tree.c:502(tree_search_next)[0x2a9a51c]
:0(heap_rprev)[0x214b1bb]
sql/handler.cc:3524(handler::ha_index_prev(unsigned char*))[0x15c8b2e]
??:0(mysql_ha_read(THD*, TABLE_LIST*, enum_ha_read_modes, char const*, List<Item>*, ha_rkey_function, Item*, unsigned long long, unsigned long long))[0xb60f2b]
sql/sql_parse.cc:5588(mysql_execute_command(THD*, bool))[0xc601de]
sql/sql_class.h:2734(THD::enter_stage(PSI_stage_info_v1 const*, char const*, char const*, unsigned int))[0xc4a67f]
sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0xc41baa]
sql/sql_parse.cc:1404(do_command(THD*, bool))[0xc4b74c]
sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x111f9f3]
sql/sql_connect.cc:0(handle_one_connection)[0x111f249]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x1f3f9de]
nptl/pthread_create.c:478(start_thread)[0x7f9e417e8609]
??:0(clone)[0x7f9e414fe163]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x629000087238): HANDLER v READ pk PREV



 Comments   
Comment by Alice Sherepa [ 2022-03-21 ]

Thank you! I repeated as described on 10.2-10.8

Generated at Thu Feb 08 09:58:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.