RFR: 8288204: GVN Crash: assert() failed: correct memory chain [v4]

Yi Yang yyang at openjdk.org
Fri Dec 23 08:33:50 UTC 2022


On Fri, 23 Dec 2022 07:26:39 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Thanks for making these changes.
> 
> Several tests (for example, compiler/arraycopy/TestArrayCopyAsLoadsStores.java) are now failing with:
> 
> ```
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (workspace/open/src/hotspot/share/opto/phaseX.cpp:843), pid=3983761, tid=3983777
> #  assert(i->_idx >= k->_idx) failed: Idealize should return new nodes, use Identity to return old nodes
> #
> # JRE version: Java(TM) SE Runtime Environment (21.0) (fastdebug build 21-internal-LTS-2022-12-23-0641545.tobias.hartmann.jdk2)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-internal-LTS-2022-12-23-0641545.tobias.hartmann.jdk2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # V  [libjvm.so+0x179ad0c]  PhaseGVN::transform_no_reclaim(Node*)+0xec
> 
> Current CompileTask:
> C2:   2222  478    b  4       compiler.arraycopy.TestArrayCopyAsLoadsStores::m14 (9 bytes)
> 
> Stack: [0x00007f86dc7f5000,0x00007f86dc8f6000],  sp=0x00007f86dc8f20e0,  free space=1012k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0x179ad0c]  PhaseGVN::transform_no_reclaim(Node*)+0xec  (phaseX.cpp:843)
> V  [libjvm.so+0x141be0f]  LibraryCallKit::inline_arraycopy()+0x71f  (library_call.cpp:5289)
> V  [libjvm.so+0x1438712]  LibraryIntrinsic::generate(JVMState*)+0x302  (library_call.cpp:115)
> V  [libjvm.so+0xcbfbe9]  Parse::do_call()+0x389  (doCall.cpp:662)
> V  [libjvm.so+0x176c5f8]  Parse::do_one_bytecode()+0x638  (parse2.cpp:2704)
> V  [libjvm.so+0x175a734]  Parse::do_one_block()+0x844  (parse1.cpp:1555)
> V  [libjvm.so+0x175b697]  Parse::do_all_blocks()+0x137  (parse1.cpp:707)
> V  [libjvm.so+0x176021d]  Parse::Parse(JVMState*, ciMethod*, float)+0xb3d  (parse1.cpp:614)
> V  [libjvm.so+0x918c40]  ParseGenerator::generate(JVMState*)+0x110  (callGenerator.cpp:99)
> V  [libjvm.so+0xb0275d]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d  (compile.cpp:760)
> V  [libjvm.so+0x916857]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7  (c2compiler.cpp:113)
> V  [libjvm.so+0xb0fa2c]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c  (compileBroker.cpp:2237)
> V  [libjvm.so+0xb107e8]  CompileBroker::compiler_thread_loop()+0x5d8  (compileBroker.cpp:1916)
> V  [libjvm.so+0x107d066]  JavaThread::thread_main_inner()+0x206  (javaThread.cpp:709)
> V  [libjvm.so+0x1a723c0]  Thread::call_run()+0x100  (thread.cpp:224)
> V  [libjvm.so+0x1712553]  thread_native_entry(Thread*)+0x103  (os_linux.cpp:739)
> ```

Commenting out transformation in array_copy_forward works now, all test under test/hotspot/jtreg/compiler passed except tests that always failed.

PhaseGVN::transform_no_reclaim still crashes when reverting this patch and only adding mm->transform in array_copy_forward, so at least this is not related to this fix.

Though, I don't see why it causes the crash at first glance..

-------------

PR: https://git.openjdk.org/jdk/pull/9777


More information about the hotspot-compiler-dev mailing list