JDK-8256807 : C2: Not marking stores correctly as mismatched in string opts
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14,15,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-11-20
  • Updated: 2021-01-06
  • Resolved: 2020-12-01
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 11 JDK 16
11.0.11-oracleFixed 16 b27Fixed
Related Reports
Relates :  
Relates :  
Description
running CTW for lucene-analyzers-common-7.5.0.jar results in the following assert during the compilation of org.apache.lucene.analysis.util.AbstractAnalysisFactory::splitAt

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/4076d11c-c6ed-4d07-84c1-4ab8d55cd975-S435659/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/dde03f90-e26d-4004-9106-3206a20b822f/runs/d3f2872f-e60e-434e-b554-1d0fad07a80a/workspace/open/src/hotspot/share/opto/memnode.cpp:2630), pid=39489, tid=23043
#  assert(Opcode() == st->Opcode() || st->Opcode() == Op_StoreVector || Opcode() == Op_StoreVector || st->Opcode() == Op_StoreVectorScatter || Opcode() == Op_StoreVectorScatter || phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw || (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || (is_mismatched_access() || st->as_Store()->is_mismatched_access())) failed: no mismatched stores, except on raw memory: StoreC StoreB
#
# JRE version: Java(TM) SE Runtime Environment (16.0+26) (fastdebug build 16-ea+26-1687)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 16-ea+26-1687, mixed mode, sharing, compressed oops, g1 gc, bsd-amd64)
# Core dump will be written. Default location: core.39489
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x00007fe0188a4c20):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=23043, stack(0x0000700010611000,0x0000700010711000)]


Current CompileTask:
C2:  58381 3854    b        org.apache.lucene.analysis.util.AbstractAnalysisFactory::splitAt (114 bytes)

Stack: [0x0000700010611000,0x0000700010711000],  sp=0x000070001070bda0,  free space=1003k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x114aded]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x6dd
V  [libjvm.dylib+0x114b40b]  VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x3b
V  [libjvm.dylib+0x60c59f]  report_vm_error(char const*, int, char const*, char const*, ...)+0x13f
V  [libjvm.dylib+0xd8fd02]  StoreNode::Ideal(PhaseGVN*, bool)+0x332
V  [libjvm.dylib+0xebb95a]  PhaseIterGVN::transform_old(Node*)+0x12a
V  [libjvm.dylib+0xebb416]  PhaseIterGVN::optimize()+0x246
V  [libjvm.dylib+0x5ba4de]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x9e
V  [libjvm.dylib+0x5ba611]  Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0xc1
V  [libjvm.dylib+0x5b4e09]  Compile::Optimize()+0x1329
V  [libjvm.dylib+0x5b23e9]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x17f9
V  [libjvm.dylib+0x4a61b0]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0xe0
V  [libjvm.dylib+0x5ce818]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x608
V  [libjvm.dylib+0x5cdfa6]  CompileBroker::compiler_thread_loop()+0x2e6
V  [libjvm.dylib+0x10a44f4]  JavaThread::thread_main_inner()+0x2b4
V  [libjvm.dylib+0x10a0227]  Thread::call_run()+0x1b7
V  [libjvm.dylib+0xe6101f]  thread_native_entry(Thread*)+0x15f
C  [libsystem_pthread.dylib+0x3661]  _pthread_body+0x154
C  [libsystem_pthread.dylib+0x350d]  _pthread_body+0x0
Comments
Fix Request (11u) This backports the C2 fix, and keeps codebases in sync (I see 11.0.11-oracle). Patch applies cleanly to 11u, passes tier{1,2} tests. I hand-checked it fixes the same problem: parameter is passed as "require_atomic_access", not "mismatched", as it should have been.
04-01-2021

Changeset: aa2d36f6 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2020-12-01 10:11:39 +0000 URL: https://git.openjdk.java.net/jdk/commit/aa2d36f6
01-12-2020

ILW = Assert during C2 compilation, with CTW and stress options, no workaround (but disable compilation) = HLM = P3
23-11-2020

-XX:StressSeed was set to 6332432025111185851 during the run
21-11-2020

attached replay file
21-11-2020