JDK-8316656 : VM Option (enable VerifyAliases) crashes the JVM on OpenJDK8 and OpenJDK11
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,11,17,21
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2023-09-14
  • Updated: 2023-11-27
  • Resolved: 2023-11-27
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
We found that in the development version of Hotspot in JDK11, there exists an option that will crash the JVM as long as it is specified.

For example, for any test program like:

```java
public class Test {
    public static void main(String[] args) {
        System.out.println("Success Loaded!");
    }
}
```

If we run this program on Ubuntu with OpenJDK8 or OpenJDK11 using the following command:

```java
pathTo/jdk11u/build/linux-x86_64-normal-server-fastdebug/jdk/bin/java -XX:+VerifyAliases -cp . Test
```

The output of the above command is:

```java
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/memnode.cpp:4792
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/JVM/JVMs/LineCov/jdk11u/src/hotspot/share/opto/memnode.cpp:4792), pid=5182, tid=5194
#  assert(alias_idx >= Compile::AliasIdxRaw) failed: must not disturb base_memory or sentinel
#
# JRE version: OpenJDK Runtime Environment (11.0.21) (fastdebug build 11.0.21-internal+0-adhoc.root.jdk11u)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.21-internal+0-adhoc.root.jdk11u, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/tmp/core.5182)
#
# An error report file with more information is saved as:
# /home/tmp/hs_err_pid5182.log
#
# Compiler replay data is saved as:
# /home/tmp/replay_pid5182.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 5194
Dumping core ...
Aborted (core dumped)
```

Ubuntu Version:

```java
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
```

Also, this will cause the JVM to crash on OpenJDK8.


FREQUENCY : always



Comments
This is a duplicate of JDK-8037084.
27-11-2023

[~sswsharm] Please always set a subcomponent when moving issues to dev. Otherwise, these might go unnoticed for a while. Thanks!
27-11-2023

Issue is reproduced. Crash is observed. OS: Windows 10 JDK 8u381: Fail JDK 11.0.20: Fail JDK 17.0.8: Fail JDK 21: Fail ILW = Crash, reproducible on debug build, no known workaround yet = MLM = P4 Moving it to dev team for further analysis.
21-09-2023