Your message dated Tue, 28 Jan 2003 21:18:26 -0700 with message-id <[EMAIL PROTECTED]> and subject line Bug#174521: libc6: threads on ppc leave zombies when they terminate has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 28 Dec 2002 04:53:51 +0000 >From [EMAIL PROTECTED] Fri Dec 27 22:53:37 2002 Return-path: <[EMAIL PROTECTED]> Received: from bluebird.umnh.utah.edu [128.110.147.20] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18S8yc-0002uY-00; Fri, 27 Dec 2002 22:53:34 -0600 Received: from bluebird.umnh.utah.edu (localhost [127.0.0.1]) by bluebird.umnh.utah.edu (8.12.3/8.12.3/Debian -4) with ESMTP id gBS4rXLu014283 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for <[EMAIL PROTECTED]>; Fri, 27 Dec 2002 21:53:33 -0700 Received: (from waoki@localhost) by bluebird.umnh.utah.edu (8.12.3/8.12.3/Debian -4) id gBS4rWLw014281 for [EMAIL PROTECTED]; Fri, 27 Dec 2002 21:53:32 -0700 From: Will Aoki <[EMAIL PROTECTED]> Date: Fri, 27 Dec 2002 21:53:32 -0700 To: [EMAIL PROTECTED] Subject: libc6: threads on ppc leave zombies when they terminate Message-ID: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=-7.2 required=5.0 tests=SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MUTT version=2.41 X-Spam-Level: Package: libc6 Version: 2.2.5-11.2 Severity: important On powerpc, when threads terminate, they leave behind zombies. This renders maradns and other programs that have "safety brakes" to keep them from spawning too many threads unusable, limits the number of threads that any process can create during its lifetime (even if it never has more than a few at any one time), and can lead to a denial of service when a long-running threaded process hits the process limit. I've observed this in mozilla, maradns, and xmms, always on powerpc and never on other architectures (that I have access to). I'm not aware of any pthreaded programs that don't do this, so I've concluded that it's likely to be a libc bug, not a programming error in the various programs. Ways to reproduce: 1 - sample code below 2 - run mozilla, open some new windows, then close them again 3 - run xmms, play a file, hit stop 4 - launch maradns, perform some recursive queries Here is some example code. On i386 and sparc, it dosen't cause zombies, but on ppc, it generates zombies. (I'm not confident that my sample code is completely correct, as I'm not familiar with pthreads, but it does demonstrate the same problem I've seen in other programs.) --- cut --- #include <pthread.h> #include <errno.h> #define HOW_MANY_THREADS 10 void threadguts(void *d) { int i; printf("Thread %i spawned.\n", (int *) d); for (i = 0; i < 3; i++) { printf("Thread %i doing stuff.\n", (int *) d); } pthread_exit(0); } /* Make a few threads that do stuff, then die. */ int main() { pthread_t thread[HOW_MANY_THREADS]; pthread_attr_t attr; void * s; int i; int e; pthread_attr_init(&attr); for (i = 0; i < HOW_MANY_THREADS; i++) { printf("Spawning thread %i\n", i); if (e = pthread_create(&thread[i], &attr, (void *) threadguts, (void *) i)) { //perror("pthread_create:"); printf("pthread_create: %s\n", strerror(e)); } } /* Make sure they're dead. */ for (i = 0; i < HOW_MANY_THREADS; i++) { printf("Waiting to join thread %i\n", i); if (pthread_join(thread[i], NULL)) { printf("Can't join thread %i\n", i); } else { printf("Joined thread %i\n", i); } } pthread_attr_destroy(&attr); /* This won't work if too many threads were created - it will be unable to fork */ system("/bin/ps | grep defunct"); return 0; } --- cut --- -- System Information Debian Release: 3.0 Architecture: powerpc Kernel: Linux badkey.waoki.org 2.4.19-ben0 #1 Mon Aug 5 19:11:44 MDT 2002 ppc Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 -- William Aoki [EMAIL PROTECTED] /"\ ASCII Ribbon Campaign B1FB C169 C7A6 238B 280B <- key change \ / No HTML in mail or news! 99AF A093 29AE 0AE1 9734 prev. expired X / \ --------------------------------------- Received: (at 174521-done) by bugs.debian.org; 29 Jan 2003 04:18:28 +0000 >From [EMAIL PROTECTED] Tue Jan 28 22:18:28 2003 Return-path: <[EMAIL PROTECTED]> Received: from bluebird.umnh.utah.edu [128.110.147.20] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18djgC-0003VX-00; Tue, 28 Jan 2003 22:18:28 -0600 Received: from bluebird.umnh.utah.edu (localhost [127.0.0.1]) by bluebird.umnh.utah.edu (8.12.3/8.12.3/Debian -4) with ESMTP id h0T4IRLu004883 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL); Tue, 28 Jan 2003 21:18:27 -0700 Received: (from waoki@localhost) by bluebird.umnh.utah.edu (8.12.3/8.12.3/Debian -4) id h0T4IQtQ004881; Tue, 28 Jan 2003 21:18:26 -0700 From: Will Aoki <[EMAIL PROTECTED]> Date: Tue, 28 Jan 2003 21:18:26 -0700 To: Daniel Jacobowitz <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: Bug#174521: libc6: threads on ppc leave zombies when they terminate Message-ID: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <[EMAIL PROTECTED]> User-Agent: Mutt/1.3.28i Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=-16.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MUTT version=2.41 X-Spam-Level: On Sat, Dec 28, 2002 at 12:35:52AM -0500, Daniel Jacobowitz wrote: > On Fri, Dec 27, 2002 at 09:53:32PM -0700, Will Aoki wrote: > > Package: libc6 > > Version: 2.2.5-11.2 > > Severity: important > > > > On powerpc, when threads terminate, they leave behind zombies. This > > renders maradns and other programs that have "safety brakes" to keep > > them from spawning too many threads unusable, limits the number of > > threads that any process can create during its lifetime (even if it > > never has more than a few at any one time), and can lead to a denial of > > service when a long-running threaded process hits the process limit. > > > > I've observed this in mozilla, maradns, and xmms, always on powerpc and > > never on other architectures (that I have access to). I'm not aware of > > any pthreaded programs that don't do this, so I've concluded that it's > > likely to be a libc bug, not a programming error in the various > > programs. > > > > Ways to reproduce: > > 1 - sample code below > > 2 - run mozilla, open some new windows, then close them again > > 3 - run xmms, play a file, hit stop > > 4 - launch maradns, perform some recursive queries > > > > Here is some example code. On i386 and sparc, it dosen't cause zombies, > > but on ppc, it generates zombies. (I'm not confident that my sample code > > is completely correct, as I'm not familiar with pthreads, but it does > > demonstrate the same problem I've seen in other programs.) > > Not on my PPC. This seems more likely to be a bug in the benh kernel > you're running; I've never seen it, on glibc 2.2.5 or 2.3.1 on PPC. I've finally been able to do more experimentation on the machine I was having problems on, as well as another machine I rescued from the scrap heap. It does indeed seem to be kernel-related - it didn't appear (within 30min of boot) on any of the stock Debian kernels I tried on the scrap machine. It went away for a while on 2.4.20-ben1, but it reappeared after a day or so of uptime. I'm going to follow up with other people who have reported seeing this to see if I can track down where and why this happens. I'm therefore closing the bug I opened. (If I'm able to trigger it on a kernel built from Debian-supplied sources, I'll reopen it and reassign it to kernel.) -- William Aoki [EMAIL PROTECTED] /"\ ASCII Ribbon Campaign B1FB C169 C7A6 238B 280B <- key change \ / No HTML in mail or news! 99AF A093 29AE 0AE1 9734 prev. expired X / \ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]