Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
> The following test cases try to provoke VMOutOfMemoryException during object > reallocation: > > EAPopFrameNotInlinedReallocFailure > EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure > EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure > > This is not 100% reliable therefore it should not be treated as test failure > if no oom was raised. Richard Reingruber has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: - Skip test cases expecting OOMEs if running with ZGC. - Merge branch 'master' into JDK-8255072-eatests-oom-not-thrown - Make OOME more reliable and skip test cases if it is not expected because scalar replacement is disabled - 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown - Changes: - all: https://git.openjdk.java.net/jdk/pull/775/files - new: https://git.openjdk.java.net/jdk/pull/775/files/4196a421..33ceb741 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=775&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=775&range=01-02 Stats: 28553 lines in 409 files changed: 23836 ins; 3073 del; 1644 mod Patch: https://git.openjdk.java.net/jdk/pull/775.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/775/head:pull/775 PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Thu, 22 Oct 2020 20:35:29 GMT, Richard Reingruber wrote: >> The following test cases try to provoke VMOutOfMemoryException during object >> reallocation: >> >> EAPopFrameNotInlinedReallocFailure >> EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure >> EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure >> >> This is not 100% reliable therefore it should not be treated as test failure >> if no oom was raised. > > Richard Reingruber has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains four additional > commits since the last revision: > > - Skip test cases expecting OOMEs if running with ZGC. > - Merge branch 'master' into JDK-8255072-eatests-oom-not-thrown > - Make OOME more reliable and skip test cases if it is not expected because > scalar replacement is disabled > - 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected > VMOutOfMemoryException is not thrown Looks good. - Marked as reviewed by cjplummer (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Thu, 22 Oct 2020 23:06:10 GMT, Chris Plummer wrote: > > > Looks good. Thank you. I'll wait for a second review assuming it's required. - PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Fri, 23 Oct 2020 08:00:49 GMT, Richard Reingruber wrote: > Thank you. I'll wait for a second review assuming it's required. You might want to add the compiler and/or gc teams to the review - PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Fri, 23 Oct 2020 08:15:34 GMT, Chris Plummer wrote: >>> >>> >>> Looks good. >> >> Thank you. I'll wait for a second review assuming it's required. > >> Thank you. I'll wait for a second review assuming it's required. > > You might want to add the compiler and/or gc teams to the review Following @plummercj advice to add compiler/gc teams. - PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Thu, 22 Oct 2020 20:35:29 GMT, Richard Reingruber wrote: >> The following test cases try to provoke VMOutOfMemoryException during object >> reallocation because of JVMTI PopFrame / ForceEarlyReturn: >> >> EAPopFrameNotInlinedReallocFailure >> EAPopInlinedMethodWithScalarReplacedObjectsReallocFailure >> EAForceEarlyReturnOfInlinedMethodWithScalarReplacedObjectsReallocFailure >> >> For ZGC (so far) this is not 100% reliable. >> >> Just ignoring the runs where the expected OOME was not raised was not >> accepted. >> >> Summary of the now accepted solution: >> >> - The 3 problematic test cases are skipped if ZGC is selected. >> >> - They are also skipped if no OOME during object reallocation can be >> expected because allocations are not eliminated. >> >> - In consumeAllMemory, as a last step, empty LinkedList nodes are created >> without long array to fill up small blocks of free memory. >> >> - EATests.java is removed from the problem list for ZGC. > > Richard Reingruber has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains four additional > commits since the last revision: > > - Skip test cases expecting OOMEs if running with ZGC. > - Merge branch 'master' into JDK-8255072-eatests-oom-not-thrown > - Make OOME more reliable and skip test cases if it is not expected because > scalar replacement is disabled > - 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected > VMOutOfMemoryException is not thrown Hi Richard, It looks good to me. One nit: public static final boolean DoEscapeAnalysis = unbox(WB.getBooleanVMFlag("DoEscapeAnalysis"), UseJVMCICompiler); public static final boolean EliminateAllocations = unbox(WB.getBooleanVMFlag("EliminateAllocations"), UseJVMCICompiler); // read by debugger public static final boolean DeoptimizeObjectsALot = WB.getBooleanVMFlag("DeoptimizeObjectsALot"); // read by debugger public static final long BiasedLockingBulkRebiasThreshold = WB.getIntxVMFlag("BiasedLockingBulkRebiasThreshold"); public static final long BiasedLockingBulkRevokeThreshold = WB.getIntxVMFlag("BiasedLockingBulkRevokeThreshold"); +public static final boolean ZGCIsSelected= GC.Z.isSelected(); There are unneeded spaces before '=' sign. Thanks, Serguei - Marked as reviewed by sspitsyn (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/775
Re: RFR: 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown [v3]
On Tue, 27 Oct 2020 00:52:20 GMT, Serguei Spitsyn wrote: >> Richard Reingruber has updated the pull request with a new target base due >> to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains four >> additional commits since the last revision: >> >> - Skip test cases expecting OOMEs if running with ZGC. >> - Merge branch 'master' into JDK-8255072-eatests-oom-not-thrown >> - Make OOME more reliable and skip test cases if it is not expected because >> scalar replacement is disabled >> - 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected >> VMOutOfMemoryException is not thrown > > Hi Richard, > It looks good to me. > One nit: > public static final boolean DoEscapeAnalysis = > unbox(WB.getBooleanVMFlag("DoEscapeAnalysis"), UseJVMCICompiler); > public static final boolean EliminateAllocations = > unbox(WB.getBooleanVMFlag("EliminateAllocations"), UseJVMCICompiler); // read > by debugger > public static final boolean DeoptimizeObjectsALot = > WB.getBooleanVMFlag("DeoptimizeObjectsALot"); // read by > debugger > public static final long BiasedLockingBulkRebiasThreshold = > WB.getIntxVMFlag("BiasedLockingBulkRebiasThreshold"); > public static final long BiasedLockingBulkRevokeThreshold = > WB.getIntxVMFlag("BiasedLockingBulkRevokeThreshold"); > +public static final boolean ZGCIsSelected= GC.Z.isSelected(); > There are unneeded spaces before '=' sign. > > Thanks, > Serguei Hi Serguei, thanks for reviewing. I'll remove the whitespace. I'm able now to reproduce the issue but only with ZGC. So far my attempts(*) to reliably get the OOME during ForceEarlyReturn/PopFrame because of object reallocation failed though. So I'm still in favour of the current solution which is: skip the 3 problematic testcases if ZGC is selected in the target vm. I'm still open for suggestions also though. I'll wait a few more days and then I'll integrate. Thanks, Richard. (*) I tried: - disable TLAB - call WhiteBox.fullGC() in consumeAllMemory() before the last round of allocations. - Check if the memory can be allocated by the thread doing the PopFrame/ForceEarlyReturn. com.sun.jdi.ThreadReference::invokeMethod() cannot be used. A target thread has to be specified and the jdwp threads are not visible through jdi. Only a dedicated native test JVMTI agent can consume all memory and then do the PopFrame/ForceEarlyReturn. - PR: https://git.openjdk.java.net/jdk/pull/775