JDK-8229961 : Assert failure in compiler/graalunit/HotspotTest.java
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,11.0.7-oracle,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2019-08-21
  • Updated: 2020-04-02
  • Resolved: 2019-12-11
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 14 JDK 15
11.0.7-oracleFixed 14 b27Fixed 15Fixed
Related Reports
Relates :  
Description
# after -XX: or in .hotspotrc:  SuppressErrorAt=t:/workspace/open/src/hotspot/share/code/nmethod.cpp:2165
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (t:/workspace/open/src/hotspot/share/code/nmethod.cpp:2165), pid=1300, tid=44252
#  assert(zombie_ok || !nm->is_zombie()) failed: cannot lock a zombie method: 0000005E24E1DC10
#
# JRE version: Java(TM) SE Runtime Environment (14.0+1) (fastdebug build 14-cpu+1-16)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-cpu+1-16, mixed mode, sharing, tiered, jvmci, compressed oops, g1 gc, windows-amd64)
# Core dump will be written. Default location: T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_compiler_graalunit\\scratch\\2\\hs_err_pid1300.mdmp
#
# An error report file with more information is saved as:
# T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_compiler_graalunit\\scratch\\2\\hs_err_pid1300.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

Stack: [0x0000005e13a40000,0x0000005e13b40000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xaca141]  os::platform_print_native_stack+0xf1  (os_windows_x86.cpp:369)
V  [jvm.dll+0xccba7f]  VMError::report+0xf0f  (vmerror.cpp:716)
V  [jvm.dll+0xccd33e]  VMError::report_and_die+0x8ae  (vmerror.cpp:1524)
V  [jvm.dll+0xccda34]  VMError::report_and_die+0x64  (vmerror.cpp:1308)
V  [jvm.dll+0x508fe2]  report_vm_error+0x102  (debug.cpp:264)
V  [jvm.dll+0xa8bc38]  nmethodLocker::lock_nmethod+0xa8  (nmethod.cpp:2166)
V  [jvm.dll+0x855088]  JVMCIEnv::invalidate_nmethod_mirror+0x118  (jvmcienv.cpp:1490)
V  [jvm.dll+0x7f077c]  c2v_invalidateHotSpotNmethod+0x19c  (jvmcicompilertovm.cpp:1129)
C  0x0000005e1c8b8184

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jdk.vm.ci.hotspot.CompilerToVM.invalidateHotSpotNmethod(Ljdk/vm/ci/hotspot/HotSpotNmethod;)V+0 jdk.internal.vm.ci@14-cpu
j  jdk.vm.ci.hotspot.HotSpotNmethod.invalidate()V+4 jdk.internal.vm.ci@14-cpu
j  org.graalvm.compiler.hotspot.test.TestSHASubstitutions.testWithInstalledIntrinsic(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V+103
j  org.graalvm.compiler.hotspot.test.TestSHASubstitutions.testSha256()V+34
v  ~StubRoutines::call_stub
J 12127  jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@14-cpu (0 bytes) @ 0x0000005e24746d7e [0x0000005e24746c60+0x000000000000011e]
J 12126 c1 jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@14-cpu (104 bytes) @ 0x0000005e1e6e4bc4 [0x0000005e1e6e36a0+0x0000000000001524]
J 7479 c2 jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base@14-cpu (10 bytes) @ 0x0000005e24644a2c [0x0000005e24644940+0x00000000000000ec]
J 14799 c1 org.junit.runners.model.FrameworkMethod.invokeExplosively(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (14 bytes) @ 0x0000005e1e9301ac [0x0000005e1e92f7a0+0x0000000000000a0c]
j  org.junit.internal.runners.statements.InvokeMethod.evaluate()V+12
j  org.junit.internal.runners.statements.RunAfters.evaluate()V+12
j  org.junit.runners.ParentRunner.runLeaf(Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;Lorg/junit/runner/notification/RunNotifier;)V+17
j  org.junit.runners.BlockJUnit4ClassRunner.runChild(Lorg/junit/runners/model/FrameworkMethod;Lorg/junit/runner/notification/RunNotifier;)V+30
j  org.junit.runners.BlockJUnit4ClassRunner.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6
j  org.junit.runners.ParentRunner$3.run()V+12
j  org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1
j  org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+44
j  org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2
j  org.junit.runners.ParentRunner$2.evaluate()V+8
j  org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20
j  org.junit.runners.Suite.runChild(Lorg/junit/runner/Runner;Lorg/junit/runner/notification/RunNotifier;)V+2
j  org.junit.runners.Suite.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6
j  org.junit.runners.ParentRunner$3.run()V+12
j  org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1
j  org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+44
j  org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2
j  org.junit.runners.ParentRunner$2.evaluate()V+8
j  org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20
j  org.junit.runner.JUnitCore.run(Lorg/junit/runner/Runner;)Lorg/junit/runner/Result;+37
j  org.junit.runner.JUnitCore.run(Lorg/junit/runner/Request;)Lorg/junit/runner/Result;+5
j  com.oracle.mxtool.junit.MxJUnitWrapper.runRequest(Lorg/junit/runner/JUnitCore;Lorg/junit/internal/JUnitSystem;Lcom/oracle/mxtool/junit/MxJUnitWrapper$MxJUnitConfig;Lcom/oracle/mxtool/junit/MxJUnitRequest;)Lorg/junit/runner/Result;+360
j  com.oracle.mxtool.junit.MxJUnitWrapper.main([Ljava/lang/String;)V+464
v  ~StubRoutines::call_stub

Comments
OpenJDK 11 updates backport will follow after larger Graal integration, see https://github.com/oracle/graal/issues/2196
11-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/3ccdeba59e25 User: never Date: 2019-12-11 17:48:05 +0000
11-12-2019

I'm reopening this because the fix for this issue is more significant than the bug it was duped against, which really should be treated as an RFE.
25-11-2019

Tom R. will rework this code in JDK-8229377 and will fix the issue. I am closing this as duplicate.
22-08-2019

Tom R. suggested in JDK-8229377 to use Patching_lock when we do check and nmethod lock to avoid nmethod's state change.
22-08-2019

I may go with [~apangin] suggestion from JDK-8212159: "The trivial fix would be to allow locking zombies here." Due to racing we can have nmethod state change between is_alive check and lock.
22-08-2019

I am not sure what recent change may cause this appear. But I see that JVMCIEnv::invalidate_nmethod_mirror() method tries to lock nmethod before checking that it is alive: http://hg.openjdk.java.net/jdk/jdk/file/425412369353/src/hotspot/share/jvmci/jvmciEnv.cpp#l1489
21-08-2019