我在Linux上有一个MySQL复制奴隶。 我正在做一个mysqldump来备份数据库。 我把它指向从服务器来传播负载。 我使用的mysqldump选项包括--flush-logs ,导致mysql服务器--flush-logs 。 它得到一个信号11(即段错误)。 当我没有--flush-logs ,一切正常。 为什么是这样?
更新 :这是/ var / log / syslog的相关部分(这是mysql错误消息在debian系统上的位置)
Jun 24 11:01:17 db2 mysqld[30673]: mysqld got signal 11; Jun 24 11:01:17 db2 mysqld[30673]: This could be because you hit a bug. It is also possible that this binary Jun 24 11:01:17 db2 mysqld[30673]: or one of the libraries it was linked against is corrupt, improperly built, Jun 24 11:01:17 db2 mysqld[30673]: or misconfigured. This error can also be caused by malfunctioning hardware. Jun 24 11:01:17 db2 mysqld[30673]: We will try our best to scrape up some info that will hopefully help diagnose Jun 24 11:01:17 db2 mysqld[30673]: the problem, but since we have already crashed, something is definitely wrong Jun 24 11:01:17 db2 mysqld[30673]: and this may fail. Jun 24 11:01:17 db2 mysqld[30673]: Jun 24 11:01:17 db2 mysqld[30673]: key_buffer_size=16777216 Jun 24 11:01:17 db2 mysqld[30673]: read_buffer_size=131072 Jun 24 11:01:17 db2 mysqld[30673]: max_used_connections=2 Jun 24 11:01:17 db2 mysqld[30673]: max_connections=100 Jun 24 11:01:17 db2 mysqld[30673]: threads_connected=1 Jun 24 11:01:17 db2 mysqld[30673]: It is possible that mysqld could use up to Jun 24 11:01:17 db2 mysqld[30673]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 233983 K Jun 24 11:01:17 db2 mysqld[30673]: bytes of memory Jun 24 11:01:17 db2 mysqld[30673]: Hope that's ok; if not, decrease some variables in the equation. Jun 24 11:01:17 db2 mysqld[30673]: Jun 24 11:01:17 db2 mysqld_safe[31409]: Number of processes running now: 0 Jun 24 11:01:17 db2 mysqld_safe[31411]: restarted
考虑到内存的数量是200MB左右,我猜你还没有用完内存。 您可以检查dmesg,看看机器是否内存不足。
如果其他进程死于类似的问题,或者出现总线错误,则可能是内存错误。 你可以使用memtest86来检查。
否则,我会说你已经在mysql中发现了一个错误。 您可以尝试升级到最新版本的MySQL,或者如果您是最新版本,请降级并查看是否遇到同样的问题。 如果你这样做,那么我会build议用MySQL提交一个bug。
哪个版本的mysql?
你在my.cnf文件中是否启用了“expire-log-days”或“log-bin”选项?
使用–flush-log选项有一些已知错误,导致日志旋转,转储等崩溃。