RFC 7038914: VM could throw uncaught OOME in ReferenceHandler thread (original) (raw)
Thomas Schatzl thomas.schatzl at oracle.com
Mon May 13 11:55:08 UTC 2013
- Previous message: RFC 7038914: VM could throw uncaught OOME in ReferenceHandler thread
- Next message: RFC 7038914: VM could throw uncaught OOME in ReferenceHandler thread
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
On Fri, 2013-05-10 at 12:52 +0200, Peter Levart wrote:
Hi David, Thomas,
I think I understand you now, David. You want to minimize the possibility of vacuously passing the test. So here's my attempt at that:
public class OOMEInReferenceHandler { static Object[] fillHeap() { Object[] first = null, last = null; int size = 1 << 20;_ _while (size > 0) { try { [... new reproducer ...]
[...]
To be sure the order of class referencing in handlers is not disturbed by changes in compilers, I suggest the patch to be modified to this more explicit variant: try { try { lock.wait(); } catch (InterruptedException x) { } } catch (OutOfMemoryError x) {}
..which also passes the test.
I updated the test program and the patch in java.lang.ref.Reference accordingly.
As for the problem of reproducibility, in my tests I had a 100% reproduction rate with the previous version of the test.
However, now I also set -XX:-UseTLAB and -Xmx16M in the test program as suggested in some other emails.
I will report back with a new webrev after some testing on more platforms as suggested by David.
Hth, Thomas
- Previous message: RFC 7038914: VM could throw uncaught OOME in ReferenceHandler thread
- Next message: RFC 7038914: VM could throw uncaught OOME in ReferenceHandler thread
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]