JDK-8217230 : assert(t == t_no_spec) failure in NodeHash::check_no_speculative_types()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-16
  • Updated: 2021-04-07
  • Resolved: 2019-01-22
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 12 JDK 13 Other
11.0.8-oracleFixed 12 b29Fixed 13Fixed openjdk8u302Fixed
Related Reports
Relates :  
Relates :  
Description
# assert(t == t_no_spec) failed: dead node in hash table or missed node during speculative cleanup

# Problematic frame:
# V [libjvm.so+0x1541b6a] NodeHash::check_no_speculative_types()+0xfa 
Comments
Approved as this is a regression fix for JDK-8214862 which is in 8u272.
07-04-2021

Fix Request [8u] 8u RFR thread (acked by Roland Westrelin): https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013621.html
04-04-2021

8u RFR thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013619.html
02-04-2021

11u Fix Request Backporting this patch is needed for the backport of JDK-8237086. Patch does not apply cleanly to 11u and requires adjustments. 11u RFR: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-April/002945.html
06-04-2020

Thanks Vladimir.
22-01-2019

Fix request approved.
22-01-2019

Fix Request This bug is a regression by JDK-8214862 in JDK 12 b27 and therefore needs to be fixed in 12. The fix is simple and low risk (it removes a dead node from the C2 IR). I've executed hs-tier1,hs-tier2,hs-tier3,hs-precheckin-comp,jdk-tier1,jdk-tier2,jdk-tier3 - all passed. http://cr.openjdk.java.net/~thartmann/8217230/webrev.00/
22-01-2019

http://cr.openjdk.java.net/~thartmann/8217230/webrev.00/
21-01-2019

The offending node is a Phi (4322) used by a dead SafePoint: 3799 CastPP === 3777 3764 [[ 3977 4322 4018 3805 4018 3998 3998 3827 3827 3836 3836 3861 3856 3856 3861 3894 3889 3889 3894 3977 3928 3928 3940 3940 3952 3952 ]] #java/math/BigInteger:NotNull * Oop:java/math/BigInteger:NotNull * !jvms: BigInteger::passesMillerRabin @ bci:101 4082 CastPP === 4060 4047 [[ 4602 4602 4580 4086 4557 4557 4105 4105 4114 4114 4139 4134 4134 4139 4172 4167 4167 4172 4537 4206 4206 4218 4218 4230 4230 4537 4255 4255 4276 4276 4296 4296 4516 4516 4322 4596 4491 4491 4479 4344 4479 4467 4467 4433 4428 4428 4433 4400 4395 4395 4400 ]] #java/math/BigInteger:NotNull * Oop:java/math/BigInteger:NotNull * !jvms: BigInteger::passesMillerRabin @ bci:110 4041 Region === 4041 4315 4037 [[ 4041 4622 4322 4618 4321 ]] !jvms: BigInteger::passesMillerRabin @ bci:158 4322 Phi === 4041 4082 3799 [[ 4618 ]] #java/math/BigInteger:NotNull * (speculative=java/math/BigInteger:NotNull:exact * (inline_depth=1)) Oop:java/math/BigInteger:NotNull * (speculative=java/math/BigInteger:NotNull:exact * (inline_depth=1)) !jvms: BigInteger::passesMillerRabin @ bci:113 4618 SafePoint === 4041 1 3750 1 1 4622 10 11 1626 1284 1 1441 1 1704 4321 4322 [[]] SafePoint !jvms: BigInteger::passesMillerRabin @ bci:161 Tracing back: (rr) print i $3 = 5232 (rr) print _table[5232] $4 = (Node *) 0x7fa5bc2c4000 (rr) print _table[5232]->dump(-3) 4322 Phi === 4041 4082 3799 [[ 4618 ]] #java/math/BigInteger:NotNull * (speculative=java/math/BigInteger:NotNull:exact * (inline_depth=1)) Oop:java/math/BigInteger:NotNull * (speculative=java/math/BigInteger:NotNull:exact * (inline_depth=1)) !jvms: BigInteger::passesMillerRabin @ bci:113 4618 SafePoint === 4041 1 3750 1 1 4622 10 11 1626 1284 1 1441 1 1704 4321 4322 [[]] SafePoint !jvms: BigInteger::passesMillerRabin @ bci:161 (rr) print _table[5232]->_out[0]->_out[0] $8 = (Node *) 0xdeadbeef (rr) print &_table[5232]->_out[0]->_out[0] $9 = (Node **) 0x7fa5bc2dc400 (rr) watch *0x7fa5bc2dc400 Hardware watchpoint 1: *0x7fa5bc2dc400 (rr) reverse-cont Continuing. Thread 4 received signal SIGSEGV, Segmentation fault. 0x00007fa5fd7243ca in NodeHash::check_no_speculative_types (this=this@entry=0x7fa5cbcfc1b8) at /oracle/jdk12/open/src/hotspot/share/opto/phaseX.cpp:348 348 assert(t == t_no_spec, "dead node in hash table or missed node during speculative cleanup"); (rr) reverse-cont Continuing. Thread 4 hit Hardware watchpoint 1: *0x7fa5bc2dc400 Old value = -559038737 New value = -1073739008 0x00007fa5fd5dd5ad in Node::del_out (n=0x7fa5c0000b00, this=0x7fa5bc2dbe40) at /oracle/jdk12/open/src/hotspot/share/opto/node.hpp:492 492 debug_only(_out[_outcnt] = (Node *)(uintptr_t)0xdeadbeef); (rr) where #0 0x00007fa5fd5dd5ad in Node::del_out (n=0x7fa5c0000b00, this=0x7fa5bc2dbe40) at /oracle/jdk12/open/src/hotspot/share/opto/node.hpp:492 #1 Node::rm_prec (this=this@entry=0x7fa5c0000b00, j=j@entry=132) at /oracle/jdk12/open/src/hotspot/share/opto/node.cpp:989 #2 0x00007fa5fcaff83c in Compile::remove_root_to_sfpts_edges (this=this@entry=0x7fa5cbcfdd40) at /oracle/jdk12/open/src/hotspot/share/opto/compile.cpp:2197 #3 0x00007fa5fcb0cd0f in Compile::Optimize (this=this@entry=0x7fa5cbcfdd40) at /oracle/jdk12/open/src/hotspot/share/opto/compile.cpp:2266 #4 0x00007fa5fcb0ef10 in Compile::Compile (this=0x7fa5cbcfdd40, ci_env=<optimized out>, compiler=0x7fa5f4208320, target=<optimized out>, osr_bci=<optimized out>, subsume_loads=<optimized out>, do_escape_analysis=false, eliminate_boxing=true, directive=0x7fa5f411eee0) at /oracle/jdk12/open/src/hotspot/share/opto/compile.cpp:870 #5 0x00007fa5fc8edec2 in C2Compiler::compile_method (this=0x7fa5f4208320, env=0x7fa5cbcfeb00, target=0x7fa5f4758400, entry_bci=-1, directive=0x7fa5f411eee0) at /oracle/jdk12/open/src/hotspot/share/opto/c2compiler.cpp:109 #6 0x00007fa5fcb1caaf in CompileBroker::invoke_compiler_on_method (task=task@entry=0x7fa5f47f0190) at /oracle/jdk12/open/src/hotspot/share/compiler/compileBroker.cpp:2120 #7 0x00007fa5fcb1d888 in CompileBroker::compiler_thread_loop () at /oracle/jdk12/open/src/hotspot/share/compiler/compileBroker.cpp:1807 #8 0x00007fa5fdada207 in JavaThread::thread_main_inner (this=0x7fa5f4208800) at /oracle/jdk12/open/src/hotspot/share/runtime/thread.cpp:1812 #9 0x00007fa5fdad58c5 in Thread::call_run (this=0x7fa5f4208800) at /oracle/jdk12/open/src/hotspot/share/runtime/thread.cpp:384 #10 0x00007fa5fd681418 in thread_native_entry (thread=0x7fa5f4208800) at /oracle/jdk12/open/src/hotspot/os/linux/os_linux.cpp:709 #11 0x00007fa5fe7c66ba in start_thread (arg=0x7fa5cbcff700) at pthread_create.c:333 #12 0x00007fa5fece741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 This code was introduced by JDK-8214862.
21-01-2019

Able to reproduce the failure, in my local Linux-x64, using JDK 12-ea+27 build and attached replay. $ .../jdk12b27/jdk-12/fastdebug/bin/java -XX:+UseParallelGC -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=replay_pid19282.log ......... ........ Resolving klass sun/security/jca/ProviderList at 292 Resolving klass java/util/List at 294 Resolving klass java/util/Set at 300 java.lang.NoClassDefFoundError: applications/kitchensink/process/stress/modules/ReferenceStressModule java.lang.NoClassDefFoundError: applications/kitchensink/process/stress/modules/ReferenceStressModule java.lang.NoClassDefFoundError: applications/kitchensink/process/stress/modules/ReferenceStressModule$BigIntegerFinalized java.lang.NoClassDefFoundError: applications/kitchensink/process/stress/modules/ReferenceStressModule$BigIntegerFinalized java.lang.NoClassDefFoundError: applications/kitchensink/process/stress/modules/ReferenceStressModule # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/phaseX.cpp:348 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/2dd962d0-8988-479b-a804-57ab764ada59-S1201/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e4577cb6-567e-49d8-8c94-b53645be9d96/runs/ca0e9ec7-51e1-431c-a71f-fa5cc4e21c8a/workspace/open/src/hotspot/share/opto/phaseX.cpp:348), pid=20075, tid=20108 # assert(t == t_no_spec) failed: dead node in hash table or missed node during speculative cleanup # # JRE version: Java(TM) SE Runtime Environment (12.0+27) (fastdebug build 12-ea+27) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-ea+27, mixed mode, sharing, tiered, compressed oops, parallel gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x154009a] NodeHash::check_no_speculative_types()+0xfa ILW = Assert failure crash; rare / but easily reproducible with replay; possibly disable UseTypeSpeculation or disable compilation of affected method! = HMM = P2 (at present targeting to 12)
16-01-2019