[MDEV-28353] mysql signal 11 during startup one one node wsrep/galera Created: 2022-04-20  Updated: 2022-09-14  Resolved: 2022-09-14

Status: Closed
Project: MariaDB Server
Component/s: Galera, wsrep
Affects Version/s: 10.5.15, 10.5
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Jaroslav Assignee: Jan Lindström (Inactive)
Resolution: Incomplete Votes: 0
Labels: None


 Description   

We can see during startup of mysql following happened on one node. The node goes to crashloop:

2022/04/18 23:13:22 Peer list updated
was []
now [mysql-0.mysql.default.svc.cluster.local mysql-1.mysql.default.svc.cluster.local mysql-2.mysql.default.svc.cluster.local]
2022/04/18 23:13:22 execing: /opt/galera/on-start.sh with stdin: mysql-0.mysql.default.svc.cluster.local
mysql-1.mysql.default.svc.cluster.local
mysql-2.mysql.default.svc.cluster.local
2022/04/18 23:13:22 *** [Galera] Joining cluster: mysql-1.mysql.default.svc.cluster.local,mysql-2.mysql.default.svc.cluster.local
2022/04/18 23:13:23 Peer finder exiting
Galera - Determining recovery position...
galera-recovery.sh: Attempting to recover GTID positon...
2022-04-18 23:13:23 0 [Note] mysqld (mysqld 10.5.15-MariaDB-1:10.5.15+maria~focal) starting as process 50 ...
galera-recovery.sh: Found WSREP position: 53dc9f3e-7e49-11ec-834f-168f1e85b3d4:350053
Galera recovery position: --wsrep_start_position=53dc9f3e-7e49-11ec-834f-168f1e85b3d4:350053
2022-04-18 23:13:24 0 [Note] mysqld (mysqld 10.5.15-MariaDB-1:10.5.15+maria~focal) starting as process 1 ...
2022-04-18 23:13:24 0 [Note] WSREP: Loading provider /usr/lib/galera/libgalera_smm.so initial position: 53dc9f3e-7e49-11ec-834f-168f1e85b3d4:350053
2022-04-18 23:13:24 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib/galera/libgalera_smm.so'
2022-04-18 23:13:24 0 [Note] WSREP: wsrep_load(): Galera 26.4.11(r67341d07) by Codership Oy <info@codership.com> loaded successfully.
2022-04-18 23:13:24 0 [Note] WSREP: CRC-32C: using 64-bit x86 acceleration.
2022-04-18 23:13:24 0 [Note] WSREP: Found saved state: 53dc9f3e-7e49-11ec-834f-168f1e85b3d4:-1, safe_to_bootstrap: 1
2022-04-18 23:13:24 0 [Note] WSREP: GCache DEBUG: opened preamble:
Version: 2
UUID: 53dc9f3e-7e49-11ec-834f-168f1e85b3d4
Seqno: -1 - -1
Offset: -1
Synced: 0
2022-04-18 23:13:24 0 [Note] WSREP: Recovering GCache ring buffer: version: 2, UUID: 53dc9f3e-7e49-11ec-834f-168f1e85b3d4, offset: -1
2022-04-18 23:13:24 0 [Note] WSREP: GCache::RingBuffer initial scan...  0.0% (        0/134217752 bytes) complete.
2022-04-18 23:13:25 0 [Note] WSREP: GCache::RingBuffer initial scan...100.0% (134217752/134217752 bytes) complete.
2022-04-18 23:13:25 0 [Note] WSREP: Recovering GCache ring buffer: found gapless sequence 297507-350053
2022-04-18 23:13:25 0 [Note] WSREP: GCache::RingBuffer unused buffers scan...  0.0% (       0/61502152 bytes) complete.
220418 23:13:25 [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.15-MariaDB-1:10.5.15+maria~focal
key_buffer_size=0
read_buffer_size=131072
max_used_connections=0
max_threads=252
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 554746 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0
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 = 0x0 thread_stack 0x49000
Printing to addr2line failed
mysqld(my_print_stacktrace+0x32)[0x5573dc90ed32]
mysqld(handle_fatal_signal+0x485)[0x5573dc356995]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f1a332cf3c0]
/usr/lib/galera/libgalera_smm.so(+0x1c4de0)[0x7f1a2d466de0]
/usr/lib/galera/libgalera_smm.so(+0x1c7ab7)[0x7f1a2d469ab7]
/usr/lib/galera/libgalera_smm.so(+0x1c903b)[0x7f1a2d46b03b]
/usr/lib/galera/libgalera_smm.so(+0x1cefea)[0x7f1a2d470fea]
/usr/lib/galera/libgalera_smm.so(+0x811a6)[0x7f1a2d3231a6]
/usr/lib/galera/libgalera_smm.so(+0x519f2)[0x7f1a2d2f39f2]
mysqld(_ZN5wsrep18wsrep_provider_v26C1ERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_RKNS_8provider8servicesE+0x1ec)[0x5573dc9ad94c]
mysqld(_ZN5wsrep8provider13make_providerERNS_12server_stateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_RKNS0_8servicesE+0x54)[0x5573dc9aa714]
mysqld(_ZN5wsrep12server_state13load_providerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKNS_8provider8servicesE+0x1f3)[0x5573dc995a13]
mysqld(_Z10wsrep_initv+0x193)[0x5573dc629063]
mysqld(_Z18wsrep_init_startupb+0x16)[0x5573dc6296f6]
mysqld(+0x69f299)[0x5573dc06d299]
mysqld(_Z11mysqld_mainiPPc+0x403)[0x5573dc0720c3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f1a32db60b3]
mysqld(_start+0x2e)[0x5573dc066d6e]
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        unlimited            unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             unlimited            unlimited            processes 
Max open files            1048576              1048576              files     
Max locked memory         67108864             67108864             bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       63975                63975                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: |/usr/share/apport/apport %p %s %c %d %P %E 

Config:

  mariadb.cnf: |
    [client]
    default-character-set = utf8
    [mysqld]
    core-file
    unix_socket = OFF
    performance_schema = ON
    character-set-server = utf8
    collation-server = utf8_general_ci
    ignore-db-dirs = lost+found 
    max_connections = 250
    interactive_timeout = 450 
    wait_timeout = 450
    table_definition_cache = 2100
    # InnoDB tuning
    innodb_buffer_pool_size = 7000MB
    innodb_log_file_size = 1600MB
    innodb_buffer_pool_size = 8400MB
    innodb_log_file_size = 2G
  galera.cnf: |
    [galera]
    user = mysql
    bind-address = 0.0.0.0
    default_storage_engine = InnoDB
    binlog_format = ROW
    innodb_autoinc_lock_mode = 2
    innodb_flush_log_at_trx_commit = 0
    query_cache_size = 0
    query_cache_type = 0
    binlog_cache_size = 61440
    # MariaDB Galera settings
    wsrep_on=ON
    wsrep_provider=/usr/lib/galera/libgalera_smm.so
    wsrep_sst_method=rsync
    wsrep_slave_threads=8
    wsrep_sync_wait=7
    # Cluster settings (automatically updated)
    wsrep_cluster_address=gcomm://
    wsrep_cluster_name=mysql
    wsrep_node_address=127.0.0.1

Core file afterwards (one time download)
https://file.io/pwReOYmUcUEb



 Comments   
Comment by Jan Lindström (Inactive) [ 2022-08-17 ]

jaroslav Can you please provide full output of thread apply all bt using debug package. Full error logs would also help to get bottom of this, but reasonable stack trace is required. Currently, I just see addresses.

Generated at Thu Feb 08 10:00:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.