RFR(S): 8240634: event/runtime/TestMetaspaceAllocationFailure.java times out

Thomas Stüfe thomas.stuefe at gmail.com
Wed Mar 25 14:06:28 UTC 2020


Hi Mikhailo, Erik,

You should not need the additional -XX:MaxMetaspaceSize=200M. As a rule of
thumb, in compressed class space, each class takes about 1K (bit less
actually) so 200M give you room for about 200000 - 250000 classes to load
before OOM. I'd say that is way too much for this test. You just want
enough to load the base jdk and get the test running and then you want to
hit OOM quickly.

I tested the test with CompressedClassSpaceSize=10M (which would give us
about 10000 classes) and that still worked fine, so I think you could just
drastically lower CompressedClassSpaceSize.

Also why the Thread.sleep(100) in the loop? Maybe it would make more sense
to make the fill-loop tight or with only minimal sleep time, and instead
have a loop at the outside waiting for the even to arrive?

Cheers, Thomas

On Wed, Mar 25, 2020 at 1:24 PM Erik Gahlin <erik.gahlin at oracle.com> wrote:

> Hi Misha,
>
> Looks OK
>
> Relying on OOM and parameters being correct to trigger the event seem
> fragile, but let's try this and if it fails again, let's remove the test
> or come up with another approach.
>
> Thanks
> Erik
>
> On 2020-03-18 02:24, mikhailo.seledtsov at oracle.com wrote:
> > This test timed out occasionally, about 1/100 runs, on Linux only.
> > Please review this change that mitigates occasional test failure
> > by limiting the number of iterations attempting to fill up metaspace,
> > and throwing SkippedException when the max number
> > of iterations is reached.
> >
> >     JBS: https://bugs.openjdk.java.net/browse/JDK-8240634
> >     Webrev: http://cr.openjdk.java.net/~mseledtsov/8240634.00/
> >     Testing:
> >         Ran 100 times on Linux, 1 skipped, rest PASS
> >
> >
> > Thank you,
> > Misha
> >
>


More information about the hotspot-jfr-dev mailing list