gcj crashes if a user-thread gives up its rights
Bryce McKinlay
mckinlay@redhat.com
Mon Dec 13 17:18:00 GMT 2004
Jost Boekemeier wrote:
>That aside, the garbage collector may currently run
>> in any thread that allocates from the Java heap.
>>>>That makes sense. An old version of the IBM JDK
>(1.4.1) has had the same problem. Since 1.4.2_02 and
>the recent Sun JDK's this problem doesn't appear
>anymore.
>>It would be interesting to know how these other VMs solved the issue.
Perhaps they only run the GC from one thread, which always has the
appropriate privileges?
>Since gcj already catches the error, it should be easy
>to use a different IPC mechanism when pthread_kill
>fails, I guess a patch would consist of no more than a
>few lines. I check this, if I have some time.
>>Is there is another IPC mechanism with the necessary semantics - ie able
to suspend any thread at any time, asynchronously? Also, note that there
are at least 2 other places in libgcj, besides GC, where signals are
used for IPC: java.lang.Process and Thread.interrupt().
Regards
Bryce
More information about the Java
mailing list