JDK-8317237 : assert(mem == (Node*)1 || mem == mem2) failed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2023-09-25
  • Updated: 2023-09-29
  • Resolved: 2023-09-29
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug mixed mode linux-amd64 compressed oops)

A DESCRIPTION OF THE PROBLEM :
I ran a regression testcase on JDK8u392 and found that the JVM crashed without any options. 
But strangely enough, it works fine when I add the -Xcomp option. Then I made some changes to the regression test code that would allow it to still crash when using the -Xcomp option.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/matcher.cpp:1797), pid=16408, tid=0x00007f0164535700
#  assert(mem == (Node*)1 || mem == mem2) failed: multiple Memories being matched at once?
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java  compiler.codegen.TestMultiMemInstructionMatching

ACTUAL -
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/matcher.cpp:1797
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data//jdk8u/hotspot/src/share/vm/opto/matcher.cpp:1797), pid=16408, tid=0x00007f0164535700
#  assert(mem == (Node*)1 || mem == mem2) failed: multiple Memories being matched at once?
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug--b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home//repository//toreport/TestMultiMemInstructionMatching_09_24_00_04_45/hs_err_pid16408.log
#
# Compiler replay data is saved as:
# /home//repository//toreport/TestMultiMemInstructionMatching_09_24_00_04_45/replay_pid16408.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------- BEGIN SOURCE ----------

---------- END SOURCE ----------

FREQUENCY : always



Comments
This is a duplicate of JDK-8240905.
29-09-2023

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