首页 > 解决方案 > MariaDB 服务无法启动并出现 InnoDB Space id 错误

问题描述

我一直在 Raspberry Pi 4(Raspbian 10 / buster)上运行 MariaDB,作为我的 Webtrees 和 Owncloud 站点的数据库服务器。最近,我注意到服务器看起来不正确,重新启动后,我可以看到 MariaDB 服务无法启动。

/var/log/mysql/error.log 的内容:

2021-03-26 14:45:06 0 [Note] InnoDB: Using Linux native AIO
2021-03-26 14:45:06 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-03-26 14:45:06 0 [Note] InnoDB: Uses event mutexes
2021-03-26 14:45:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-26 14:45:06 0 [Note] InnoDB: Number of pools: 1
2021-03-26 14:45:06 0 [Note] InnoDB: Using generic crc32 instructions
2021-03-26 14:45:06 0 [Note] InnoDB: Disabling background log and ibuf IO write threads.
2021-03-26 14:45:06 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-03-26 14:45:06 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-26 14:45:06 0 [Note] InnoDB: innodb_force_recovery=6 skips redo log apply
2021-03-26 14:45:06 0 [ERROR] InnoDB: Space id and page no stored in the page, read in are [page id: space=0, page number=399], should be [page id: space=0, page number=394]
210326 14:45:06 [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=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466214 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
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        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             12860                12860                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       12860                12860                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

这是尝试从终端启动的终端输出:

$ sudo systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

谷歌搜索并没有出现太多,虽然我试过了

innodb_force_recovery = 1
innodb_purge_threads=0

在 /etc/my.cnf 中,它似乎没有改变任何东西。

在我尝试从备份恢复之前有什么想法吗?

标签: mysqlmariadbinnodb

解决方案


推荐阅读