*** 检测到 glibc *** Perl:双重释放或损坏 (!prev):0x0c2b7138 ***
在运行 perl 程序时,我遇到以下错误
*** 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
我的脚本包含线程...我无法共享代码,但想知道是否有人有过此类错误的经验以及如何解决你已经解决/接近/分析了它。 除了解决此类问题之外,还有什么工具/日志可供我参考吗?
感谢您的支持。
PS:我知道线程并不是任何人的理想朋友。 然而我不控制使用 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]
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.
Thank you for your support.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
打开代码并将其放入问题发生之前的某处:
然后运行
并
重复点击,直到问题再次出现。 (记下它是否在失败之前停止在手动断点处)。
然后迭代地向前/向后移动手动断点,直到它位于终止点之前(您也可以使用一堆打印命令找到死亡点),然后尝试从那里开始工作,可能使用碰撞前的内省。
这将(希望)帮助您生成一个显示问题的测试用例。
open your code and put in it somewhere before where the problem occurs:
Then run
and hit
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.
此线程 关于 perl5 移植者邮件列表似乎表明这是 5.8.8 和线程的一个已知问题。 我认为您的问题可能是由于 perl 未捕获的代码问题造成的。
如果可以的话,我建议将代码精简为最小的示例。 然后您应该能够尝试修复代码问题。
This thread on the perl5 porters mailing list seems to indicate that it's a known problem with 5.8.8 and threads. I think your problem is probably due to a code problem that isn't caught by perl.
If you can, I would suggest stripping down the code to a minimal example. You should then be able to attempt to fix the code problem.
最可能的原因是 glibc 版本不兼容。 您需要使用编译 Perl 的 glibc 版本来运行 Perl
The most likely cause is an incompatible version of glibc. You need to run Perl with the version of glibc with which it was compiled
这看起来像是 Perl 内部的错误。 “双重释放或损坏”是指内存被释放两次或损坏。 Perl 为您管理内存,因此如果 Perl 正常工作,这种情况就不会发生。
是否有可以升级到的较新版本的 Perl?
This looks like an error internal to Perl. The "double free or corruption" refers to memory being freed twice, or corrupted. Perl manages memory for you, so this should never happen if Perl is working correctly.
Is there a newer version of Perl you can upgrade to?
尝试从 CPAN 更新“threads”和“threads::shared”模块。
Try updating 'threads' and 'threads::shared' modules from CPAN.