Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25394

MariaDB crashing every few days

    XMLWordPrintable

Details

    Description

      I'm using MariaDB 10.3.27 on Debian 10.8 with Magento2 database and i'm experiencing MariaDB crash every few days. I have no idea what can cause those unexpected crashes. I'm sending my config and crash logs.

      --basedir=/usr
      --bind-address=127.0.0.1
      --datadir=/var/lib/mysql
      --expire_logs_days=10
      --key_buffer_size=16M
      --log-error=/var/log/mysql/error.log
      --max_allowed_packet=16M
      --max_binlog_size=100M
      --max_connections=151
      --pid-file=/var/run/mysqld/mysqld.pid
      --port=3306
      --skip-external-locking
      --socket=/var/run/mysqld/mysqld.sock
      --ssl=false
      --ssl-ca=/etc/mysql/cacert.pem
      --ssl-cert=/etc/mysql/server-cert.pem
      --ssl-key=/etc/mysql/server-key.pem
      --thread_cache_size=8
      --thread_stack=256K
      --tmpdir=/tmp
      --user=mysql

      2021-04-12  6:45:45 86 [Note] Detected table cache mutex contention at instance 1: 20% waits. Additional table cache instance activated. Number of instances after activation: 2.
      2021-04-12 07:20:14 0x7f86f8df4700  InnoDB: Assertion failure in file /build/mariadb-10.3-Zg5BW3/mariadb-10.3-10.3.27/storage/innobase/include/ut0lst.h line 334
      InnoDB: Failing assertion: list.count > 0
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
      InnoDB: about forcing recovery.
      210412  7:20:14 [ERROR] mysqld got signal 6 ;
      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.27-MariaDB-0+deb10u1
      key_buffer_size=16777216
      read_buffer_size=131072
      max_used_connections=66
      max_threads=153
      thread_count=21
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352736 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f86e0000c08
      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 = 0x7f86f8df3d58 thread_stack 0x40000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55c1666a191e]
      /usr/sbin/mysqld(handle_fatal_signal+0x54d)[0x55c1661d02ed]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f87236c2730]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x7f8722c7f7bb]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x7f8722c6a535]
      /usr/sbin/mysqld(+0x4e4537)[0x55c165f14537]
      /usr/sbin/mysqld(+0x4c799a)[0x55c165ef799a]
      /usr/sbin/mysqld(+0xaa86cc)[0x55c1664d86cc]
      /usr/sbin/mysqld(+0x4e84f9)[0x55c165f184f9]
      /usr/sbin/mysqld(+0xa7f563)[0x55c1664af563]
      /usr/sbin/mysqld(+0xa80a3d)[0x55c1664b0a3d]
      /usr/sbin/mysqld(+0xa810b1)[0x55c1664b10b1]
      /usr/sbin/mysqld(+0xa68490)[0x55c166498490]
      /usr/sbin/mysqld(+0xa82760)[0x55c1664b2760]
      /usr/sbin/mysqld(+0xa82a29)[0x55c1664b2a29]
      /usr/sbin/mysqld(+0xa4209a)[0x55c16647209a]
      /usr/sbin/mysqld(+0xa48f26)[0x55c166478f26]
      /usr/sbin/mysqld(+0x9d11d2)[0x55c1664011d2]
      /usr/sbin/mysqld(+0x9d1f16)[0x55c166401f16]
      /usr/sbin/mysqld(+0x9d2f29)[0x55c166402f29]
      /usr/sbin/mysqld(+0x998f38)[0x55c1663c8f38]
      /usr/sbin/mysqld(+0xa0bd00)[0x55c16643bd00]
      /usr/sbin/mysqld(+0x9f7f28)[0x55c166427f28]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3)[0x7f87236b7fa3]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f8722d414cf]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x0): (null)
      Connection ID (thread ID): 1
      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.
       
      We think the query pointer is invalid, but we will try to print it anyway.
      Query:
       
      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             3552                 3552                 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       3552                 3552                 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
       
      2021-04-12  7:20:20 0 [Note] InnoDB: Using Linux native AIO
      2021-04-12  7:20:20 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2021-04-12  7:20:20 0 [Note] InnoDB: Uses event mutexes
      2021-04-12  7:20:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2021-04-12  7:20:20 0 [Note] InnoDB: Number of pools: 1
      2021-04-12  7:20:20 0 [Note] InnoDB: Using generic crc32 instructions
      2021-04-12  7:20:20 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2021-04-12  7:20:20 0 [Note] InnoDB: Completed initialization of buffer pool
      2021-04-12  7:20:20 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2021-04-12  7:20:20 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=495883488607
      2021-04-12  7:20:21 0 [Note] InnoDB: Starting final batch to recover 1064 pages from redo log.
      2021-04-12  7:20:22 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2021-04-12  7:20:22 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2021-04-12  7:20:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2021-04-12  7:20:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2021-04-12  7:20:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2021-04-12  7:20:22 0 [Note] InnoDB: 10.3.27 started; log sequence number 495890286066; transaction id 30612869
      2021-04-12  7:20:22 0 [Note] Plugin 'FEEDBACK' is disabled.
      2021-04-12  7:20:22 0 [Note] Recovering after a crash using tc.log
      2021-04-12  7:20:22 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
      2021-04-12  7:20:22 0 [Note] Starting crash recovery...
      2021-04-12  7:20:22 0 [Note] Crash recovery finished.
      2021-04-12  7:20:22 0 [Warning] Failed to setup SSL
      2021-04-12  7:20:22 0 [Warning] SSL error: SSL_CTX_set_default_verify_paths failed
      2021-04-12  7:20:22 0 [Note] Server socket created on IP: '127.0.0.1'.
      2021-04-12  7:20:22 0 [Note] Reading of all Master_info entries succeeded
      2021-04-12  7:20:22 0 [Note] Added new Master_info '' to hash table
      2021-04-12  7:20:22 0 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.3.27-MariaDB-0+deb10u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 10
      2021-04-12  7:20:22 0 [Note] InnoDB: Buffer pool(s) load completed at 210412  7:20:22
      210412 10:20:13 [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.27-MariaDB-0+deb10u1
      key_buffer_size=16777216
      read_buffer_size=131072
      max_used_connections=26
      max_threads=153
      thread_count=22
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352736 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 0x40000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x5561bfdef91e]
      /usr/sbin/mysqld(handle_fatal_signal+0x54d)[0x5561bf91e2ed]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f8f42812730]
      /usr/sbin/mysqld(+0x99d4cc)[0x5561bfb1b4cc]
      /usr/sbin/mysqld(+0xa362fe)[0x5561bfbb42fe]
      /usr/sbin/mysqld(+0xa3c958)[0x5561bfbba958]
      /usr/sbin/mysqld(+0xa48cf7)[0x5561bfbc6cf7]
      /usr/sbin/mysqld(+0xa4e588)[0x5561bfbcc588]
      /usr/sbin/mysqld(+0x949de0)[0x5561bfac7de0]
      /usr/sbin/mysqld(+0x94fca1)[0x5561bfacdca1]
      /usr/sbin/mysqld(+0xa6941c)[0x5561bfbe741c]
      /usr/sbin/mysqld(+0xabbaba)[0x5561bfc39aba]
      /usr/sbin/mysqld(+0x9f8c90)[0x5561bfb76c90]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3)[0x7f8f42807fa3]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f8f41e914cf]
      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:
      2021-04-12 10:20:19 0 [Note] InnoDB: Using Linux native AIO
      2021-04-12 10:20:19 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2021-04-12 10:20:19 0 [Note] InnoDB: Uses event mutexes
      2021-04-12 10:20:19 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2021-04-12 10:20:19 0 [Note] InnoDB: Number of pools: 1
      2021-04-12 10:20:19 0 [Note] InnoDB: Using generic crc32 instructions
      2021-04-12 10:20:19 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2021-04-12 10:20:19 0 [Note] InnoDB: Completed initialization of buffer pool
      2021-04-12 10:20:19 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2021-04-12 10:20:19 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=497216384734
      2021-04-12 10:20:19 0 [Note] InnoDB: Starting final batch to recover 1068 pages from redo log.
      2021-04-12 10:20:20 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2021-04-12 10:20:20 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2021-04-12 10:20:20 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2021-04-12 10:20:20 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2021-04-12 10:20:20 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2021-04-12 10:20:20 0 [Note] InnoDB: 10.3.27 started; log sequence number 497234563756; transaction id 30720476
      2021-04-12 10:20:20 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
      2021-04-12 10:20:20 0 [Note] Plugin 'FEEDBACK' is disabled.
      2021-04-12 10:20:20 0 [Note] Recovering after a crash using tc.log
      2021-04-12 10:20:20 0 [Note] Starting crash recovery...
      2021-04-12 10:20:20 0 [Note] Crash recovery finished.
      2021-04-12 10:20:20 0 [Warning] Failed to setup SSL
      2021-04-12 10:20:20 0 [Warning] SSL error: SSL_CTX_set_default_verify_paths failed
      2021-04-12 10:20:20 0 [Note] Server socket created on IP: '127.0.0.1'.
      2021-04-12 10:20:20 0 [Note] Reading of all Master_info entries succeeded
      2021-04-12 10:20:20 0 [Note] Added new Master_info '' to hash table
      2021-04-12 10:20:20 0 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.3.27-MariaDB-0+deb10u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 10
      2021-04-12 10:20:20 0 [Note] InnoDB: Buffer pool(s) load completed at 210412 10:20:20
      malloc(): mismatching next->prev_size (unsorted)
      210412 13:20:16 [ERROR] mysqld got signal 6 ;
      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.27-MariaDB-0+deb10u1
      key_buffer_size=16777216
      read_buffer_size=131072
      max_used_connections=29
      max_threads=153
      thread_count=22
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352736 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f619405d3d8
      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 = 0x7f6278146dd8 thread_stack 0x40000
      2021-04-12 13:29:15 0 [Note] InnoDB: Using Linux native AIO
      2021-04-12 13:29:15 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2021-04-12 13:29:15 0 [Note] InnoDB: Uses event mutexes
      2021-04-12 13:29:15 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2021-04-12 13:29:15 0 [Note] InnoDB: Number of pools: 1
      2021-04-12 13:29:15 0 [Note] InnoDB: Using generic crc32 instructions
      2021-04-12 13:29:16 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2021-04-12 13:29:16 0 [Note] InnoDB: Completed initialization of buffer pool
      2021-04-12 13:29:16 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2021-04-12 13:29:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=498410802237
      2021-04-12 13:29:16 0 [Note] InnoDB: 1 transaction(s) which must be rolled back or cleaned up in total 1001 row operations to undo
      2021-04-12 13:29:16 0 [Note] InnoDB: Trx id counter is 30808447
      2021-04-12 13:29:16 0 [Note] InnoDB: Starting final batch to recover 49 pages from redo log.
      2021-04-12 13:29:16 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2021-04-12 13:29:16 0 [Note] InnoDB: Starting in background the rollback of recovered transactions
      2021-04-12 13:29:16 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2021-04-12 13:29:16 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2021-04-12 13:29:16 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2021-04-12 13:29:16 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2021-04-12 13:29:16 0 [Note] InnoDB: Waiting for purge to start
      2021-04-12 13:29:16 0 [Note] InnoDB: Rolled back recovered transaction 30808427
      2021-04-12 13:29:16 0 [Note] InnoDB: Rollback of non-prepared transactions completed
      2021-04-12 13:29:16 0 [Note] InnoDB: 10.3.27 started; log sequence number 498410809183; transaction id 30808449
      2021-04-12 13:29:16 0 [Note] Plugin 'FEEDBACK' is disabled.
      2021-04-12 13:29:16 0 [Note] Recovering after a crash using tc.log
      2021-04-12 13:29:16 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
      2021-04-12 13:29:16 0 [Note] Starting crash recovery...
      2021-04-12 13:29:16 0 [Note] Crash recovery finished.
      2021-04-12 13:29:16 0 [Warning] Failed to setup SSL
      2021-04-12 13:29:16 0 [Warning] SSL error: SSL_CTX_set_default_verify_paths failed
      2021-04-12 13:29:16 0 [Note] Server socket created on IP: '127.0.0.1'.
      2021-04-12 13:29:16 0 [Note] Reading of all Master_info entries succeeded
      2021-04-12 13:29:16 0 [Note] Added new Master_info '' to hash table
      2021-04-12 13:29:16 0 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.3.27-MariaDB-0+deb10u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 10
      2021-04-12 13:29:16 0 [Note] InnoDB: Buffer pool(s) load completed at 210412 13:29:16
      2021-04-12 14:28:44 14933 [Warning] Aborted connection 14933 to db: 'magento' user: 'magento' host: 'localhost' (Got an error reading communication packets)
      2021-04-12 14:40:23 17300 [Warning] Aborted connection 17300 to db: 'magento' user: 'magento' host: 'localhost' (Got an error reading communication packets)
      

      Attachments

        1. stacktrace.txt
          162 kB
          Dariusz Bilewicz

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dariuszb Dariusz Bilewicz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.