I have a test application in c++ starting several threads in its main() and then sleeping in main() forever.
One of the threads is doing something that causes a segfault and a coredump is generated (ulimit -c unlimited was set previously).
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 question is how is it possible the rest of the threads to be missing and what could cause it?
The backtrace of this lonely thread seems ok, no strange stuff in it.
The OS is Red Hat Enterprise 5.3, gdb-6.8.
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.el5http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/5.4_Technical_Notes/index.html
https://bugzilla.redhat.com/show_bug.cgi?id=505322