JDK-8273094 : assert(in_hash) failed: node should be in igvn hash table
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18,21
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2021-08-27
  • Updated: 2024-05-15
  • Resolved: 2023-01-30
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
tbdResolved
Related Reports
Relates :  
Description
Crash in test resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/.../open/src/hotspot/share/opto/compile.cpp:4580), pid=20498, tid=20514
#  assert(in_hash) failed: node should be in igvn hash table
#
# JRE version: Java(TM) SE Runtime Environment (18.0+13) (fastdebug build 18-ea+13-633)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 18-ea+13-633, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x9e9dd8]  Compile::remove_speculative_types(PhaseIterGVN&) [clone .part.0]+0xa88
#
Comments
Here's a snippet from the log file for the jdk-21+7-462-tier8 sighting: applications/microbenchmarks/other/Test_11.java#id8 [jmh]:/opt/mach5/mesos/work_dir/jib-master/install/jdk-21+7-462/linux-x64-debug.jdk/jdk-21/fastdebug/bin/java -cp /opt/mach5/mesos/work_dir/jib-master/install/jdk-21+7-462/src.full/closed/test/hotspot/jtreg/applications/microbenchmarks/other:/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/classes/4/open/test/lib:/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/classes/4:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/jtreg.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/junit-platform-console-standalone-1.8.2.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/testng-7.3.0.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/jcommander-1.78.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/guice-4.2.3.jar -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/tmp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:-UseCompressedOops -cp /opt/mach5/mesos/work_dir/jib-master/install/jdk-21+7-462/src.full/closed/test/hotspot/jtreg/applications/microbenchmarks/other:/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/classes/4/open/test/lib:/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/classes/4:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/jtreg.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/junit-platform-console-standalone-1.8.2.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/testng-7.3.0.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/jcommander-1.78.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/7.1.1/1/bundles/jtreg-7.1.1+1.zip/jtreg/lib/guice-4.2.3.jar:/opt/mach5/mesos/work_dir/jib-master/download/com/oracle/micros-uberpackage/1.21/micros-uberpackage-1.21.jar --add-opens java.base/java.io=ALL-UNNAMED -Djmh.ignoreLock=true -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/scratch/3 org.openjdk.jmh.Main -f 1 -foe true net.openjdk.micro.jep274.MethodHandlesLoop.Invoke0.loop$ [jmh] # To suppress the following error report, specify this argument [jmh] # after -XX: or in .hotspotrc: SuppressErrorAt=/compile.cpp:4884 [jmh] # [jmh] # A fatal error has been detected by the Java Runtime Environment: [jmh] # [jmh] # Internal Error (/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S8353/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/309471fb-3ce1-454f-8510-e9dbd043c195/runs/2964f28f-7316-481c-9100-4d78c7e60a5c/workspace/open/src/hotspot/share/opto/compile.cpp:4884), pid=1514808, tid=1514825 [jmh] # assert(in_hash) failed: node should be in igvn hash table [jmh] # [jmh] # JRE version: Java(TM) SE Runtime Environment (21.0+7) (fastdebug build 21-ea+7-LTS-462) [jmh] # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+7-LTS-462, mixed mode, sharing, compressed class ptrs, g1 gc, linux-amd64) [jmh] # Problematic frame: [jmh] # V [libjvm.so+0xafb3f1] Compile::remove_speculative_types(PhaseIterGVN&) [clone .part.0]+0x9a1 [jmh] # [jmh] # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/scratch/3/core.1514808) [jmh] # [jmh] # An error report file with more information is saved as: [jmh] # /opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/scratch/3/hs_err_pid1514808.log [jmh] # JMH version: 1.21 [jmh] # VM version: JDK 21-ea, Java HotSpot(TM) 64-Bit Server VM, 21-ea+7-LTS-462 [jmh] # VM invoker: /opt/mach5/mesos/work_dir/jib-master/install/jdk-21+7-462/linux-x64-debug.jdk/jdk-21/fastdebug/bin/java [jmh] # VM options: -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/tmp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:-TieredCompilation -XX:-UseCompressedOops --add-opens=java.base/java.io=ALL-UNNAMED -Djmh.ignoreLock=true -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S88801/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a54880bb-bcee-4a84-b55b-651d343611b1/runs/b280a606-bad0-433e-b350-f3045e80efab/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_microbenchmarks_other_Test_11_java/scratch/3 [jmh] # Warmup: 5 iterations, 10 s each [jmh] # Measurement: 5 iterations, 10 s each [jmh] # Timeout: 10 min per iteration [jmh] # Threads: 1 thread, will synchronize iterations [jmh] # Benchmark mode: Average time, time/op [jmh] # Benchmark: net.openjdk.micro.jep274.MethodHandlesLoop.Invoke0.loop [jmh] # Parameters: (iterations = 1) [jmh] # Run progress: 0.00% complete, ETA 00:05:00 [jmh] # Fork: 1 of 1 [jmh] [thread 1514892 also had an error] [jmh] ------ Timeout during error reporting after 120 s. ------ [jmh] # [ timer expired, abort... ] ----------System.err:(14/776)---------- java.lang.RuntimeException: assertEquals: expected 0 to equal 134 at jdk.test.lib.Asserts.fail(Asserts.java:594) at jdk.test.lib.Asserts.assertEquals(Asserts.java:205) at jdk.test.lib.Asserts.assertEquals(Asserts.java:189) at jdk.test.lib.Asserts.assertEQ(Asserts.java:166) at applications.microbenchmarks.MicroRunner.main(MicroRunner.java:33) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312) at java.base/java.lang.Thread.run(Thread.java:1623) JavaTest Message: Test threw exception: java.lang.RuntimeException JavaTest Message: shutting down test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: assertEquals: expected 0 to equal 134 Here's the crashing thread's stack: --------------- T H R E A D --------------- Current thread (0x00007f80c009a570): JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=1514825, stack(0x00007f80e7321000,0x00007f80e7422000)] Current CompileTask: C2: 648 327 java.lang.invoke.MethodType$ConcurrentWeakInternSet::get (47 bytes) Stack: [0x00007f80e7321000,0x00007f80e7422000], sp=0x00007f80e741d0d0, free space=1008k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xafb3f1] Compile::remove_speculative_types(PhaseIterGVN&) [clone .part.0]+0x9a1 (compile.cpp:4884) V [libjvm.so+0xb19326] Compile::Optimize()+0x9f6 (compile.cpp:2431) V [libjvm.so+0xb1d8be] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x18ce (compile.cpp:830) V [libjvm.so+0x92a697] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb2ac6c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb2ba58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x10a46a6] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:710) V [libjvm.so+0x1ab4320] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x174a643] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739)
27-01-2023

ILW = 1 test crashed once so far, no workaround = MMH = P3
30-08-2021

This might be related to JDK-8243195.
30-08-2021