Bug#220832: libc6: joined pthreads are not reaped
Package: libc6
Version: 2.3.2.ds1-10
Severity: normal
Minimal test program to demonstrate problem:
#include <stdio.h>
#include <pthread.h>
#define NTHREADS 30
void * thread(void * arg)
{
return NULL;
}
int main()
{
int i;
pthread_t threadid;
for (i=0; i<NTHREADS ; i++) {
pthread_create(&threadid, NULL, &thread, NULL);
pthread_join(threadid, NULL);
}
printf("Press RETURN: ");
while (getchar() != '\n');
return(0);
}
When it prompts for keyboard input, notice how many "defunct" pids
there are.
Expected behaviour appears to happen under libc6 2.3.2-7, and when
running under kernel 2.6.0test9 (the .deb in sid) with or without
LD_ASSUME_KERNEL=2.4.0. It doesn't appear to matter whether I have
libc6-i686 installed.
(I'm not ruling out that it might be a bug in kernel 2.4.22)
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux manlap 2.4.22-1-686 #6 Sat Oct 4 14:09:08 EST 2003 i686
Locale: LANG=en_GB, LC_CTYPE=en_GB
Versions of packages libc6 depends on:
ii libdb1-compat 2.1.3-7 The Berkeley database routines [gl
-- no debconf information
--
Paul Martin <pm@debian.org>
Reply to: