[MDEV-25747] MariaDB 10.5.10 crash while using partitioning Created: 2021-05-20  Updated: 2021-05-21

Status: Open
Project: MariaDB Server
Component/s: Partitioning
Affects Version/s: 10.3.25, 10.5.10
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ihor Tymoshenko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Hello!

I have an issue while using partitioning on MariaDB 10.5.10. Initially, the same issue was on MariaDB 10.3.25. I've updated MariaDB from 10.3.25 to 10.5.10, but the issue still reproducing.

MariaDB periodically crashes when executing the same query.

Bellow the part from the file /var/log/mysql/mysqld.log:

210520 16:16:01 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.
 
Server version: 10.5.10-MariaDB-1:10.5.10+maria~buster-log
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=2
max_threads=153
thread_count=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 353183 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7ef870000c18
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 = 0x7efcc4ee5d58 thread_stack 0x40000
??:0(my_print_stacktrace)[0x56176ef7d4ee]
??:0(handle_fatal_signal)[0x56176ea06ca5]
??:0(__restore_rt)[0x7efcd5775730]
??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56176ec1c508]
??:0(my_qsort2)[0x56176ef6d592]
??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56176ec23828]
??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56176ec2c14e]
??:0(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x56176ea0c69a]
??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56176ec25904]
??:0(QUICK_RANGE_SELECT::init_ror_merged_scan(bool, st_mem_root*))[0x56176eb1b2a5]
??:0(QUICK_ROR_INTERSECT_SELECT::init_ror_merged_scan(bool, st_mem_root*))[0x56176eb1c3db]
??:0(QUICK_ROR_INTERSECT_SELECT::reset())[0x56176eb1ac44]
??:0(join_init_read_record(st_join_table*))[0x56176e85db99]
??:0(sub_select(JOIN*, st_join_table*, bool))[0x56176e84c72e]
??:0(JOIN::exec_inner())[0x56176e871c65]
??:0(JOIN::exec())[0x56176e871fd7]
??:0(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x56176e8702d8]
??:0(handle_select(THD*, LEX*, select_result*, unsigned long))[0x56176e870bae]
??:0(LEX::mark_first_table_as_inserting())[0x56176e80dfed]
??:0(mysql_execute_command(THD*))[0x56176e8176a4]
??:0(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56176e8093bf]
??:0(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x56176e814c5c]
??:0(do_command(THD*))[0x56176e815b9b]
??:0(do_handle_one_connection(CONNECT*, bool))[0x56176e906291]
??:0(handle_one_connection)[0x56176e90662d]
??:0(MyCTX_nopad::finish(unsigned char*, unsigned int*))[0x56176ec317cb]
??:0(start_thread)[0x7efcd576afa3]
??:0(clone)[0x7efcd538d4cf]

Cheers!



 Comments   
Comment by Marko Mäkelä [ 2021-05-21 ]

Part of the stack trace looks invalid to me. Would it be possible to produce a better stack trace of the crash? Either, enable core dumps, or attach the debugger to the running process (sudo gdb -p $(pgrep mariadbd)), and then execute

set height 0
set log on
thread apply all backtrace
detach

to get a stack trace where the function parameters are present. Also the SHOW CREATE TABLE of the problematic table would help. You may obfuscate it by renaming columns. Even better would be some SQL that would reproduce the problem, starting from CREATE TABLE.

My best guess based on the available information is that ha_partition::clone() is involved in this. It calls handler::ha_open(), and it is called by QUICK_RANGE_SELECT::init_ror_merged_scan().

Comment by Alice Sherepa [ 2021-05-21 ]

It seems to be related to MDEV-21134. Could you please provide a test to reproduce this problem?

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