JDK-8277132 : C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-11-15
  • Updated: 2022-11-09
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
(synopsis is provisional until the cause is found)

Attached Fuzzer test fails on x86_32:

$ ../build/linux-x86-server-fastdebug/images/jdk/bin/java -XX:-TieredCompilation Test

#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/live.cpp:110), pid=1008749, tid=1008757
#  assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block

Current CompileTask:
C2:    126   15 %           Test::vMeth1 @ 112 (243 bytes)

Stack: [0xd137f000,0xd1400000],  sp=0xd13fd360,  free space=504k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1001d84]  PhaseLive::compute(unsigned int)+0xb04
V  [libjvm.so+0x7aa1d3]  PhaseChaitin::Register_Allocate()+0x923
V  [libjvm.so+0x8f77c8]  Compile::Code_Gen()+0x368
V  [libjvm.so+0x90120f]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x145f
V  [libjvm.so+0x7346cc]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x84c
V  [libjvm.so+0x913cc5]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x1665
V  [libjvm.so+0x9149d9]  CompileBroker::compiler_thread_loop()+0x689
V  [libjvm.so+0x93d9eb]  CompilerThread::thread_entry(JavaThread*, JavaThread*)+0x2b
V  [libjvm.so+0x16852c8]  JavaThread::thread_main_inner()+0x658
V  [libjvm.so+0x1685845]  JavaThread::run()+0x435
V  [libjvm.so+0x168c47e]  Thread::call_run()+0xfe
V  [libjvm.so+0x12968b3]  thread_native_entry(Thread*)+0x123
C  [libpthread.so.0+0x8635]  start_thread+0xf5

Comments
[~shade] you don't mind if I take that one from you, do you?
27-10-2022

My current idea is that 32-bit version just produces way more spills. I'll dig more later.
16-11-2021

Does not reproduce on x86_64 with latest JDK. Nevertheless, it is hard to tell if it does not affect it without having a closer look at it. I'm treating it as x86_32 only issue for now and set the fix version to tbd. [~shade] if you find that it also affects x86_64, please let me know. Then we should definitely get this fixed in 18. Otherwise, I'll leave it up to you to decide if you want to get this fixed in 18. ILW = Assertion in C2 code generation, only reproducible with single fuzzer test on x86_32, disable compilation of affected method = HLM = P3
16-11-2021

Thanks Aleksey!
16-11-2021

diff --git a/src/hotspot/share/opto/live.cpp b/src/hotspot/share/opto/live.cpp index 7101994b4e3..fbb08878b8f 100644 --- a/src/hotspot/share/opto/live.cpp +++ b/src/hotspot/share/opto/live.cpp @@ -109,2 +109,5 @@ void PhaseLive::compute(uint maxlrg) { uint r = _names.at(n->_idx); + if (def_outside->member(r)) { + n->dump(); + } assert(!def_outside->member(r), "Use of external LRG overlaps the same LRG defined in this block"); Tells me the node in question is: 1573 BoundSpillCopy === _ 285 [[ 282 ]]
15-11-2021

Bisection points to JDK-8262017 as the starting point.
15-11-2021