JDK-8250888 : nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java fails
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11.0.9,15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-07-31
  • Updated: 2024-12-20
  • Resolved: 2020-11-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.14Fixed 16 b26Fixed
Related Reports
Relates :  
Description
The test fails because Shenandoah support in jdk11 has been introduced in a different way than for later releases.

I.e. in jdk11u the option UseShenandoahGC is not even available if the VM has not been built without Shenandoah. Such a VM prints "Unrecognized VM option 'UseShenandoahGC'", while in later jdks, when built without Shenandoah (or any different GC) the VM prints "Option -XX:+UseShenandoahGC not supported".

I.e. the test code fails because with jdk11u "isShenandoahGCon" will be null because the VM does not even know the flag, while in later jdks "isShenandoahGCon" will be false as the VM knows the flag.

So in jdk11 a NullPointerException is thrown at TestDriver.java:84 because isShenandoahGCon is null.

In any case the test should use the API from sun.hotspot.gc.GC to detect GC presence in all jdk versions, as it returns true/false always.
Comments
Fix Request (11u) The test also fails in jdk11u. The patch does not apply cleanly due to context difference, but it is easy to resolve manually. Low risk, only a test change. Patch reviewed by goetz.
13-10-2021

Changeset: 5fedb69e Author: Guoxiong Li <lgxbslgx@gmail.com> Committer: Aleksey Shipilev <shade@openjdk.org> Date: 2020-11-20 07:02:48 +0000 URL: https://github.com/openjdk/jdk/commit/5fedb69e
20-11-2020