RFR: 8205928 - [TESTBUG]: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails depending on kernel config

Thomas Stüfe thomas.stuefe at gmail.com
Wed Jul 4 05:11:51 UTC 2018


Thanks for confirming, Matthias.

On Tue, Jul 3, 2018, 17:45 Baesken, Matthias <matthias.baesken at sap.com>
wrote:

> Hi Bob and Thomas ,  I had  the patch in our internal  queue  and it fixed
> the problem .
> ( however I am not reviewer )
>
> Best regards, Matthias
>
>
> > -----Original Message-----
> > From: Bob Vandette [mailto:bob.vandette at oracle.com]
> > Sent: Dienstag, 3. Juli 2018 16:03
> > To: Thomas Stüfe <thomas.stuefe at gmail.com>
> > Cc: serviceability-dev at openjdk.java.net serviceability-
> > dev at openjdk.java.net <serviceability-dev at openjdk.java.net>; Baesken,
> > Matthias <matthias.baesken at sap.com>
> > Subject: Re: RFR: 8205928 - [TESTBUG]:
> > jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails
> > depending on kernel config
> >
> > Matthais, who reported the issue, confirmed that this patch solves the
> > problem.
> >
> > Thanks,
> > Bob.
> >
> > > On Jul 3, 2018, at 9:38 AM, Thomas Stüfe <thomas.stuefe at gmail.com>
> > wrote:
> > >
> > > Hi Bob,
> > >
> > > It does look fine from the outside. I did not test it though, since I
> > > have no suitable kernel.
> > >
> > > Best Regards, Thomas
> > >
> > > On Tue, Jul 3, 2018 at 3:13 PM, Bob Vandette <bob.vandette at oracle.com>
> > wrote:
> > >> Please review this small fix to correct a test failure when the Linux
> system
> > kernel is
> > >> not configured with the CONFIG_MEMCG_KMEM option.
> > >>
> > >> The Container Metric tests are dependent on docker which allow us to
> > assume a certain minimum
> > >> Linux kernel configuration level. However, the kernel memory resource
> > limiting feature is not a hard
> > >> requirement for docker. This test will need to be updated to allow for
> > running on kernels without this
> > >> option.  A 0 return from the getKernelMemoryLimit is defined to
> indicate
> > that this API is not available.
> > >>
> > >> BUG: https://bugs.openjdk.java.net/browse/JDK-8205928
> > >>
> > >> PROPOSED FIX:
> > >>
> > >> diff --git
> > a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
> > b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
> > >> --- a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
> > >> +++ b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java
> > >> @@ -95,10 +95,11 @@
> > >>
> > >>     private static void testKernelMemoryLimit(String value) {
> > >>         long limit = getMemoryValue(value);
> > >> -        if (limit != Metrics.systemMetrics().getKernelMemoryLimit())
> {
> > >> +        long kmemlimit =
> Metrics.systemMetrics().getKernelMemoryLimit();
> > >> +        if (kmemlimit != 0 && limit != kmemlimit) {
> > >>             throw new RuntimeException("Kernel Memory limit not equal,
> > expected : ["
> > >>                     + limit + "]" + ", got : ["
> > >> -                    + Metrics.systemMetrics().getKernelMemoryLimit()
> + "]");
> > >> +                    + kmemlimit + "]");
> > >>         }
> > >>         System.out.println("TEST PASSED!!!");
> > >>     }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180704/7cfcab18/attachment.html>


More information about the serviceability-dev mailing list