UTC - mysqld got signal 6

昨天上午mysql又碰到一个奇怪的问题。数据库异常终止。重启成功后过就马上崩溃,不能正常运行。

查看mysql错误日志如下:

InnoDB: Doing recovery: scanned up to log sequence number 1924612226346
121103 21:29:24  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
121103 21:29:42  InnoDB: Waiting for the background threads to start
121103 21:29:43 InnoDB: 1.1.8 started; log sequence number 1924612226346
121103 21:29:43 [Note] Event Scheduler: Loaded 0 events
121103 21:29:43 [Note] /usr/sbin/mysqld: ready for connections.
Version: ‘5.5.21-log‘  socket: ‘/var/run/mysqld/mysqld.sock‘  port: 3306  Source distribution
121103 21:29:44  InnoDB: Assertion failure in thread 140444553848592 in file trx0purge.c line 829
InnoDB: Failing assertion: purge_sys->purge_trx_no <= purge_sys->rseg->last_trx_no
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
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: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
13:29:44 UTC - 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.
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.

key_buffer_size=8388608
read_buffer_size=8388608
max_used_connections=10
max_threads=100
thread_count=10
connection_count=10
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1238130 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 = 0 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x76d27e]

一直都运行正常,今天才出现问题了,所以判断内存方面的配置是没有错误的!网上查询到一片文章:http://www.2cto.com/database/201204/125762.html,跟我的情况很相似。

1、在/etc/my.cnf中写入
[mysqld]
innodb_force_recovery = 4
但是仍然无法启动。
改为:innodb_force_recovery = 6
数据库可以读出来,在6的情况下,是无法修改数据库的,也无法插入,只能导出。

2、导出数据 mysqldump -uroot -p123456 -R gamedb > /data/backup/gamedb.sql

3、删除数据库gamedb或者移到备份目录下面,然后一定要重新初始化数据库,否则数据恢复了错误日志里也会提示表空间没有日志文件,数据库也会不断重启。

4、启动mysql服务,导入数据
mysql> create database gamedb default character set utf8;
mysql> user gamedb
mysql> source /data/backup/gamedb.sql

5、程序和数据库运行正常。

严重怀疑5.5.21版本有bug,我已经碰到两次了,一次wait IO高(http://blog.csdn.net/thomas0yang/article/details/8099515),这次又不能正常启动。

请问谁有类似经历,或者帮我解惑呢?

不行降低版本了。。。

时间: 2024-12-14 11:50:41

UTC - mysqld got signal 6的相关文章

MySQL案例-mysqld got signal 11

背景:MySQL-5.7.12, debian 8核16G虚拟机, 业务方反馈在某一个时间点, 出现了大量的数据库报错, 之后恢复正常; 场景:开发查看日志后, 发现在某个时间点, 应用断开了所有与数据库的连接, 几秒钟以后就恢复了;同时监控系统的内存使用率出现了异常的骤降; 3min之后收到了报警系统的信息, 内存使用率82%; 分析:第一时间的判断是网络的问题造成了应用层的连接断开了, 但是这种内存使用率骤降的现象不会是网络造成的;查看MySQL的日志, 发现MySQL实例发生了crash,

从库crash一直自动重启(mysqld got signal 11)问题解决

一:问题描述 今天收到邮件报警,遂进数据库查看slave状态,发现io进程和sql进程都为NO. mysql> show slave status \G; *************************** 1. row*************************** Slave_IO_State: Master_Host: 此处不予显示,哈哈 Master_User: replica Master_Port: 3306 Connect_Retry: 60 Master_Log_Fil

[ERROR] mysqld got signal 6 错误

mariadb 数据库的问题情景:是在系统盘不够用的时候,将mariadb 的datadir=/var/lib/mysql 改为了 /alidata/mysql 将/var/lib/mysql 里边的东西复制到了 /alidata/mysql 下边.但是复制的时候没有关闭数据库,将/var/lib/mysql 里边的文件删除了,是所以在restart mariadb的时候起不来,查看mariadb日志tail -f /var/log/mariadb/mariadb.log 报错如下:[ERROR

mysqld诡异crash

突然收到告警短信,提示有一组服务器MHA已经切换,登录服务器后查看错误日志如下(其中相关insert语句已经处理): mysql版本:5.5.24 151221 16:54:26 InnoDB: Assertion failure in thread 139867452008192 in file ha_innodb.cc line 1476 InnoDB: Failing assertion: current <= max_value InnoDB: We intentionally gene

MySQL意外断电,InnoDB数据库恢复

客户数据库在运行中突然断电,当服务器重启发现MySQL无法启动,查看日志,报错如下: 151105 11:24:52 mysqld_safe Starting mysqld daemon with databases from /data/mysql/datafile 151105 11:24:52 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated

the server quit without updating pid mysql报这个错误,你知道是怎么回事不?

休息之时,开发一台测试机说mysql启动不了,报以上错误,和往常一样,网上的文章并没有卵用,于是自己看日志,解决方法如下: Hash 2017/1/7 11:04:50 我刚起床啊 李飞平 2017/1/7 11:05:11 194的mysql报错,不急 Hash 2017/1/7 11:05:21 你看下free  -m 李飞平 2017/1/7 11:05:32 没问题,还有9个G Hash 2017/1/7 11:06:03 关了进程重启下mysql11:07:01李飞平 2017/1/7

mysql 5.6.34 突然宕机,启动不了,提示[ERROR] InnoDB: Space id in fsp header

一.问题描述 一台线上的从服务器,半夜收到报警短信提示异常,连接到该服务器,发现mysqld进程不在了,ps 查看,也没有查到.于是重启,但是重启失败,提示without pid file 于是查看errorlog,内容如下: 2017-09-22 03:37:42 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2017-09-

MySQL5.7 服务 crash 后无法启动

事发背景 测试环境更换数据盘,直接采取在线将数据目录暴力拷贝到新盘,然后将原服务关闭,启用新盘. 服务是可以正常启动的,但是没多会开发就反应服务down了,错误日志输出 2017-05-17 15:06:28 0x7ffdadff7700 InnoDB: Assertion failure in thread 140727522653952 in file trx0purge.cc line 167 InnoDB: Failing assertion: purge_sys->iter.trx_n

mysql启动后随即关闭问题解决(ibdata1文件损坏导致)

机房一台服务器上的mysql运行一段时间了,突然出现了一个很奇怪的现象:重启后无法恢复了!准确情况是:启动mysql后随即就又关闭了. 查看mysql错误日志如下: 160920 22:41:41 mysqld_safe Starting mysqld daemon with databases from /home/MysqlData/2016-09-20 22:41:41 0 [Note] /Data/app/mysql5.6.25/bin/mysqld (mysqld 5.6.25-log