*** glibc检测到*** perl:双重免费或损坏(!prev):0x0c2b7138 *** [英] *** glibc detected *** perl: double free or corruption (!prev): 0x0c2b7138 ***

查看:173
本文介绍了*** glibc检测到*** perl:双重免费或损坏(!prev):0x0c2b7138 ***的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行perl程序时遇到以下错误

While running a perl program I encountered the following error


*** glibc detected *** perl: double free or corruption (!prev): 0x0c2b7138 ***
/lib/tls/i686/cmov/libc.so.6[0xb7daea85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7db24f0]
perl(Perl_pregfree+0x3e)[0x80a004e]
perl(perl_destruct+0xcf1)[0x806b711]
/usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d2dfb]
/usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d2f9b]
/usr/local/lib/perl/5.8.8/auto/threads/threads.so[0xb79d5fbb]
/lib/tls/i686/cmov/libpthread.so.0[0xb7e974fb]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0xb7e19e5e]

我的操作系统是Ubuntu 8.04,Perl版本是5.8.8

My OS is Ubuntu 8.04, Perl version is 5.8.8

我的脚本包含线程...我无法共享代码,但想知道是否有任何人有这种类型的错误的经验,以及您如何解决/接近/分析它。是否有任何工具/日志,我可以参考,以补充工作这种问题。

My scripts contains threads ... I cannot share the code but wanted to know if anyone has had experience with this type of errors and how you had resolved/approached/analysed it. Are there any tools/logs that i could refer to inaddition to work on this sort of issues.

感谢您的支持。

P.S:我知道线程不是任何人的理想朋友。但是我并不控制使用perl的决定。我只是维护代码。

P.S: I know that threads are not the ideal friends for anyone. However I do not control decision of using perl. I am just maintaining the code.

推荐答案

打开你的代码,把它放在某个地方之前,发生问题:

open your code and put in it somewhere before where the problem occurs:

$DB::single=1;

然后运行

PERL5OPT='-dt'  perl yourscript.pl 

并点击

c[enter]

重复直到问题再次出现。 (记住在失败之前是否停止在手动断点)。

repeatedly until the problem recurs. ( Keeping note of whether it stops at your manual breakpoint or not before failing ).

然后反复移动手动断点向前/向后,直到你有只是在你的终止点之前(你可以找到一堆打印命令的死亡点),然后尝试从那里工作,可能与预碰撞内省。

Then iteratively move the manual breakpoint forward/back until you have it just before your termination point ( you could find the death point with a bunch of print commands also ), and then try work from there, possibly with pre-crash introspection.

这将(希望)帮助您生成出现问题的测试用例。

This will (hopefully) help you generate a test-case which exhibits the problem.

这篇关于*** glibc检测到*** perl:双重免费或损坏(!prev):0x0c2b7138 ***的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆