MariaDB Crashes
There are a number of causes of MariaDB crashes. Most of these are MariaDB encountering a situation where it cannot safely proceed.
Assertions
These look like [ERROR] mariadbd got signal 6
. There might be associated text in the error log like:
InnoDB: Assertion failure in file ./storage/innobase/os/os0file.cc line 3540 InnoDB: Failing assertion: cb->m_err == DB_SUCCESS
On OSX it might show up as Exception Type: EXC_CRASH (SIGABRT)
.
There maybe a stack trace, and perhaps a user SQL query (depending on the location). These are usually program errors that MariaDB got into a state where the developers did not expect to happen. Occasionally like the above, there are operating system factors that the developers haven't written handling routines for. In all cases this should be reported as a bug.
SEGV / Segment Violation
A SEGV, or Segment Violation, is an operating system concept in this case MariaDB accessing a location in memory it doesn't own. It will occur in the logs like:
[ERROR] mysqld got signal 11 ;
A full stack trace from the [how-to-produce-a-full-stack-trace-for-mysqld/#analyzing-a-core-file-with-gdb-on-linux|core file generated] is needed to resolve this form of error.
If there is a SQL query in the log file, include this in the bug report, along with EXPLAIN query
and SHOW CREATE TABLE tblname
for tables involved to enable a test case for this crash.
SIGBUS
This occurs when the alignment of memory doesn't correspond to the code accessing it.
[ERROR] mysqld got signal 7
Threat like SEGV.
Hardware faults
This can be disk corruption where MariaDB reads data and that data wasn't what was written. This will result in MariaDB doing unexpected things, including potentially accessing unallocated memory.
RAM corruptions can also result in undefined behaviour that is unfixable with software.