RFR: 8064909: FragmentMetaspace.java got OutOfMemoryError
jon.masamitsu at oracle.com
Wed Nov 26 23:00:00 UTC 2014
If this test fails with an OOME in the future, I would like it to be
obvious that the failure is not that an OOME occurred. I cannot
tell that from looking at the test. Can the test be changed so
I don't have to spend time figuring out that the OOME is not
a failure mode of the test?
On 11/26/2014 12:51 PM, Dmitry Fazunenko wrote:
> Hi Jon,
> The original version of test worked for 80 seconds trying to perform
> as many iterations as possible. The number of iterations performed
> depended on how fast is the machine. With each next iteration the size
> of generated and loaded classes is growing, so on fast enough machines
> 80 seconds is enough to run out of heap while generating a class.
> The fix not only sets the heap, but limits iterations. 300m heap is
> enough for 200 iterations.
> Your approach, with catching OOME(heap) and passing will also work,
> but it will reduce the test readability (and potentially could bring
> more problems).
> An alternative approach would be to limit metaspace and heap
> accordingly and load classes until we don't run out metaspace... But
> this might take awhile.
> So, I hope that Michael's fix is good.
> Thanks for looking and expressing comments.
> On 26.11.2014 22:04, Jon Masamitsu wrote:
>> Your change makes this test pass but it seems like at
>> some future date 300m might not be big enough
>> (for whatever reason). Could the test be make to
>> caught an OOME, print out a message saying that
>> an OOME doesn't mean the test failed but that
>> the test needs a larger heap? Then pass an
>> exception up (maybe some type of Runtime
>> exception - sorry if that is vague but I don't
>> what type of exception would make sense). That
>> would mean we wouldn't have to spend time
>> diagnosing what the OOME means again.
>> On 11/26/2014 5:36 AM, Michail Chernov wrote:
>>> Please review this simple fix for nightly test failure:
>>> Problem: test fails because of OOME (not enough heap size).
>>> Solution: heap size were increased.
More information about the hotspot-gc-dev