This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCJ built multithreaded program keeps creating zombies
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: gcc-bugs at gcc dot gnu dot org, <tromey at gcc dot gnu dot org>, <aeby at graeff dot com>, <gcc-gnats at gcc dot gnu dot org>
- Date: Wed, 18 Dec 2002 17:22:45 -0600 (CST)
- Subject: Re: GCJ built multithreaded program keeps creating zombies
> This is most likely a problem with glibc or the kernel.
> Offhand I don't see how libgcj could cause this problem.
> We pretty much leave low-level thread stuff up to the
> underlying platform.
It can be called a feature: On Linux threads are created basically by
calling fork/clone. When a process (and thus, here, also a thread) ends,
it remains a zombie until its return valued is reaped by a waitpid call,
which should also be what pthread_join does. So unless a thread is joined,
it will remain a zombie.
I don't have gcj installed locally, so have no way to find out what
Thread::join actually does, and whether it is called in your program (or
if an exception intercepts it), but I bet that is where the problem is.
Regards
Wolfgang
PS: And yes, I've tripped over this problem before as well ;-)
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth