RFR: 8254799: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java fails with release VMs
David Holmes
david.holmes at oracle.com
Thu Oct 15 01:15:35 UTC 2020
On 15/10/2020 11:01 am, Daniel D. Daugherty wrote:
> 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.
I don't recall that.
But in this case it is not an issue at all. We are using
ProcessTools.createJavaProcessBuilder to pass the specific set of flags
listed in the test itself. There are no incoming flags from jtreg etc,
so nothing that can be affected. Further, even if using createTestJVM,
the explicit flags are placed last on the command-line so still cannot
interfere with anything coming in from jtreg.
I suppose a trivial change for Jie would be:
- "-XX:-VerifyDependencies",
+ Platform.isDebugBuild() ? "-XX:-VerifyDependencies" : "",
Cheers,
David
> Dan
>
>
>>
>> Cheers,
>> David
>> -----
>>
>>> -------------
>>>
>>> PR: https://git.openjdk.java.net/jdk/pull/673
>>>
>
More information about the hotspot-runtime-dev
mailing list