[MDEV-12523] MariaDB server crash with METADATA_LOCK_INFO Plugin Created: 2017-04-18  Updated: 2020-08-25  Resolved: 2017-04-19

Status: Closed
Project: MariaDB Server
Component/s: Locking, Plugins
Affects Version/s: 10.0
Fix Version/s: 10.0.26, 10.1.15

Type: Bug Priority: Major
Reporter: Nilnandan Joshi Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-9728 Hard crash in metadata_lock_info Closed

 Description   

While running the below query MariaDB server is getting crash.

SELECT PCU.THREAD_ID, TH.processlist_id , PCU.EVENT_ID, PCU.SQL_TEXT , PCU.ROWS_AFFECTED FROM performance_schema.threads TH, performance_schema.events_statements_history PCU WHERE TH.THREAD_ID=PCU.THREAD_ID AND TH.processlist_id IN (SELECT DISTINCT(THREAD_ID) FROM INFORMATION_SCHEMA.metadata_lock_info)

Here is the error log details.

170417  7:30: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 http://kb.askmonty.org/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.0.19-MariaDB-log
key_buffer_size=134217728
read_buffer_size=1048576
max_used_connections=2459
max_threads=4002
thread_count=253
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 8406281 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x7f950f4ba008
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 = 0x7f9533e91de0 thread_stack 0x48000
mysys/stacktrace.c:247(my_print_stacktrace)[0xbca37e]
sql/signal_handler.cc:153(handle_fatal_signal)[0x71fe5c]
/lib64/libpthread.so.0[0x32cec0f710]
/MARIA/mariadb/lib/plugin/metadata_lock_info.so(_Z31i_s_metadata_lock_info_fill_rowP10MDL_ticketPv+0x126)[0x7f98f2d72e96]
sql/mdl.cc:713(mdl_iterate_lock)[0x677c5d]
/MARIA/mariadb/lib/plugin/metadata_lock_info.so(_Z33i_s_metadata_lock_info_fill_tableP3THDP10TABLE_LISTP4Item+0x27)[0x7f98f2d72d67]
sql/sql_show.cc:8159(get_schema_tables_result(JOIN*, enum_schema_table_state))[0x5f5121]
sql/sql_select.cc:2532(JOIN::exec_inner())[0x5ef045]
sql/sql_select.cc:2370(JOIN::exec())[0x5edd2a]
sql/sql_select.cc:373(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5f195d]
sql/sql_parse.cc:5275(execute_sqlcom_select)[0x5957d0]
sql/sql_parse.cc:2562(mysql_execute_command(THD*))[0x598427]
sql/sql_parse.cc:6529(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x59f866]
sql/sql_parse.cc:1310(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x5a1797]
sql/sql_parse.cc:999(do_command(THD*))[0x5a1ed9]
sql/sql_connect.cc:1375(do_handle_one_connection(THD*))[0x66bfd4]
sql/sql_connect.cc:1291(handle_one_connection)[0x66c112]
perfschema/pfs.cc:1863(pfs_spawn_thread)[0xa83f49]
/lib64/libpthread.so.0[0x32cec079d1]
/lib64/libc.so.6(clone+0x6d)[0x32ce8e8b6d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f9398bec020): SELECT PCU.THREAD_ID, TH.processlist_id , PCU.EVENT_ID, PCU.SQL_TEXT , PCU.ROWS_AFFECTED FROM performance_schema.threads TH, performance_schema.events_statements_history PCU WHERE TH.THREAD_ID=PCU.THREAD_ID AND TH.processlist_id IN (SELECT DISTINCT(THREAD_ID) FROM INFORMATION_SCHEMA.metadata_lock_info)
Connection ID (thread ID): 6259347
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
170417 07:30:03 mysqld_safe Number of processes running now: 0
170417 07:30:03 mysqld_safe mysqld restarted

I found one bug related to this https://jira.mariadb.org/browse/MDEV-9486 but not sure if both are same or different.



 Comments   
Comment by Elena Stepanova [ 2017-04-19 ]

The problem is reproducible with 10.0.19 where it was encountered), and up to 10.0.25. It was fixed in 10.0.26 in the scope of MDEV-9728.

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