我的本地 MySQL 服务器因未知原因暂时瘫痪

我的本地 MySQL 服务器因未知原因暂时瘫痪

我的本地 MySQL 服务器 5.5.38(在 CentOS 6.5 上)暂时关闭,并且 mysql 日志文件充满了这种详细信息:

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=131072
max_used_connections=44
max_threads=151
thread_count=15
connection_count=15
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338508 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x35accd0
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 = 7f2514201d98 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x2e)[0x78b76e]
/usr/libexec/mysqld(handle_fatal_signal+0x493)[0x674483]
/lib64/libpthread.so.0[0x356b40f710]
/lib64/libc.so.6(gsignal+0x35)[0x356b032925]
/lib64/libc.so.6(abort+0x175)[0x356b034105]
/usr/libexec/mysqld[0x833550]
/usr/libexec/mysqld[0x833759]
/usr/libexec/mysqld[0x838537]
/usr/libexec/mysqld[0x816922]
/usr/libexec/mysqld[0x81720a]
/usr/libexec/mysqld[0x80c1d5]
/usr/libexec/mysqld[0x7ea934]
/usr/libexec/mysqld[0x7eaa76]
/usr/libexec/mysqld[0x81ff3b]
/usr/libexec/mysqld[0x82583e]
/usr/libexec/mysqld[0x7a01ae]
/usr/libexec/mysqld(_ZN7handler7ha_openEP5TABLEPKcii+0x3d)[0x676a9d]
/usr/libexec/mysqld(_Z21open_table_from_shareP3THDP11TABLE_SHAREPKcjjjP5TABLEb+0x537)[0x5f6837]
/usr/libexec/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootP18Open_table_context+0xc43)   [0x5519e3]
/usr/libexec/mysqld(_Z21open_table_from_shareP3THDP11TABLE_SHAREPKcjjjP5TABLEb+0x537)[0x5f6837]
/usr/libexec/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootP18Open_table_context+0xc43)  [0x5519e3]
/usr/libexec/mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjjP19Prelocking_strategy+0x3ea)[0x5525da]
/usr/libexec/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTj+0x4b)[0x552efb]
/usr/libexec/mysqld[0x5c5fb7]
/usr/libexec/mysqld(_Z14get_all_tablesP3THDP10TABLE_LISTP4Item+0x6e7)[0x5d0987]
/usr/libexec/mysqld(_Z24get_schema_tables_resultP4JOIN23enum_schema_table_state+0x22e)[0x5c141e]
/usr/libexec/mysqld(_ZN4JOIN4execEv+0x4f5)[0x5bc2a5]
/usr/libexec/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x162)[0x5bdff2]
/usr/libexec/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x17c)[0x5bea7c]
/usr/libexec/mysqld[0x57e3e7]
/usr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x206b)[0x583beb]
/usr/libexec/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1bb)[0x58634b]
/usr/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1c4d)[0x58874d]
/usr/libexec/mysqld(_Z24do_handle_one_connectionP3THD+0xd2)[0x619132]
/usr/libexec/mysqld(handle_one_connection+0x50)[0x619240]
/lib64/libpthread.so.0[0x356b4079d1]
/lib64/libc.so.6(clone+0x6d)[0x356b0e8b5d]

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

我通过清除 ib_logfile0 和 ib_logfile1 并递归地将 /var/lib/mysql 的所有者更改为 mysql:mysql 解决了该问题。有人能解释一下发生了什么吗?

答案1

有可能http://bugs.mysql.com/bug.php?id=32158,这是 open_table_from_share 的热门搜索

如果可以重现,也许你应该安装 mysql 的 debuginfo 包;可能使调用堆栈更清晰一些(尽管这假设 gdb 是创建堆栈跟踪的人,但我不认为是这样)

相关内容