MySQL Query Cache 導致的崩潰?

最近遇到了幾次MySQL服務崩潰重啓。昨天就連續遇到兩次。

 

第一次的err日誌:

  1. 81122 16:16:47 - mysqld got signal 11 ;
  2. This could be because you hit a bug. It is also possible that this binary
  3. or one of the libraries it was linked against is corrupt, improperly built,
  4. or misconfigured. This error can also be caused by malfunctioning hardware.
  5. We will try our best to scrape up some info that will hopefully help diagnose
  6. the problem, but since we have already crashed, something is definitely wrong
  7. and this may fail.
  8. key_buffer_size=536870912
  9. read_buffer_size=4194304
  10. max_used_connections=727
  11. max_threads=1500
  12. threads_connected=412
  13. It is possible that mysqld could use up to
  14. key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 12827463 K
  15. bytes of memory
  16. Hope that's ok; if not, decrease some variables in the equation.
  17. thd: 0x2aad06f7a860
  18. Attempting backtrace. You can use the following information to find out
  19. where mysqld died. If you see no messages after this, something went
  20. terribly wrong...
  21. stack_bottom = 0x47118f60 thread_stack 0x40000
  22. Trying to get some variables.
  23. Some pointers may be invalid and cause the dump to abort...
  24. thd->query at 0x125b5ae0 = SELECT `tba`.af
  25. FROM `tba`
  26. WHERE `tba`.uid = '2212211'
  27.  LIMIT 1
  28. thd->thread_id=1676832
  29. thd->killed=NOT_KILLED
  30. The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
  31. information that should help you find out what is causing the crash.
  32. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  33. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  34. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  35. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  36. Fatal signal 6 while backtracing
  37. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  38. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  39. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  40. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  41. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  42. mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.
  43. 081122 16:16:49 mysqld_safe Number of processes running now: 0
  44. 081122 16:16:49 mysqld_safe mysqld restarted

不久是第二次:

  1. 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.

  2. key_buffer_size=536870912
  3. read_buffer_size=4194304
  4. max_used_connections=1
  5. max_threads=1500
  6. threads_connected=1
  7. It is possible that mysqld could use up to
  8. key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 12827463 K
  9. bytes of memory
  10. Hope that's ok; if not, decrease some variables in the equation.
  11. thd: 0x259d70b0
  12. Attempting backtrace. You can use the following information to find out
  13. where mysqld died. If you see no messages after this, something went
  14. terribly wrong...
  15. stack_bottom = 0x45f60f60 thread_stack 0x40000
  16. Trying to get some variables.
  17. Some pointers may be invalid and cause the dump to abort...
  18. thd->query at 0x25a2c8e0 = SELECT `xxxxxxx`.dd
  19. FROM `xxxxxxx`
  20. WHERE `xxxxxxx`.ffddddddd
  21.  LIMIT 1
  22. thd->thread_id=1
  23. thd->killed=NOT_KILLED
  24. The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
  25. information that should help you find out what is causing the crash.
  26. 081122 17:56:13 mysqld_safe Number of processes running now: 0
  27. 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禁用掉了。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章