JDK-8281638 : jfr/event/allocation tests fail with release VMs after JDK-8281318 due to lack of -XX:+UnlockDiagnosticVMOptions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-11
  • Updated: 2022-03-16
  • Resolved: 2022-02-11
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 17 JDK 19
17.0.4Fixed 19 b10Fixed
Related Reports
Relates :  
Description
The following three tests fail with release VMs.

jdk/jfr/event/allocation/TestObjectAllocationInNewTLABEvent.java
jdk/jfr/event/allocation/TestObjectAllocationOutsideTLABEvent.java
jdk/jfr/event/allocation/TestObjectAllocationSampleEventThrottling.java

```
STDERR:
Error: VM option 'WhiteBoxAPI' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
Error: The unlock option must precede 'WhiteBoxAPI'.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
Comments
Fix Request (17u, 18u) Fixes modified JFR tests after JDK-8281318 backport. Applies cleanly. Tests pass in x86_64 and x86_32 modes, in both fastdebug and release.
14-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/241 Date: 2022-03-11 16:17:57 +0000
11-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/43 Date: 2022-03-11 15:32:53 +0000
11-03-2022

The fix for this bug is integrated in jdk-19+10-531.
11-02-2022

Changeset: d254cf28 Author: Jie Fu <jiefu@openjdk.org> Date: 2022-02-11 11:39:54 +0000 URL: https://git.openjdk.java.net/jdk/commit/d254cf28c5e72bd9b8de863b831015237640ca25
11-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7441 Date: 2022-02-11 11:29:21 +0000
11-02-2022