GCJ built multithreaded program keeps creating zombies

Wolfgang Bangerth bangerth@ticam.utexas.edu
Wed Dec 18 15:45:00 GMT 2002


> Wolfgang> When a process (and thus, here, also a thread) ends, it
> Wolfgang> remains a zombie until its return valued is reaped by a
> Wolfgang> waitpid call, which should also be what pthread_join
> Wolfgang> does. So unless a thread is joined, it will remain a zombie.
> 
> Is this one of those places where Linux threads don't follow posix?

I don't know what exactly the standard prescribes, but for all practical 
matters things are more or less the same. It's just the way Linux 
implements it -- as full featured processes that happen to have the same 
address space than another process -- that is different from other 
operating systems which do make a difference between a process and a 
thread.


> We create detached threads.  My understanding is that such threads
> *can't* be passed as an argument to pthread_join.

But in his code there is a Thread.join(), so if this does something it 
probably calls waitpid(), no?

W.

-------------------------------------------------------------------------
Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth




More information about the Gcc-bugs mailing list