JDK-8269342 : CICrashAt=1 does not always catch first Java method
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-06-25
  • Updated: 2022-03-24
  • Resolved: 2021-07-26
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 18
18 b08Fixed
Related Reports
Blocks :  
Relates :  
Description
The following tests fail with "java.lang.RuntimeException: Crash JVM exits gracefully: expected 0 to not equal 0" when running with the fix for JDK-6824466 [1] that replaces the core reflection implementation to use method handles.

compiler/ciReplay/TestVMNoCompLevel.java
compiler/ciReplay/TestServerVM.java

Need help from the VM compiler team to investigate if this is a JIT compiler issue or due to the core reflection change.  Thanks.
[1] https://github.com/mlchung/jdk/tree/reimplement-method-invoke
Comments
Changeset: fcc7d59b Author: Dean Long <dlong@openjdk.org> Date: 2021-07-26 22:09:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/fcc7d59b9937a34c423e4532058668144b0ec1fb
26-07-2021

These tests use -XX:CICrashAt=1 to cause a crash, assuming the test method is the first method compiled. However, that's not always the case: 603 1 n 0 java.lang.invoke.MethodHandle::linkToStatic(LL)I (native) (static) 1366 2 b 3 compiler.ciReplay.CiReplayBase$TestMain::test (17 bytes)
09-07-2021

I can reproduce it with the -esa flag.
09-07-2021

[~mchung] Are you still seeing this failure? I tried running these tests with your branch and passing -Djdk.reflect.useDirectMethodHandle=true but I'm not seeing the failure.
08-07-2021

ILW = replay test failure when methodhandles used for reflection, no workaround = MMH = P3
25-06-2021

The ci replay feature has known problems with method handles and dynamic classes.
25-06-2021