[MDEV-25170] Mariadb/Galera crashes after FreeSWITCH shutdown Created: 2021-03-16 Updated: 2021-12-23 Resolved: 2021-12-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Server |
| Affects Version/s: | 10.5.9 |
| Fix Version/s: | 10.5.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jerry Kendall | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
FreeSWITCH v1.10 VoIP Server talking to MariaDB v10.5.9 Cluster of 2 nodes [galera] wsrep_provider_options="gmcast.segment=88; " binlog_format=row |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
/var/log/mysql/error.log 2021-03-16 16:27:16 20 [ERROR] InnoDB: Conflicting lock on table: `FreeSWITCH`.`interfaces` index: GEN_CLUST_INDEX that has lock Record lock, heap no 3 PHYSICAL RECORD: n_fields 10; compact format; info bits 0 Record lock, heap no 4 PHYSICAL RECORD: n_fields 10; compact format; info bits 0 ....... many more of the above ------ 2021-03-16 16:27:16 20 [ERROR] InnoDB: WSREP state: 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 Server version: 10.5.9-MariaDB-1:10.5.9+maria~buster Thread pointer: 0x7f7fd80133c8 Trying to get some variables. Connection ID (thread ID): 20 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=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains |
| Comments |
| Comment by Jerry Kendall [ 2021-03-16 ] |
|
Update.... I changed the 'wsrep_slave_threads' from 16 to 1 and the crashing has improved - still doing repeated start/stop on the FreeSWITCH server. I had set the wsrep_slave-threads to 16 as each mariadb server has 4 cores and everything I found indicates 4x #cores.... anyone have an official opinion on this setting ? |
| Comment by Jerry Kendall [ 2021-03-17 ] |
|
So, after 12 hours of constant start/stop of the FreeSWITCH server with wsrep_slave_threads set to '1', the DB cluster does not crash. Anyone have any comments as to what the wsrep_slave_threads should be set to for a server with 12GB RAM and 4 Cores ? |
| Comment by Jerry Kendall [ 2021-03-17 ] |
|
So, after 16 hours of of constant start/stop of the FreeSWITCH server with wsrep_slave_threads set to '1', the DB cluster does not crash. I then set wsrep_slave_threads set to '2' and the DB crashes after only 10 minutes of start/stop freeswitch..... Clearly something not quite right here. |
| Comment by Jerry Kendall [ 2021-03-17 ] |
|
So, here is the latest galera.cnf file [galera] wsrep_provider_options="gmcast.segment=88; gcache.size=1G;" [mysqld]
|
| Comment by Jerry Kendall [ 2021-03-17 ] |
|
Hosts are all the same, Debian 10 |
| Comment by Jerry Kendall [ 2021-03-17 ] |
|
When FreeSWITCH is shutdown (systemctl stop freeswitch), it removes a few records from a few tables. |
| Comment by Jerry Kendall [ 2021-03-18 ] |
|
is there are formula for these params? innodb_buffer_pool_size and wsrep_slave_threads |
| Comment by Jerry Kendall [ 2021-03-18 ] |
|
Also, with wsrep_slave_threads=2, it regularly crashed the DB when FreeSWITCH was stopping. |
| Comment by Nathan Neulinger [ 2021-04-04 ] |
|
I'm seeing the exact same failure after upgrading cluster from 10.5.5 to 10.5.9. I have been running this and a whole bunch of other clusters with wsrep_slave_threads=8 and just started noticing this issue after it failed two nights in a row. Unclear what is triggering it, but same trace including the same triggering table. |
| Comment by Marko Mäkelä [ 2021-05-03 ] |
|
Starting with |