mysql backtrace_mysqldump死住(实际是导致mysqld crash)

在MySQL 5.0.16上,用mysqldump导出数据,mysqldump半天没反应。

操作系统是RHEL4.0。

看日志

*** glibc detected *** free(): invalid pointer: 0xb17d60b0 ***

mysqld got signal 6;

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=8388600

read_buffer_size=131072

max_used_connections=2

max_connections=100

threads_connected=2

It is possible that mysqld could use up to

key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K

bytes of memory

Hope that's ok; if not, decrease some variables in the equation.

thd=0x9d69ba0

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

Cannot determine thread, fp=0xb17d5a6c, backtrace may not be correct.

Stack range sanity check OK, backtrace follows:

0x815f652

0x9ed7c8

(nil)

0x81d40a

0x823b3f

0x823eba

0x819eb85

0x819f5bf

0x819f7f9

0x82314e9

0x8178872

0x817db98

0x817e59c

0x817f99c

0x9e7341

0x8896fe

New value of fp=(nil) failed sanity check, terminating stack trace!

Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved

stack trace is much more helpful in diagnosing the problem, so please do

resolve it

Trying to get some variables.

Some pointers may be invalid and cause the dump to abort...

thd->query at 0x9d7bb00 = show create table `T_SOD_BEHAVIORRECORD_VIEW`

thd->thread_id=7

The manual page at http://www.mysql.com/doc/en/Crashing.html contains

information that should help you find out what is causing the crash.

Number of processes running now: 0

070119 15:58:48 mysqld restarted

如果用视图的话,至少要用5.0.17以上版本了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
backtrace_symbols是一个在程序崩溃时打印堆栈信息的函数。下面给出backtrace_symbols的源码解释。 backtrace_symbols函数的声明如下: ``` char **backtrace_symbols(void *const *buffer, int size); ``` 该函数接受两个参数,buffer是一个指针数组,存储了函数调用栈的每个地址;size是buffer数组中的元素个数。 函数返回一个指向字符串数组的指针,每个字符串对应一个地址,包含了该地址所对应的符号信息。返回的指针数组的长度和size相同。 backtrace_symbols的源码实现比较复杂,具体的实现依赖于底层的操作系统和编译器。它的实现一般分为两个步骤: 1. 获取函数调用栈的地址信息。在现代操作系统中,有一种特殊的数据结构叫做栈帧(stack frame)来保存函数的调用信息。当程序崩溃时,可以通过解读栈帧来获取函数调用栈的地址信息。栈帧中包含了函数的返回地址,可以用来定位函数的起始地址。 2. 解析地址信息,获取符号信息。在C/C++编译生成的可执行文件中,编译器会在符号表中记录函数的地址和名称的对应关系。通过遍历调用栈中的地址,可以通过查找符号表来获取调用栈上每个地址所对应的函数名称。 具体的实现步骤和细节会因编译器和操作系统而有所不同。在Linux系统下,backtrace_symbols的实现会使用辅助函数dladdr来获取符号信息。 总的来说,backtrace_symbols是一个非常有用的函数,可以帮助程序员在程序崩溃时定位错误的位置。通过查看函数调用栈,可以了解到程序执行到错误位置之前经过的函数调用路径,有助于定位和修复代码中的bug。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值