Galera Cluster Moodle 3.9 - Lock Table Errors

Re: Galera Cluster Moodle 3.9 - Lock Table Errors

by Rafael Luiz Xavier -
Number of replies: 0

Hello guys

I was having similar problems. Mariadb closed unexpectedly with the error "signal 11". It returned quickly and the node joined the cluster. But it was happening frequently.
Monitoring my loadbalancers I noticed that the moodle cron script that should be run every one minute caused the lock.
As I only have 2 instances of application, I put one to run in odd minutes and the other in even minutes.

They are not yet in production, and I don't know if I would have problems again when I have a lot of users using it.
1 [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.3.25-MariaDB-0+deb10u1
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=2
max_threads=153
thread_count=10
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467424 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f4bec000f38
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 = 0x7f4c44080dd8 thread_stack 0x49000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55c199b2a05e]
/usr/sbin/mysqld(handle_fatal_signal+0x54d)[0x55c19965d09d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f4c48890730]
/usr/sbin/mysqld(_Z11ull_get_keyPKhPmc+0x14)[0x55c1996b3f54]
/usr/sbin/mysqld(+0xc5322d)[0x55c199b1122d]
/usr/sbin/mysqld(my_hash_first_from_hash_value+0x87)[0x55c199b11487]
/usr/sbin/mysqld(my_hash_search+0x11)[0x55c199b11571]
/usr/sbin/mysqld(_ZN18Item_func_get_lock7val_intEv+0x15c)[0x55c1996b69cc]
/usr/sbin/mysqld(_ZNK12Type_handler14Item_send_longEP4ItemP8ProtocolP8st_value+0x19)[0x55c1995ba829]
/usr/sbin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0xb5)[0x55c1993e8e35]
/usr/sbin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0x5b)[0x55c199448b2b]
/usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xae6)[0x55c1994df1f6]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x33)[0x55c1994df3d3]
/usr/sbin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xef)[0x55c1994ddaaf]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x14d)[0x55c1994de38d]
/usr/sbin/mysqld(+0x5c1d8c)[0x55c19947fd8c]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x5857)[0x55c19948c087]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x1c9)[0x55c19948e879]
/usr/sbin/mysqld(+0x5d1189)[0x55c19948f189]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1423)[0x55c199490a33]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x122)[0x55c199491e82]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x23a)[0x55c1995631ba]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x55c19956333d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3)[0x7f4c48885fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f4c47f0f4cf]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f4bec010aa0): SELECT GET_LOCK('9bd9299a857ef274cb0d0ecf33b68d21f775bcb1', '0') AS locked
Connection ID (thread ID): 2207
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,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on

The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             7864                 7864                 processes
Max open files            16384                16384                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       7864                 7864                 signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: core