RFR [XS] : 8229182: runtime/containers/docker/TestMemoryAwareness.java test fails on SLES12
Baesken, Matthias
matthias.baesken at sap.com
Wed Aug 7 15:46:32 UTC 2019
Hello, here is a new webrev, it adds the comment and follows Severins proposal .
http://cr.openjdk.java.net/~mbaesken/webrevs/8229182.1/
Best regards, Matthias
> -----Original Message-----
> From: Severin Gehwolf <sgehwolf at redhat.com>
> Sent: Mittwoch, 7. August 2019 16:18
> To: Baesken, Matthias <matthias.baesken at sap.com>; 'hotspot-
> dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
> Cc: Bob Vandette <bob.vandette at oracle.com>
> Subject: Re: RFR [XS] : 8229182:
> runtime/containers/docker/TestMemoryAwareness.java test fails on SLES12
>
> Hi Matthias,
>
> On Wed, 2019-08-07 at 13:55 +0000, Baesken, Matthias wrote:
> > Hi Severin, sure I'll add the comment .
> >
> > Btw we noticed that on some machines we (even with this patch) get
> an exit value of 137 and not 1 .
> > Do you think this can be seen as a successful test end (means - we could
> test for exit value 137 too ?) or not ?
> > It look similar to what people saw here :
>
> Yes, I've seen this before (137 exit code). Non-zero is a successful
> test if other output matches. So perhaps this?
>
> OutputAnalyzer out = DockerTestUtils.dockerRunJava(opts);
> if (out.getExitValue() == 0) {
> throw RuntimeException("OOM not triggered?");
> }
> out.shouldContain("Entering AttemptOOM main")
> .shouldNotContain("AttemptOOM allocation successful")
> .shouldContain("java.lang.OutOfMemoryError");
>
> Thanks,
> Severin
>
> >
> > https://stackoverflow.com/questions/38967991/why-are-my-gradle-
> builds-dying-with-exit-code-137
> >
> > "In cases where virtual memory is running short the kernel OOM (Out of
> Memory) killer may forcibly kill Jenkins or individual builds.
> > If this occurs on Linux you may see builds terminate with exit code 137 (128
> + signal number for SIGKILL)."
> >
> >
> > Best regards, Matthias
> >
> >
> > > -----Original Message-----
> > > From: Severin Gehwolf <sgehwolf at redhat.com>
> > > Sent: Mittwoch, 7. August 2019 11:38
> > > To: Baesken, Matthias <matthias.baesken at sap.com>; 'hotspot-
> > > dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
> > > Subject: Re: RFR [XS] : 8229182:
> > > runtime/containers/docker/TestMemoryAwareness.java test fails on
> SLES12
> > >
> > > Hi Matthias,
> > >
> > > On Wed, 2019-08-07 at 07:23 +0000, Baesken, Matthias wrote:
> > > > Hello, please review the following small change .
> > > >
> > > > The docker test TestMemoryAwareness.java failed on our ppc64le
> SLES12
> > > Linux machine .
> > > > It could not successfully trigger the expected OOM , error message is
> :
> > > >
> > > > java.lang.RuntimeException: Expected to get exit value of [1]
> > > >
> > > > at
> > >
> jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.ja
> > > va:396)
> > > > at TestMemoryAwareness.testOOM(TestMemoryAwareness.java:106)
> > > > at TestMemoryAwareness.main(TestMemoryAwareness.java:63)
> > > > at
> > >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > > at
> > >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMet
> > > hodAccessorImpl.java:62)
> > > > at
> > >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Delega
> > > tingMethodAccessorImpl.java:43)
> > > > at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > at
> > >
> com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapp
> > > er.java:127)
> > > > at java.base/java.lang.Thread.run(Thread.java:834)
> > > >
> > > >
> > > > After some discussion with Bob Vandette how to make the test more
> > > robust ,
> > > > we looked into additionally setting -memory-swappiness to 0 to
> > > disable anonymous page swapping.
> > > >
> > > >
> > > > https://docs.docker.com/config/containers/resource_constraints/#--
> > > memory-swappiness-details
> > > >
> > > > The test passes with this added setting.
> > > >
> > > >
> > > > Bug/webrev :
> > > >
> > > > https://bugs.openjdk.java.net/browse/JDK-8229182
> > > >
> > > > http://cr.openjdk.java.net/~mbaesken/webrevs/8229182.0/
> > >
> > > This looks OK. Could you please add a comment for the memory-
> swappiness
> > > addition. Suggestion:
> > >
> > > """
> > > Add "--memory-swappiness 0" so as to disable anonymous page
> swapping.
> > > """
> > >
> > > Thanks,
> > > Severin
More information about the hotspot-dev
mailing list