mysql 搭建主从 从库死掉

canxuegigi 2015-08-18 02:24:21
不开启start slave时,从库运行正常

start slave 后 从库在重放更改的时候,会自动死掉,可以肯定的是这个原因导致的,但具体不知道为什么

因为测试单独开启IO线程,从库也是正常的,而只要开启sql线程,重放的时候就可能死掉

错误日志如下:

150817 15:39:25 mysqld_safe Number of processes running now: 0
150817 15:39:25 mysqld_safe mysqld restarted
150817 15:39:25 InnoDB: The InnoDB memory heap is disabled
150817 15:39:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150817 15:39:25 InnoDB: Compressed tables use zlib 1.2.3
150817 15:39:25 InnoDB: Initializing buffer pool, size = 5.0G
150817 15:39:26 InnoDB: Completed initialization of buffer pool
150817 15:39:26 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
150817 15:39:26 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 107, file name ./mysql-bin.000366
150817 15:39:31 InnoDB: Waiting for the background threads to start
150817 15:39:32 InnoDB: 5.5.31 started; log sequence number 63807024682
150817 15:39:32 [Note] Recovering after a crash using mysql-bin
150817 15:39:32 [Note] Starting crash recovery...
150817 15:39:32 [Note] Crash recovery finished.
150817 15:39:32 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150817 15:39:32 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150817 15:39:32 [Note] Server socket created on IP: '0.0.0.0'.
150817 15:39:32 [Warning] 'user' entry 'root@iZ2399ayyz4Z' ignored in --skip-name-resolve mode.
150817 15:39:32 [Warning] 'proxies_priv' entry '@ root@iZ2399ayyz4Z' ignored in --skip-name-resolve mode.
150817 15:39:32 [Note] Event Scheduler: Loaded 0 events
150817 15:39:32 [Note] /data/mysql/bin/mysqld: ready for connections.
Version: '5.5.31-log' socket: '/data/mysql/data/mysql.sock' port: 3306 Source distribution
150817 15:39:32 [Note] Event Scheduler: scheduler thread started with id 1
150817 15:40:33 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.012473' at position 18861503, relay log './db-relay-bin.000002' position: 18861649
150817 15:40:33 [Note] 'SQL_SLAVE_SKIP_COUNTER=1' executed at relay_log_file='./db-relay-bin.000002', relay_log_pos='18861649', master_log_name='mysql-bin.012473', master_log_pos='18861503' and new position at relay_log_file='./db-relay-bin.000002', relay_log_pos='18862404', master_log_name='mysql-bin.012473', master_log_pos='18862258'
150817 15:40:33 [Note] Slave I/O thread: connected to master '用户名@主机:端口',replication started in log 'mysql-bin.012491' at position 573816968
07:45:26 UTC - 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.
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=5368709120
read_buffer_size=1048576
max_used_connections=2
max_threads=400
thread_count=3
connection_count=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 7295442 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f4590000990
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 = 7f485a7c5e58 thread_stack 0x40000
/data/mysql/bin/mysqld(my_print_stacktrace+0x2e)[0x75ca6e]
/data/mysql/bin/mysqld(handle_fatal_signal+0x41a)[0x65299a]
/lib64/libpthread.so.0[0x3c3d80f710]
/data/mysql/bin/mysqld(_ZNK9table_def15compatible_withEP3THDP14Relay_log_infoP5TABLEPS5_+0x47d)[0x5f0add]
/data/mysql/bin/mysqld(_ZN14Rows_log_event14do_apply_eventEPK14Relay_log_info+0x78d)[0x6e6e2d]
/data/mysql/bin/mysqld(_Z26apply_event_and_update_posP9Log_eventP3THDP14Relay_log_info+0x11d)[0x516a2d]
/data/mysql/bin/mysqld[0x51b148]
/data/mysql/bin/mysqld(handle_slave_sql+0x8f5)[0x51c475]
/lib64/libpthread.so.0[0x3c3d8079d1]
/lib64/libc.so.6(clone+0x6d)[0x3c3d4e88fd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 5
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

求指导,谢谢

...全文
958 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
rick-he 2015-08-19
  • 打赏
  • 举报
回复
你mysql是什么版本。搭建主从好像和版本有关系吧
canxuegigi 2015-08-18
  • 打赏
  • 举报
回复
引用 1 楼 zhu19774279 的回复:
不知道是不是这里,MySQL说自己遇到个bug
07:45:26 UTC - 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.
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.
这个我看过,不是
引用 1 楼 zhu19774279 的回复:
不知道是不是这里,MySQL说自己遇到个bug
07:45:26 UTC - 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.
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.
这个我有看,但应该不是根本原因 我同样的mysql版本,其他都是正常同步的 不知道有没有大神遇到过以前
zhu19774279 2015-08-18
  • 打赏
  • 举报
回复
不知道是不是这里,MySQL说自己遇到个bug
07:45:26 UTC - 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.
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.
内容概要:本文围绕不确定环境下的多式联运路径优化问题展开研究,提出并实现了基于AFO算法、遗传算法(GA)和粒子群优化算法(PSO)的三种智能优化方法,并借助Matlab平台完成算法编程与仿真。研究构建了考虑时间、成本、转运风险等多重不确定因素的路径优化模型,系统比较了AFO、GA、PSO三种算法在收敛速度、全局寻优能力和稳定性方面的表现,同时引入Matlab自带的全局优化搜索器作为基准对照,深入分析各算法在复杂物流网络中的适用边界与性能差异。研究表明,AFO算法在解决此类组合优化问题时展现出更快的收敛效率和更强的局部规避能力。; 适合人群:具备一定Matlab编程基础与运筹优化知识,从事物流工程、交通运输规划、智能算法开发等相关领域的研究生、科研人员及工程技术人员。; 使用场景及目标:①应用于多式联运、综合货运网络中的路径决策支持系统构建;②为不确定性条件下复杂路径规划问题提供智能算法选型依据与技术实现方案;③支持科研人员复现主流优化算法并开展横向性能对比实验,推动算法改进与实际落地。; 阅读建议:建议读者结合提供的Matlab代码逐模块分析算法实现流程,重点理解目标函数设计、约束条件处理及参数敏感性分析部分,可通过调整问题规模与算法参数进行对比实验,进一步拓展至动态路径规划或大规模网络优化等延伸场景。

57,064

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧