This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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 crashes if a user-thread gives up its rights


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


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