Bug 104762

Summary: multi threaded core dump missing thread information
Product: [Retired] Red Hat Linux Reporter: Sergey Kosenko <skosenko>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: riel
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 15:41:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergey Kosenko 2003-09-20 17:52:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; 
Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

Description of problem:
Core dump of application compiled with pthread and intensionally crushed is 
missing all but one thread information.

Version-Release number of selected component (if applicable):
kernel-2.4.20-any

How reproducible:
Always

Steps to Reproduce:
1.ulimit -c unlimited
2.compile with gcc 3.2.3
3.run
4.open dumped core in gdb 5.3
5.enter "info thread" in gdb

Actual Results:  gdb shows one thread

Expected Results:  there should be at least two thread if it crashes in the 
thread code.


Source:

#include <pthread.h>

#define NUM_THREADS 2
#define SLEEP_TIME 1 

void *sleeping(void *); 

int
main(int argc, char *argv[])
{
   int i; 
   thread_t tid[NUM_THREADS]; 

   for ( i = 0; i < NUM_THREADS; i++ )
      pthread_create(&tid[i], NULL, sleeping, (void *)0);

   sleep(2); 

   for ( i = 0; i < NUM_THREADS; i++ )
      pthread_join(tid[i], NULL);
}


void *
sleeping(void *arg)
{
   int a, *b = 0;
   a = *b; // <<----- crash
   sleep(SLEEP_TIME);
}

Comment 1 Bugzilla owner 2004-09-30 15:41:32 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/