Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.18
-
None
-
None
-
CentOS Linux release 7.7.1908 (Core)
Linux 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 30 14:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description
We recently ran into a crash with a user performing a query causing MariaDB to crash.
Crash log:
191003 10:27:53 [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.18-MariaDB-log
|
key_buffer_size=16777216
|
read_buffer_size=131072
|
max_used_connections=3
|
max_threads=153
|
thread_count=9
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352734 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0x7f4c880009a8
|
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 = 0x202c090a0d22656d thread_stack 0x40000
|
The query in question:
DROP TABLE IF EXISTS DBA_memDatabaseList; |
CREATE TEMPORARY TABLE IF NOT EXISTS DBA_memDatabaseList ENGINE=MEMORY AS ( |
select schema_name as database_name |
from information_schema.schemata |
);
|
|
SELECT database_name "DatabaseName" |
, ROUND(SUM(data_length + index_length + data_free) / 1024 / 1024, 1) "DB_Size_MB" |
, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "Space_Used_ MB" |
, ROUND(SUM(data_free) / 1024 / 1024, 1) "Free_space_MB" |
, IF(t.table_schema IS NULL, NULL, COUNT(*)) "Table count" |
FROM DBA_memDatabaseList d |
LEFT JOIN information_schema.TABLES t ON t.table_schema = d.database_name |
GROUP BY d.database_name |
ORDER BY 1; |
|
DROP TABLE DBA_memDatabaseList |
When the query is run statement by statement, in 4 separate queries, is succeeds with no issue, like this:
Time Id Command Argument
|
191003 10:27:28 8 Query DROP TABLE IF EXISTS DBA_memDatabaseList
|
8 Query CREATE TEMPORARY TABLE IF NOT EXISTS DBA_memDatabaseList ENGINE=MEMORY AS (
|
select schema_name as database_name
|
from information_schema.schemata
|
)
|
8 Query SELECT database_name "DatabaseName"
|
, ROUND(SUM(data_length + index_length + data_free) / 1024 / 1024, 1) "DB_Size_MB"
|
, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "Space_Used_ MB"
|
, ROUND(SUM(data_free) / 1024 / 1024, 1) "Free_space_MB"
|
, IF(t.table_schema IS NULL, NULL, COUNT(*)) "Table count"
|
FROM DBA_memDatabaseList d
|
LEFT JOIN information_schema.TABLES t ON t.table_schema = d.database_name
|
GROUP BY d.database_name
|
ORDER BY 1
|
8 Query DROP TABLE DBA_memDatabaseList
|
However, when run as a single query with multiple statements, it causes the entire server to crash. This is the query log when a crash occurs:
Time Id Command Argument
|
191003 10:27:53 10 Query DROP TABLE IF EXISTS DBA_memDatabaseList;
|
CREATE TEMPORARY TABLE IF NOT EXISTS DBA_memDatabaseList ENGINE=MEMORY AS (
|
select schema_name as database_name
|
from information_schema.schemata
|
);
|
|
SELECT database_name "DatabaseName"
|
, ROUND(SUM(data_length + index_length + data_free) / 1024 / 1024, 1) "DB_Size_MB"
|
, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "Space_Used_ MB"
|
, ROUND(SUM(data_free) / 1024 / 1024, 1) "Free_space_MB"
|
, IF(t.table_schema IS NULL, NULL, COUNT(*)) "Table count"
|
FROM DBA_memDatabaseList d
|
LEFT JOIN information_schema.TABLES t ON t.table_schema = d.database_name
|
GROUP BY d.database_name
|
ORDER BY 1;
|
|
DROP TABLE DBA_memDatabaseList
|
Steps to re-produce:
- Install MariaDB-server-10.3.18-1.el7.centos.x86_64
- Run the above query as multiple statements in a single query