JDK-8316863 : assert(false) failed: Non-balanced monitor enter/exit!
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2023-09-20
  • Updated: 2023-09-25
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 8
8-poolUnresolved
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug_2023_09_20_15_15-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
#

A DESCRIPTION OF THE PROBLEM :
I ran a test case under the option -Xcomp, and I found the JDK8u321 crashed

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/jdk8u/hotspot/src/share/vm/runtime/objectMonitor.cpp:979), pid=86197, tid=0x00007f74afc18700
#  assert(false) failed: Non-balanced monitor enter/exit!
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug_2023_09_20_15_15-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  -Xcomp Test

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/objectMonitor.cpp:979
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/jdk8u/hotspot/src/share/vm/runtime/objectMonitor.cpp:979), pid=86197, tid=0x00007f74afc18700
#  assert(false) failed: Non-balanced monitor enter/exit!
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug_2023_09_20_15_15-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/repositor/bugs/Test_09_20_19_42_03/hs_err_pid86197.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
I would also suspect this is a dup of JDK-8268347. Have the submitter test using the Oracle JDK if they can. Do we have a way to mark this bug for 8u-open?
25-09-2023

Might just be JDK-8268347 which, as far as I can see, has only been fixed in Oracle JDK 8u.
25-09-2023

Issue is not reproduced. Crash is not observed when using -Xcomp. OS: Windows 10 JDK 8u381: Pass JDK 8u381 Fastdebug : Pass OS: Ubuntu 20.08 JDK 8u381: Pass JDK 8u381 Fastdebug : Pass Attaching submitter's crash log hs_err_pid86197.log Moving it to dev team for further analysis.
25-09-2023