多线程应用程序的核心转储只显示一个线程 [英] Core dump of multithreaded application shows only one thread

查看:126
本文介绍了多线程应用程序的核心转储只显示一个线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在c ++中有一个测试应用程序,在它的 main()中启动多个线程,然后睡在 main()永远。

I have a test application in c++ starting several threads in its main() and then sleeping in main() forever.

其中一个线程正在做一些导致段错误的事情,并生成一个coredump(之前设置了ulimit -c unlimited)。

One of the threads is doing something that causes a segfault and a coredump is generated (ulimit -c unlimited was set previously).

我用 gdb 打开核心,用查看线程apply all bt info threads ,我只有一个线程(从 main())开始,这是不可能的,因为至少 main()线程也应该运行。

I'm opening the core with gdb and see with thread apply all bt or info threads that I have only one thread (started in main()), which is impossible because at least the main() thread should be running as well.

问题是,的线程是否会丢失以及可能导致它的原因?

这个孤独线程的回溯看起来不错,没有奇怪的东西。

The backtrace of this lonely thread seems ok, no strange stuff in it.

操作系统是Red Hat Enterprise 5.3,gdb-6.8。

The OS is Red Hat Enterprise 5.3, gdb-6.8.

推荐答案

成为默认红帽企业版5.3中的内核错误,后来在Red中修复Hat版本(5.4) - kernel-2.6.18-164.el5

It turned out to be kernel bug in default Red Hat Enterprise 5.3, fixed in later Red Hat version (5.4) - kernel-2.6.18-164.el5

http://docs.redhat.com/docs/en-US /Red_Hat_Enterprise_Linux/5/html-single/5.4_Technical_Notes/index.html

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/5.4_Technical_Notes/index.html


1.110.1。 RHSA-2009:1193:在32位系统上的重要安全性和错误修复更新,针对某些多线程应用程序的核心转储未包含所有线程信息。 (BZ#505322)

https://bugzilla.redhat.com/show_bug.cgi?id=505322

这篇关于多线程应用程序的核心转储只显示一个线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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