最近遇到了几次MySQL服务崩溃重启。昨天就连续遇到两次。
第一次的err日志:
- 81122 16:16:47 - 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=536870912
- read_buffer_size=4194304
- max_used_connections=727
- max_threads=1500
- threads_connected=412
- It is possible that mysqld could use up to
- key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 12827463 K
- bytes of memory
- Hope that's ok; if not, decrease some variables in the equation.
- thd: 0x2aad06f7a860
- 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 = 0x47118f60 thread_stack 0x40000
- Trying to get some variables.
- Some pointers may be invalid and cause the dump to abort...
- thd->query at 0x125b5ae0 = SELECT `tba`.af
- FROM `tba`
- WHERE `tba`.uid = '2212211'
- LIMIT 1
- thd->thread_id=1676832
- thd->killed=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.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- Fatal signal 6 while backtracing
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
- 081122 16:16:49 mysqld_safe Number of processes running now: 0
- 081122 16:16:49 mysqld_safe mysqld restarted
不久是第二次:
- 081122 17:56:13 - 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=536870912
- read_buffer_size=4194304
- max_used_connections=1
- max_threads=1500
- threads_connected=1
- It is possible that mysqld could use up to
- key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 12827463 K
- bytes of memory
- Hope that's ok; if not, decrease some variables in the equation.
- thd: 0x259d70b0
- 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 = 0x45f60f60 thread_stack 0x40000
- Trying to get some variables.
- Some pointers may be invalid and cause the dump to abort...
- thd->query at 0x25a2c8e0 = SELECT `xxxxxxx`.dd
- FROM `xxxxxxx`
- WHERE `xxxxxxx`.ff= ddddddd
- LIMIT 1
- thd->thread_id=1
- thd->killed=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.
- 081122 17:56:13 mysqld_safe Number of processes running now: 0
- 081122 17:56:13 mysqld_safe mysqld restarted
系统是两颗AMD 64位CPU,16G内存,MySQL版本是5.1.28
mysql文件的信息是
/usr/local/mysql/bin/mysql: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, for GNU/Linux 2.6.9, not stripped
在MySQL Bug 库里查到一个类似的问题
Bug #30201 crash with query cache when killing a select
很像,不过这个BUG在之前的好几个版本就已经解决了。
没办法,只好先把query cache禁用掉了。