This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]