RFR: 8254799: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java fails with release VMs
Daniel D. Daugherty
daniel.daugherty at oracle.com
Thu Oct 15 01:01:13 UTC 2020
On 10/14/20 8:59 PM, David Holmes wrote:
> On 15/10/2020 10:48 am, Daniel D.Daugherty wrote:
>> On Wed, 14 Oct 2020 23:45:52 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>>
>>> runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java and
>>> runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryErrorInMetaspace.java
>>> fail with release VMs due to VerifyDependencies is
>>> develop and is available only in debug version of VM.
>>> -XX:+IgnoreUnrecognizedVMOptions is added to fix it.
>>
>> Changes requested by dcubed (Reviewer).
>>
>> test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java
>> line 82:
>>
>>> 80: "-XX:MaxMetaspaceSize=16m",
>>> 81: "-XX:+IgnoreUnrecognizedVMOptions",
>>> 82: "-XX:-VerifyDependencies",
>>
>> Instead of adding "-XX:+IgnoreUnrecognizedVMOptions", you can
>> check the JDK type like this:
>>
>> String jdkType = System.getProperty("jdk.debug", "release");
>> boolean addNonReleaseOptions = false;
>> if (!jdkType.equals("release")) {
>> addNonReleaseOptions = true;
>> }
>>
>> and then only include the "-XX:-VerifyDependencies" option
>> when `addNonReleaseOptions` is true... I'm not sure how to
>> do optional parameters with ProcessTools.createJavaProcessBuilder().
>
> I think this is a trivial issue being over engineered. :) We run many
> tests with -XX:+IgnoreUnrecognizedVMOptions at the jtreg level or the
> @run level, and this is no different.
My understanding is that we are trying to stop using
-XX:+IgnoreUnrecognizedVMOptions because it has unexpected
side effects.
Dan
>
> Cheers,
> David
> -----
>
>> -------------
>>
>> PR: https://git.openjdk.java.net/jdk/pull/673
>>
More information about the hotspot-runtime-dev
mailing list