On 06/05/2013 09:02, Thomas Schatzl wrote:
:

Alan also mentioned something about instrumentation that can add memory
allocations basically anywhere.
As the reference handler code is plain java code, it will be affected as
other java code.
I mentioned instrumentation on the off-chance that there was more to this puzzle.

I think Peter is right and the allocation of the InterruptedException seems to be the only place where OOME is possible in this code. Do you know if these tests call Thread.interrupt on random threads (maybe as a stress test)? It is possible to get a reference to the Reference Handler thread via Thread.getAllStackTraces and a few other APIs so maybe this what is going on. If the tests aren't calling interrupt on random threads then it suggests to me that there is something else going on, maybe there is a lurking VM bug.

In any case, it seems safe to catch/ignore OOME here. One of the mails mentioned ThreadDeath and I don't know if want to expand the scope of the patch. That seems a case where it should be like the Cleaner and terminate the VM.

-Alan.


Reply via email to