【发布时间】:2021-06-23 11:45:34
【问题描述】:
MariaDB 服务突然停止响应。它连续运行了5个多月,没有任何问题。当我们检查事件发生时的 MariaDB 服务状态时,它显示为 active (running) (service mariadb status)。但是我们无法登录 MariaDB 服务器,每次登录尝试都被挂起,没有任何响应。我们所有的 Web 应用程序也无法与 MariaDB 服务通信。另外,我们检查了 max_used_connections,它低于最大值。
当我们查看日志时,我们看到了以下错误(这是在事件发生时触发的)。
210623 2:00:19 [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.2.34-MariaDB-log
key_buffer_size=67108864
read_buffer_size=1048576
max_used_connections=139
max_threads=752
thread_count=72
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1621655 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f4c008501e8
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 = 0x7f4c458a7d30 thread_stack 0x49000
2021-06-23 2:04:20 139966788486912 [Warning] InnoDB: A long semaphore wait:
--Thread 139966780094208 has waited at btr0sea.cc line 1145 for 241.00 seconds the semaphore:
S-lock on RW-latch at 0x55e1838d5ab0 created in file btr0sea.cc line 191
a writer (thread id 139966610978560) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file btr0sea.cc line 1145
Last time write locked in file btr0sea.cc line 1218
我们甚至无法使用通用停止命令 ( service MariaDB stop) 停止 MariaDB 服务。但是我们能够强行终止 MariaDB 进程,然后我们可以让 MariaDB 服务重新上线。
此失败的原因可能是什么。如果您已经遇到过类似的问题,请分享您的经验,以及您采取了哪些措施来防止此类故障(将来)。非常感谢您的反馈。
我们的环境详情如下
操作系统:Red Hat Enterprise Linux 7 Mariadb 版本:10.2.34-MariaDB-log MariaDB Server
【问题讨论】:
标签: mariadb mariadb-10.2