RFR(S): 8240634: event/runtime/TestMetaspaceAllocationFailure.java times out
mikhailo.seledtsov at oracle.com
mikhailo.seledtsov at oracle.com
Wed Mar 25 23:55:16 UTC 2020
Erik, Thomas,
Thank you for reviewing this change. See my comment inline:
On 3/25/20 7:06 AM, Thomas Stüfe wrote:
> 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.
Thank you for detailed explanation. For the second test case (second
@run statement), I have set the CompressedClassSpaceSize to 10M. I ran
the test many times on Linux, Windows and Mac, and it works well.
>
> 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?
I have removed the sleep, and it seems to work fine.
Since these both are trivial updates, I will go ahead and integrate the
change.
I also agree with Erik, if this test keeps being unstable I am inclined
to remove it.
Thank you,
Misha
>
> Cheers, Thomas
>
> On Wed, Mar 25, 2020 at 1:24 PM Erik Gahlin <erik.gahlin at oracle.com
> <mailto: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
> <mailto: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