JDK-8062950 : Bug in locking code when UseOptoBiasInlining is disabled: assert(dmw->is_neutral()) failed: invariant
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u40,9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2014-11-05
  • Updated: 2017-08-08
  • Resolved: 2014-11-07
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.
8u40Fixed 9 b42Fixed
Related Reports
Relates :  
Relates :  
MacroAssembler::fast_lock uses biased_locking_enter with swap_reg_contains_mark==true, which is no longer correct after biased_locking_enter was put in front of check for IsInflated.
This happened in 8033805: Move Fast_Lock Fast_Unlock code from .ad files to macroassembler.
Reproduce: java -Xcomp -XX:-TieredCompilation -XX:-UseOptoBiasInlining t # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/synchronizer.cpp:1266 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (hotspot/src/share/vm/runtime/synchronizer.cpp:1266), pid=27404, tid=6403 # assert(dmw->is_neutral()) failed: invariant # # JRE version: Java(TM) SE Runtime Environment (9.0-b38) (build 1.9.0-ea-fastdebug-b38) # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-ea-fastdebug-b38 compiled mode bsd-amd64 compressed oops)

ILW=Wrong lock code is generated, always with -UseOptoBiasInlining, no workaround=HLH=P2

JDK 7u is not affected since 8033805 was backported only to jdk8u.