JDK-8324853 : assert(tn->in(0) != NULL) failed: must have live top node
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8
  • Priority: P2
  • Status: New
  • Resolution: Unresolved
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2024-01-29
  • Updated: 2024-01-30
Description
A DESCRIPTION OF THE PROBLEM : 

#  Internal Error (/scratch/jenkins/workspace/8-2-build-linux-x64-sans-NAS/jdk8u401/683/hotspot/src/share/vm/opto/compile.cpp:1301), pid=761334, tid=0x00007f03213a6700
#  assert(tn->in(0) != NULL) failed: must have live top node
#
# JRE version: Java(TM) SE Runtime Environment (8.0_401) (build 1.8.0_401-fastdebug-b10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.401-b10-fastdebug mixed mode linux-amd64 compressed oops)

Current thread (0x00007f0324171000):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=761343, stack(0x00007f03212a7000,0x00007f03213a7000)]

Stack: [0x00007f03212a7000,0x00007f03213a7000],  sp=0x00007f03213a21f0,  free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x13070b7]  VMError::report_and_die()+0x267
V  [libjvm.so+0x833ef1]  report_vm_error(char const*, int, char const*, char const*)+0x61
V  [libjvm.so+0x771174]  Compile::verify_top(Node*) const+0x134
V  [libjvm.so+0x7711b1]  Compile::set_cached_top_node(Node*)+0x21
V  [libjvm.so+0xed80be]  Matcher::match()+0xe9e
V  [libjvm.so+0x780a68]  Compile::Code_Gen()+0x98
V  [libjvm.so+0x785a18]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, bool)+0x1ec8
V  [libjvm.so+0x5f242e]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x2de
V  [libjvm.so+0x7964ec]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xcbc
V  [libjvm.so+0x799068]  CompileBroker::compiler_thread_loop()+0x848
V  [libjvm.so+0x12757ce]  JavaThread::thread_main_inner()+0x20e
V  [libjvm.so+0xff9aa0]  java_start(Thread*)+0x140
C  [libpthread.so.0+0x8609]  start_thread+0xd9


Current CompileTask:
C2:    403    2             compiler.c2.TestRemoveMemBarPrecEdge::test (24 bytes)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java -XX:-TieredCompilation compiler.c2.TestRemoveMemBarPrecEdge 

The fastdebug build produces this error:
#  Internal Error (/scratch/jenkins/workspace/8-2-build-linux-x64-sans-NAS/jdk8u401/683/hotspot/src/share/vm/opto/compile.cpp:1301), pid=761334, tid=0x00007f03213a6700
#  assert(tn->in(0) != NULL) failed: must have live top node

The production build produces SIGSEGV :

#  SIGSEGV (0xb) at pc=0x00007f57d52d2a11, pid=762090, tid=0x00007f57c6748700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_401) (build 1.8.0_401-b10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.401-b10 mixed mode linux-amd64compressed oops)
# Problematic frame:
# V  [libjvm.so+0x458a11]  PhaseAggressiveCoalesce::coalesce(Block*)+0x71

Current thread (0x00007f57d00ba800):  JavaThread "C2 CompilerThread0" daemon [_hread_in_native, id=762098, stack(0x00007f57c6649000,0x00007f57c6749000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00007f5e46b6dd8

Stack: [0x00007f57c6649000,0x00007f57c6749000],  sp=0x00007f57c6744800,  free sace=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x458a11]  PhaseAggressiveCoalesce::coalesce(Block*)+0x71
V  [libjvm.so+0x458ea2]  PhaseCoalesce::coalesce_driver()+0x42
V  [libjvm.so+0x3f5f4c]  PhaseChaitin::Register_Allocate()+0x1ec
V  [libjvm.so+0x482f7d]  Compile::Code_Gen()+0x3ed
V  [libjvm.so+0x486616]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, ool, bool, bool, bool)+0x16a6
V  [libjvm.so+0x3d3c2b]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0x1b
V  [libjvm.so+0x48f2c1]  CompileBroker::invoke_compiler_on_method(CompileTask*)0x701
V  [libjvm.so+0x49084f]  CompileBroker::compiler_thread_loop()+0x52f
V  [libjvm.so+0xa6084d]  JavaThread::thread_main_inner()+0xfd
V  [libjvm.so+0x90e4c0]  java_start(Thread*)+0x150
C  [libpthread.so.0+0x8609]  start_thread+0xd9

---------- BEGIN SOURCE ----------
The source code is attached as TestRemoveMemBarPrecEdge.java
---------- END SOURCE ----------

FREQUENCY : always 
Comments
Duplicate search JDK-8287432 Fixed in JDKs 19, 17, 11. Not backported to JDK 8.
29-01-2024