JDK-8267212 : test/jdk/java/util/Collections/FindSubList.java intermittent crash with "no reachable node should have no use"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-05-17
  • Updated: 2021-06-02
  • Resolved: 2021-05-19
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 17
17 b23Fixed
Related Reports
Relates :  
Description
 4247  MergeMem  === _  1  334  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  7  7  7  7  7  7  7  37  37  7  7  7  7  7  [[]]  { - - - - - - - - - - - - - - - - - - - - - - - - - - - - N7:java/util/ArrayList$ListItr:NotNull:exact *,iid=612 N7:java/util/ArrayList$ListItr:NotNull:exact+8 *,iid=612 [narrowklass] N7:java/util/ArrayList$Itr:NotNull:exact+20 *,iid=612 N7:java/util/ArrayList$Itr:NotNull:exact+12 *,iid=612 N7:java/util/ArrayList$Itr:NotNull:exact+24 *,iid=612 [narrow] N7:java/util/ArrayList$Itr:NotNull:exact+16 *,iid=612 N7:java/util/ArrayList$ListItr:NotNull:exact+28 *,iid=612 [narrow] N37:java/util/LinkedList$ListItr:NotNull:exact *,iid=228 N37:java/util/LinkedList$ListItr:NotNull:exact+8 *,iid=228 [narrowklass] N7:java/util/LinkedList$ListItr:NotNull:exact+20 *,iid=228 [narrow] N7:java/util/LinkedList$ListItr:NotNull:exact+12 *,iid=228 N7:java/util/LinkedList$ListItr:NotNull:exact+28 *,iid=228 [narrow] N7:java/util/LinkedList$ListItr:NotNull:exact+24 *,iid=228 [narrow] N7:java/util/LinkedList$ListItr:NotNull:exact+16 *,iid=228 }  Memory: @BotPTR *+bot, idx=Bot; !orig=[595],[651] !jvms: Collections::lastIndexOfSubList @ bci:126 (line 975)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/compile.cpp:2308
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/shihui/jdk_0514/shihui_jdk/src/hotspot/share/opto/compile.cpp:2308), pid=19247, tid=19273
#  fatal error: no reachable node should have no use
#
# JRE version: OpenJDK Runtime Environment (17.0) (fastdebug build 17-internal+0-adhoc.root.shihuijdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 17-internal+0-adhoc.root.shihuijdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x922600]  Compile::check_no_dead_use() const+0x370
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /data/shihui/jdk_0514/shihui_jdk/temp/hs_err_pid19247.log
#
# Compiler replay data is saved as:
# /data/shihui/jdk_0514/shihui_jdk/temp/replay_pid19247.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
Comments
Changeset: 324defe2 Author: Hui Shi <hshi@openjdk.org> Committer: Jie Fu <jiefu@openjdk.org> Date: 2021-05-19 01:25:58 +0000 URL: https://git.openjdk.java.net/jdk/commit/324defe2b6c83de76a37d1b4b360869a77bed036
19-05-2021

ILW = Assert during C2 compilation (harmless in product), intermittent with JDK test, no workaround = MMH = P3
17-05-2021

Fixing StrIntrinsicNode::Ideal, replace set_req with set_req_X make run-test CONF=fastdebug TEST="test/jdk/java/util/Collections/FindSubList.java" before fixing 2/3 in 10 runs fail after fixing all pass in 100 runs. fixing two more places with same issues in LoadNode::Ideal https://github.com/huishi-hs/jdk/commit/ef8a859cd8fe510ef8f7d61b3b51a1a09e60c2af
17-05-2021

MemMergeNode last output is deleted in StrIntrinsicNode::Ideal. Stack: [0x00007f47c51fa000,0x00007f47c52fb000], sp=0x00007f47c52f6330, free space=1008k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xd47a63] StrIntrinsicNode::Ideal(PhaseGVN*, bool)+0x923 V [libjvm.so+0x1418aba] PhaseIterGVN::transform_old(Node*)+0xba V [libjvm.so+0x141320b] PhaseIterGVN::optimize()+0x9b V [libjvm.so+0x11874ed] PhaseMacroExpand::expand_macro_nodes()+0x27d V [libjvm.so+0x930cda] Compile::Optimize()+0xe9a V [libjvm.so+0x9322aa] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x11ea V [libjvm.so+0x794fd6] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x116 V [libjvm.so+0x940446] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xcd6 V [libjvm.so+0x940f48] CompileBroker::compiler_thread_loop()+0x438 V [libjvm.so+0x17b3833] JavaThread::thread_main_inner()+0x2e3 V [libjvm.so+0x17b3b9c] JavaThread::run()+0x2ac V [libjvm.so+0x17b8a38] Thread::call_run()+0xf8 V [libjvm.so+0x1397a4e] thread_native_entry(Thread*)+0x10e Replace memmerge node with set_req(MemNode::Memory, mem); It should be set_req_X(MemNode::Memory, mem, phase); 39 Node* StrIntrinsicNode::Ideal(PhaseGVN* phase, bool can_reshape) { 40 if (remove_dead_region(phase, can_reshape)) return this; 41 // Don't bother trying to transform a dead node 42 if (in(0) && in(0)->is_top()) return NULL; 43 44 if (can_reshape) { 45 Node* mem = phase->transform(in(MemNode::Memory)); 46 // If transformed to a MergeMem, get the desired slice 47 uint alias_idx = phase->C->get_alias_index(adr_type()); 48 mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem; 49 if (mem != in(MemNode::Memory)) { 50 set_req(MemNode::Memory, mem); 51 return this; 52 } 53 } 54 return NULL; 55 }
17-05-2021