Why does this program cause an NPE in LibgcjInternalFinalizerThread ??

Jeff Sturm jsturm@one-point.com
Wed Aug 20 19:48:00 GMT 2003


On Wed, 20 Aug 2003, David Daney wrote:
> It seems that it is possible for a thread to be inside of
> natReference.cc holding the Reference's lock when the garbage collector
> stops the thread.  If this were to happen, the garbage collector would
> block forever waiting to obtain the lock when it entered.
>
> Is this possible?

It shouldn't be possible.  You're confusing stop-world GC with
finalization; they occur separately.  Finalization is always done
asynchronously in a thread dedicated to it.

Jeff



More information about the Java mailing list